{"action":"opened","issue":{"url":"https://api.github.com/repos/mhacks/MHacks-iOS/issues/11","repository_url":"https://api.github.com/repos/mhacks/MHacks-iOS","labels_url":"https://api.github.com/repos/mhacks/MHacks-iOS/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/mhacks/MHacks-iOS/issues/11/comments","events_url":"https://api.github.com/repos/mhacks/MHacks-iOS/issues/11/events","html_url":"https://github.com/mhacks/MHacks-iOS/issues/11","id":152722701,"number":11,"title":"APIManager Completion Blocks","user":{"login":"russellladd","id":5775643,"avatar_url":"https://avatars.githubusercontent.com/u/5775643?v=3","gravatar_id":"","url":"https://api.github.com/users/russellladd","html_url":"https://github.com/russellladd","followers_url":"https://api.github.com/users/russellladd/followers","following_url":"https://api.github.com/users/russellladd/following{/other_user}","gists_url":"https://api.github.com/users/russellladd/gists{/gist_id}","starred_url":"https://api.github.com/users/russellladd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/russellladd/subscriptions","organizations_url":"https://api.github.com/users/russellladd/orgs","repos_url":"https://api.github.com/users/russellladd/repos","events_url":"https://api.github.com/users/russellladd/events{/privacy}","received_events_url":"https://api.github.com/users/russellladd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"manavgabhawala","id":8603246,"avatar_url":"https://avatars.githubusercontent.com/u/8603246?v=3","gravatar_id":"","url":"https://api.github.com/users/manavgabhawala","html_url":"https://github.com/manavgabhawala","followers_url":"https://api.github.com/users/manavgabhawala/followers","following_url":"https://api.github.com/users/manavgabhawala/following{/other_user}","gists_url":"https://api.github.com/users/manavgabhawala/gists{/gist_id}","starred_url":"https://api.github.com/users/manavgabhawala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manavgabhawala/subscriptions","organizations_url":"https://api.github.com/users/manavgabhawala/orgs","repos_url":"https://api.github.com/users/manavgabhawala/repos","events_url":"https://api.github.com/users/manavgabhawala/events{/privacy}","received_events_url":"https://api.github.com/users/manavgabhawala/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2016-05-03T08:22:59Z","updated_at":"2016-05-03T08:22:59Z","closed_at":null,"body":"Sometimes when an object requests an update from the APIManager, it wants to know when its request finishes (and if it succeeded). This information should be passed back in the form of a completion block. If multiple objects make the same request while one is being processed, the requests should be coalesced (so redundant network requests are not made), but all of their completion blocks should be called when the single request finishes. The completion block should be optional.\r\n\r\nThe completion block should not get the object data from the request, changes in which are still distributed via separate notification mechanism.\r\n\r\nThis mechanism should be used in the app delegate to simplify the way launch options and push notifications are handled."}}