{"action":"created","issue":{"url":"https://api.github.com/repos/OriginProtocol/origin-js/issues/383","repository_url":"https://api.github.com/repos/OriginProtocol/origin-js","labels_url":"https://api.github.com/repos/OriginProtocol/origin-js/issues/383/labels{/name}","comments_url":"https://api.github.com/repos/OriginProtocol/origin-js/issues/383/comments","events_url":"https://api.github.com/repos/OriginProtocol/origin-js/issues/383/events","html_url":"https://github.com/OriginProtocol/origin-js/pull/383","id":355347718,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExODk4NTM2","number":383,"title":"Return a `unitsAvailable` property for each listing resource","user":{"login":"tyleryasaka","id":6504519,"node_id":"MDQ6VXNlcjY1MDQ1MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/6504519?v=4","gravatar_id":"","url":"https://api.github.com/users/tyleryasaka","html_url":"https://github.com/tyleryasaka","followers_url":"https://api.github.com/users/tyleryasaka/followers","following_url":"https://api.github.com/users/tyleryasaka/following{/other_user}","gists_url":"https://api.github.com/users/tyleryasaka/gists{/gist_id}","starred_url":"https://api.github.com/users/tyleryasaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tyleryasaka/subscriptions","organizations_url":"https://api.github.com/users/tyleryasaka/orgs","repos_url":"https://api.github.com/users/tyleryasaka/repos","events_url":"https://api.github.com/users/tyleryasaka/events{/privacy}","received_events_url":"https://api.github.com/users/tyleryasaka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-29T21:53:45Z","updated_at":"2018-08-31T00:03:08Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/OriginProtocol/origin-js/pulls/383","html_url":"https://github.com/OriginProtocol/origin-js/pull/383","diff_url":"https://github.com/OriginProtocol/origin-js/pull/383.diff","patch_url":"https://github.com/OriginProtocol/origin-js/pull/383.patch"},"body":"### Checklist:\r\n\r\n- [x] Code contains relevant tests for the problem you are solving\r\n- [x] Ensure all new and existing tests pass\r\n- [x] Update any relevant READMEs and [docs](https://github.com/OriginProtocol/docs)\r\n\r\n### Description:\r\n\r\nThe `unitsAvailable` property is derived from the `units` property on the listing ifps data and the number of offers created for a listing.\r\n\r\nDoes not handle offer cancellation/rejection, but will need to handle that once those pieces are implemented.\r\n\r\nUses a default `units` value of `1` if not present in the ipfs data.\r\n\r\nResolves #379\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/OriginProtocol/origin-js/issues/comments/417506365","html_url":"https://github.com/OriginProtocol/origin-js/pull/383#issuecomment-417506365","issue_url":"https://api.github.com/repos/OriginProtocol/origin-js/issues/383","id":417506365,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzUwNjM2NQ==","user":{"login":"micahalcorn","id":273937,"node_id":"MDQ6VXNlcjI3MzkzNw==","avatar_url":"https://avatars1.githubusercontent.com/u/273937?v=4","gravatar_id":"","url":"https://api.github.com/users/micahalcorn","html_url":"https://github.com/micahalcorn","followers_url":"https://api.github.com/users/micahalcorn/followers","following_url":"https://api.github.com/users/micahalcorn/following{/other_user}","gists_url":"https://api.github.com/users/micahalcorn/gists{/gist_id}","starred_url":"https://api.github.com/users/micahalcorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micahalcorn/subscriptions","organizations_url":"https://api.github.com/users/micahalcorn/orgs","repos_url":"https://api.github.com/users/micahalcorn/repos","events_url":"https://api.github.com/users/micahalcorn/events{/privacy}","received_events_url":"https://api.github.com/users/micahalcorn/received_events","type":"User","site_admin":false},"created_at":"2018-08-31T00:03:08Z","updated_at":"2018-08-31T00:03:08Z","author_association":"MEMBER","body":"Thx @tyleryasaka 🙏 "}}
{"actor":{"display_login":"micahalcorn"}}