{"action":"closed","number":208,"pull_request":{"url":"https://api.github.com/repos/danthorpe/Operations/pulls/208","id":61382411,"html_url":"https://github.com/danthorpe/Operations/pull/208","diff_url":"https://github.com/danthorpe/Operations/pull/208.diff","patch_url":"https://github.com/danthorpe/Operations/pull/208.patch","issue_url":"https://api.github.com/repos/danthorpe/Operations/issues/208","number":208,"state":"closed","locked":false,"title":"Default argument for designated initializer due to internal type","user":{"login":"itsthejb","id":557391,"avatar_url":"https://avatars.githubusercontent.com/u/557391?v=3","gravatar_id":"","url":"https://api.github.com/users/itsthejb","html_url":"https://github.com/itsthejb","followers_url":"https://api.github.com/users/itsthejb/followers","following_url":"https://api.github.com/users/itsthejb/following{/other_user}","gists_url":"https://api.github.com/users/itsthejb/gists{/gist_id}","starred_url":"https://api.github.com/users/itsthejb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itsthejb/subscriptions","organizations_url":"https://api.github.com/users/itsthejb/orgs","repos_url":"https://api.github.com/users/itsthejb/repos","events_url":"https://api.github.com/users/itsthejb/events{/privacy}","received_events_url":"https://api.github.com/users/itsthejb/received_events","type":"User","site_admin":false},"body":"Hi there,\r\n\r\nThanks again for the great work on this library - it continues to impress us with its capabilities.\r\n\r\nMinor one here, I think: we want to implement a throttling condition which will fail if we exceed a certain number of network operations *on cell connection* in a particular period. Therefore the logic (seemingly) is:\r\n\r\n* `ReachabilityCondition` with `Connectivity.ViaWiFi`\r\n* If this condition fails, we can assume we're on cell connection.\r\n* Inspect the number of requests from a particular period to see if we've hit our threshold, and succeed/fail based on that.\r\n\r\nThis sort of condition composition doesn't appear to be supported (and would be great condition!), but for this simple usage, I can subclass `ReachabilityCondition`, and override `evaluateForOperation()`. Not super clean, but looks to be enough. Currently subclassing is an issue, though, because the designated initializer uses the internal type `HostReachabilityType`. Since we don't care about this argument, a better solution seems to be to drop the convenience initializer and just have a default argument here. Since the type is internal it can't be used.\r\n\r\nIn any case, if there's a better solution for the problem we're solving here, also very keen to hear about it.\r\n\r\nThanks!","created_at":"2016-03-02T10:52:57Z","updated_at":"2016-03-02T11:08:10Z","closed_at":"2016-03-02T11:08:10Z","merged_at":null,"merge_commit_sha":"ed819a187acffbc938d50e0d4d3c5255cfc90331","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/danthorpe/Operations/pulls/208/commits","review_comments_url":"https://api.github.com/repos/danthorpe/Operations/pulls/208/comments","review_comment_url":"https://api.github.com/repos/danthorpe/Operations/pulls/comments{/number}","comments_url":"https://api.github.com/repos/danthorpe/Operations/issues/208/comments","statuses_url":"https://api.github.com/repos/danthorpe/Operations/statuses/44c7bb478815c7ebcd1d6e31685aa8e65cc55b73","head":{"label":"eyeem:reachability-condition-initializer","ref":"reachability-condition-initializer","sha":"44c7bb478815c7ebcd1d6e31685aa8e65cc55b73","user":{"login":"eyeem","id":726649,"avatar_url":"https://avatars.githubusercontent.com/u/726649?v=3","gravatar_id":"","url":"https://api.github.com/users/eyeem","html_url":"https://github.com/eyeem","followers_url":"https://api.github.com/users/eyeem/followers","following_url":"https://api.github.com/users/eyeem/following{/other_user}","gists_url":"https://api.github.com/users/eyeem/gists{/gist_id}","starred_url":"https://api.github.com/users/eyeem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eyeem/subscriptions","organizations_url":"https://api.github.com/users/eyeem/orgs","repos_url":"https://api.github.com/users/eyeem/repos","events_url":"https://api.github.com/users/eyeem/events{/privacy}","received_events_url":"https://api.github.com/users/eyeem/received_events","type":"Organization","site_admin":false},"repo":{"id":51915229,"name":"Operations","full_name":"eyeem/Operations","owner":{"login":"eyeem","id":726649,"avatar_url":"https://avatars.githubusercontent.com/u/726649?v=3","gravatar_id":"","url":"https://api.github.com/users/eyeem","html_url":"https://github.com/eyeem","followers_url":"https://api.github.com/users/eyeem/followers","following_url":"https://api.github.com/users/eyeem/following{/other_user}","gists_url":"https://api.github.com/users/eyeem/gists{/gist_id}","starred_url":"https://api.github.com/users/eyeem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eyeem/subscriptions","organizations_url":"https://api.github.com/users/eyeem/orgs","repos_url":"https://api.github.com/users/eyeem/repos","events_url":"https://api.github.com/users/eyeem/events{/privacy}","received_events_url":"https://api.github.com/users/eyeem/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eyeem/Operations","description":"A Swift framework inspired by WWDC 2015 Advanced NSOperations session.","fork":true,"url":"https://api.github.com/repos/eyeem/Operations","forks_url":"https://api.github.com/repos/eyeem/Operations/forks","keys_url":"https://api.github.com/repos/eyeem/Operations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eyeem/Operations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eyeem/Operations/teams","hooks_url":"https://api.github.com/repos/eyeem/Operations/hooks","issue_events_url":"https://api.github.com/repos/eyeem/Operations/issues/events{/number}","events_url":"https://api.github.com/repos/eyeem/Operations/events","assignees_url":"https://api.github.com/repos/eyeem/Operations/assignees{/user}","branches_url":"https://api.github.com/repos/eyeem/Operations/branches{/branch}","tags_url":"https://api.github.com/repos/eyeem/Operations/tags","blobs_url":"https://api.github.com/repos/eyeem/Operations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eyeem/Operations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eyeem/Operations/git/refs{/sha}","trees_url":"https://api.github.com/repos/eyeem/Operations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eyeem/Operations/statuses/{sha}","languages_url":"https://api.github.com/repos/eyeem/Operations/languages","stargazers_url":"https://api.github.com/repos/eyeem/Operations/stargazers","contributors_url":"https://api.github.com/repos/eyeem/Operations/contributors","subscribers_url":"https://api.github.com/repos/eyeem/Operations/subscribers","subscription_url":"https://api.github.com/repos/eyeem/Operations/subscription","commits_url":"https://api.github.com/repos/eyeem/Operations/commits{/sha}","git_commits_url":"https://api.github.com/repos/eyeem/Operations/git/commits{/sha}","comments_url":"https://api.github.com/repos/eyeem/Operations/comments{/number}","issue_comment_url":"https://api.github.com/repos/eyeem/Operations/issues/comments{/number}","contents_url":"https://api.github.com/repos/eyeem/Operations/contents/{+path}","compare_url":"https://api.github.com/repos/eyeem/Operations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eyeem/Operations/merges","archive_url":"https://api.github.com/repos/eyeem/Operations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eyeem/Operations/downloads","issues_url":"https://api.github.com/repos/eyeem/Operations/issues{/number}","pulls_url":"https://api.github.com/repos/eyeem/Operations/pulls{/number}","milestones_url":"https://api.github.com/repos/eyeem/Operations/milestones{/number}","notifications_url":"https://api.github.com/repos/eyeem/Operations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eyeem/Operations/labels{/name}","releases_url":"https://api.github.com/repos/eyeem/Operations/releases{/id}","deployments_url":"https://api.github.com/repos/eyeem/Operations/deployments","created_at":"2016-02-17T10:41:57Z","updated_at":"2016-02-17T10:41:58Z","pushed_at":"2016-03-02T11:04:34Z","git_url":"git://github.com/eyeem/Operations.git","ssh_url":"git@github.com:eyeem/Operations.git","clone_url":"https://github.com/eyeem/Operations.git","svn_url":"https://github.com/eyeem/Operations","homepage":"","size":2951,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"development"}},"base":{"label":"danthorpe:development","ref":"development","sha":"566bc2841ae54bdbe36577a75e7ca647e01eb49d","user":{"login":"danthorpe","id":309420,"avatar_url":"https://avatars.githubusercontent.com/u/309420?v=3","gravatar_id":"","url":"https://api.github.com/users/danthorpe","html_url":"https://github.com/danthorpe","followers_url":"https://api.github.com/users/danthorpe/followers","following_url":"https://api.github.com/users/danthorpe/following{/other_user}","gists_url":"https://api.github.com/users/danthorpe/gists{/gist_id}","starred_url":"https://api.github.com/users/danthorpe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danthorpe/subscriptions","organizations_url":"https://api.github.com/users/danthorpe/orgs","repos_url":"https://api.github.com/users/danthorpe/repos","events_url":"https://api.github.com/users/danthorpe/events{/privacy}","received_events_url":"https://api.github.com/users/danthorpe/received_events","type":"User","site_admin":false},"repo":{"id":38116404,"name":"Operations","full_name":"danthorpe/Operations","owner":{"login":"danthorpe","id":309420,"avatar_url":"https://avatars.githubusercontent.com/u/309420?v=3","gravatar_id":"","url":"https://api.github.com/users/danthorpe","html_url":"https://github.com/danthorpe","followers_url":"https://api.github.com/users/danthorpe/followers","following_url":"https://api.github.com/users/danthorpe/following{/other_user}","gists_url":"https://api.github.com/users/danthorpe/gists{/gist_id}","starred_url":"https://api.github.com/users/danthorpe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danthorpe/subscriptions","organizations_url":"https://api.github.com/users/danthorpe/orgs","repos_url":"https://api.github.com/users/danthorpe/repos","events_url":"https://api.github.com/users/danthorpe/events{/privacy}","received_events_url":"https://api.github.com/users/danthorpe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danthorpe/Operations","description":"A Swift framework inspired by WWDC 2015 Advanced NSOperations session.","fork":false,"url":"https://api.github.com/repos/danthorpe/Operations","forks_url":"https://api.github.com/repos/danthorpe/Operations/forks","keys_url":"https://api.github.com/repos/danthorpe/Operations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danthorpe/Operations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danthorpe/Operations/teams","hooks_url":"https://api.github.com/repos/danthorpe/Operations/hooks","issue_events_url":"https://api.github.com/repos/danthorpe/Operations/issues/events{/number}","events_url":"https://api.github.com/repos/danthorpe/Operations/events","assignees_url":"https://api.github.com/repos/danthorpe/Operations/assignees{/user}","branches_url":"https://api.github.com/repos/danthorpe/Operations/branches{/branch}","tags_url":"https://api.github.com/repos/danthorpe/Operations/tags","blobs_url":"https://api.github.com/repos/danthorpe/Operations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danthorpe/Operations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danthorpe/Operations/git/refs{/sha}","trees_url":"https://api.github.com/repos/danthorpe/Operations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danthorpe/Operations/statuses/{sha}","languages_url":"https://api.github.com/repos/danthorpe/Operations/languages","stargazers_url":"https://api.github.com/repos/danthorpe/Operations/stargazers","contributors_url":"https://api.github.com/repos/danthorpe/Operations/contributors","subscribers_url":"https://api.github.com/repos/danthorpe/Operations/subscribers","subscription_url":"https://api.github.com/repos/danthorpe/Operations/subscription","commits_url":"https://api.github.com/repos/danthorpe/Operations/commits{/sha}","git_commits_url":"https://api.github.com/repos/danthorpe/Operations/git/commits{/sha}","comments_url":"https://api.github.com/repos/danthorpe/Operations/comments{/number}","issue_comment_url":"https://api.github.com/repos/danthorpe/Operations/issues/comments{/number}","contents_url":"https://api.github.com/repos/danthorpe/Operations/contents/{+path}","compare_url":"https://api.github.com/repos/danthorpe/Operations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danthorpe/Operations/merges","archive_url":"https://api.github.com/repos/danthorpe/Operations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danthorpe/Operations/downloads","issues_url":"https://api.github.com/repos/danthorpe/Operations/issues{/number}","pulls_url":"https://api.github.com/repos/danthorpe/Operations/pulls{/number}","milestones_url":"https://api.github.com/repos/danthorpe/Operations/milestones{/number}","notifications_url":"https://api.github.com/repos/danthorpe/Operations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danthorpe/Operations/labels{/name}","releases_url":"https://api.github.com/repos/danthorpe/Operations/releases{/id}","deployments_url":"https://api.github.com/repos/danthorpe/Operations/deployments","created_at":"2015-06-26T14:44:38Z","updated_at":"2016-03-02T08:32:32Z","pushed_at":"2016-03-02T11:03:52Z","git_url":"git://github.com/danthorpe/Operations.git","ssh_url":"git@github.com:danthorpe/Operations.git","clone_url":"https://github.com/danthorpe/Operations.git","svn_url":"https://github.com/danthorpe/Operations","homepage":"","size":3158,"stargazers_count":172,"watchers_count":172,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":14,"forks":20,"open_issues":14,"watchers":172,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/danthorpe/Operations/pulls/208"},"html":{"href":"https://github.com/danthorpe/Operations/pull/208"},"issue":{"href":"https://api.github.com/repos/danthorpe/Operations/issues/208"},"comments":{"href":"https://api.github.com/repos/danthorpe/Operations/issues/208/comments"},"review_comments":{"href":"https://api.github.com/repos/danthorpe/Operations/pulls/208/comments"},"review_comment":{"href":"https://api.github.com/repos/danthorpe/Operations/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/danthorpe/Operations/pulls/208/commits"},"statuses":{"href":"https://api.github.com/repos/danthorpe/Operations/statuses/44c7bb478815c7ebcd1d6e31685aa8e65cc55b73"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":1,"review_comments":0,"commits":1,"additions":1,"deletions":5,"changed_files":1}}