{"action":"created","comment":{"url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/pulls/comments/64232586","id":64232586,"diff_hunk":"@@ -0,0 +1,58 @@\n+// Copyright (c) 2016 Lightricks. All rights reserved.\n+// Created by codesinc.\n+\n+#import \"Queue.h\"\n+\n+NS_ASSUME_NONNULL_BEGIN\n+\n+@interface Queue()\n+\n+/// Internally used collection holding objects of this instance.\n+@property (strong, nonatomic, nullable) NSMutableArray<id> *elements;\n+\n+// Capacity of queue.\n+@property (nonatomic) NSUInteger capacity;\n+\n+@end\n+\n+@implementation Queue\n+\n+#pragma mark -\n+#pragma mark Initialization\n+#pragma mark -\n+\n+- (instancetype)initWithCapacity:(NSUInteger)capacity {\n+  if (self = [super init]) {\n+    self.elements = [NSMutableArray arrayWithCapacity:capacity];\n+    _capacity = capacity;\n+  }\n+  return self;\n+}\n+\n+#pragma mark -\n+#pragma mark Dataset operations\n+#pragma mark -\n+\n+- (NSUInteger)count {\n+  return self.elements.count;\n+}\n+\n+- (void)addObject:(id)object {\n+  assert(object);\n+  assert(self.count <= self.capacity);\n+  NSUInteger index = [self.elements indexOfObject:object];\n+  if (index != NSNotFound) {\n+    [self.elements removeObjectAtIndex:index];\n+  } else if (self.count == self.capacity) {\n+    [self.elements removeLastObject];\n+  }\n+  [self.elements insertObject:object atIndex:0];\n+}\n+\n+- (NSArray<id> *)objects {","path":"FlickrPhotos/FlickrPhotos/Model/RecentViewed/Queue.m","position":52,"original_position":52,"commit_id":"d2f0290bad20c577c6d221be26cccf43ce6a08cf","original_commit_id":"d2f0290bad20c577c6d221be26cccf43ce6a08cf","user":{"login":"CodeBaseCamp","id":7971250,"avatar_url":"https://avatars.githubusercontent.com/u/7971250?v=3","gravatar_id":"","url":"https://api.github.com/users/CodeBaseCamp","html_url":"https://github.com/CodeBaseCamp","followers_url":"https://api.github.com/users/CodeBaseCamp/followers","following_url":"https://api.github.com/users/CodeBaseCamp/following{/other_user}","gists_url":"https://api.github.com/users/CodeBaseCamp/gists{/gist_id}","starred_url":"https://api.github.com/users/CodeBaseCamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CodeBaseCamp/subscriptions","organizations_url":"https://api.github.com/users/CodeBaseCamp/orgs","repos_url":"https://api.github.com/users/CodeBaseCamp/repos","events_url":"https://api.github.com/users/CodeBaseCamp/events{/privacy}","received_events_url":"https://api.github.com/users/CodeBaseCamp/received_events","type":"User","site_admin":false},"body":"`NSArray<id> *` -> `NSArray *`","created_at":"2016-05-23T14:31:45Z","updated_at":"2016-05-23T14:31:45Z","html_url":"https://github.com/CodeBaseCamp/FlickrNofar/pull/9#discussion_r64232586","pull_request_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/pulls/comments/64232586"},"html":{"href":"https://github.com/CodeBaseCamp/FlickrNofar/pull/9#discussion_r64232586"},"pull_request":{"href":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/pulls/9","id":69304121,"html_url":"https://github.com/CodeBaseCamp/FlickrNofar/pull/9","diff_url":"https://github.com/CodeBaseCamp/FlickrNofar/pull/9.diff","patch_url":"https://github.com/CodeBaseCamp/FlickrNofar/pull/9.patch","issue_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/issues/9","number":9,"state":"open","locked":false,"title":"UserDefaults: Initial commit.","user":{"login":"codesinc","id":17739846,"avatar_url":"https://avatars.githubusercontent.com/u/17739846?v=3","gravatar_id":"","url":"https://api.github.com/users/codesinc","html_url":"https://github.com/codesinc","followers_url":"https://api.github.com/users/codesinc/followers","following_url":"https://api.github.com/users/codesinc/following{/other_user}","gists_url":"https://api.github.com/users/codesinc/gists{/gist_id}","starred_url":"https://api.github.com/users/codesinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codesinc/subscriptions","organizations_url":"https://api.github.com/users/codesinc/orgs","repos_url":"https://api.github.com/users/codesinc/repos","events_url":"https://api.github.com/users/codesinc/events{/privacy}","received_events_url":"https://api.github.com/users/codesinc/received_events","type":"User","site_admin":false},"body":"This commit adds the UserDefaults and RecentViewed classes.\r\nUserDefaults is responsible of saving recent viewed photos.\r\nFlickrPhotosQueue is a data structure that implements queue.","created_at":"2016-05-09T07:18:14Z","updated_at":"2016-05-23T14:31:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b7f44c35beda062517087b033921ac42358ee6b5","assignee":{"login":"CodeBaseCamp","id":7971250,"avatar_url":"https://avatars.githubusercontent.com/u/7971250?v=3","gravatar_id":"","url":"https://api.github.com/users/CodeBaseCamp","html_url":"https://github.com/CodeBaseCamp","followers_url":"https://api.github.com/users/CodeBaseCamp/followers","following_url":"https://api.github.com/users/CodeBaseCamp/following{/other_user}","gists_url":"https://api.github.com/users/CodeBaseCamp/gists{/gist_id}","starred_url":"https://api.github.com/users/CodeBaseCamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CodeBaseCamp/subscriptions","organizations_url":"https://api.github.com/users/CodeBaseCamp/orgs","repos_url":"https://api.github.com/users/CodeBaseCamp/repos","events_url":"https://api.github.com/users/CodeBaseCamp/events{/privacy}","received_events_url":"https://api.github.com/users/CodeBaseCamp/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/pulls/9/commits","review_comments_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/pulls/9/comments","review_comment_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/issues/9/comments","statuses_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/statuses/d2f0290bad20c577c6d221be26cccf43ce6a08cf","head":{"label":"codesinc:feature/section-1","ref":"feature/section-1","sha":"d2f0290bad20c577c6d221be26cccf43ce6a08cf","user":{"login":"codesinc","id":17739846,"avatar_url":"https://avatars.githubusercontent.com/u/17739846?v=3","gravatar_id":"","url":"https://api.github.com/users/codesinc","html_url":"https://github.com/codesinc","followers_url":"https://api.github.com/users/codesinc/followers","following_url":"https://api.github.com/users/codesinc/following{/other_user}","gists_url":"https://api.github.com/users/codesinc/gists{/gist_id}","starred_url":"https://api.github.com/users/codesinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codesinc/subscriptions","organizations_url":"https://api.github.com/users/codesinc/orgs","repos_url":"https://api.github.com/users/codesinc/repos","events_url":"https://api.github.com/users/codesinc/events{/privacy}","received_events_url":"https://api.github.com/users/codesinc/received_events","type":"User","site_admin":false},"repo":{"id":55416920,"name":"FlickrNofar","full_name":"codesinc/FlickrNofar","owner":{"login":"codesinc","id":17739846,"avatar_url":"https://avatars.githubusercontent.com/u/17739846?v=3","gravatar_id":"","url":"https://api.github.com/users/codesinc","html_url":"https://github.com/codesinc","followers_url":"https://api.github.com/users/codesinc/followers","following_url":"https://api.github.com/users/codesinc/following{/other_user}","gists_url":"https://api.github.com/users/codesinc/gists{/gist_id}","starred_url":"https://api.github.com/users/codesinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codesinc/subscriptions","organizations_url":"https://api.github.com/users/codesinc/orgs","repos_url":"https://api.github.com/users/codesinc/repos","events_url":"https://api.github.com/users/codesinc/events{/privacy}","received_events_url":"https://api.github.com/users/codesinc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/codesinc/FlickrNofar","description":"","fork":true,"url":"https://api.github.com/repos/codesinc/FlickrNofar","forks_url":"https://api.github.com/repos/codesinc/FlickrNofar/forks","keys_url":"https://api.github.com/repos/codesinc/FlickrNofar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codesinc/FlickrNofar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codesinc/FlickrNofar/teams","hooks_url":"https://api.github.com/repos/codesinc/FlickrNofar/hooks","issue_events_url":"https://api.github.com/repos/codesinc/FlickrNofar/issues/events{/number}","events_url":"https://api.github.com/repos/codesinc/FlickrNofar/events","assignees_url":"https://api.github.com/repos/codesinc/FlickrNofar/assignees{/user}","branches_url":"https://api.github.com/repos/codesinc/FlickrNofar/branches{/branch}","tags_url":"https://api.github.com/repos/codesinc/FlickrNofar/tags","blobs_url":"https://api.github.com/repos/codesinc/FlickrNofar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codesinc/FlickrNofar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codesinc/FlickrNofar/git/refs{/sha}","trees_url":"https://api.github.com/repos/codesinc/FlickrNofar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codesinc/FlickrNofar/statuses/{sha}","languages_url":"https://api.github.com/repos/codesinc/FlickrNofar/languages","stargazers_url":"https://api.github.com/repos/codesinc/FlickrNofar/stargazers","contributors_url":"https://api.github.com/repos/codesinc/FlickrNofar/contributors","subscribers_url":"https://api.github.com/repos/codesinc/FlickrNofar/subscribers","subscription_url":"https://api.github.com/repos/codesinc/FlickrNofar/subscription","commits_url":"https://api.github.com/repos/codesinc/FlickrNofar/commits{/sha}","git_commits_url":"https://api.github.com/repos/codesinc/FlickrNofar/git/commits{/sha}","comments_url":"https://api.github.com/repos/codesinc/FlickrNofar/comments{/number}","issue_comment_url":"https://api.github.com/repos/codesinc/FlickrNofar/issues/comments{/number}","contents_url":"https://api.github.com/repos/codesinc/FlickrNofar/contents/{+path}","compare_url":"https://api.github.com/repos/codesinc/FlickrNofar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codesinc/FlickrNofar/merges","archive_url":"https://api.github.com/repos/codesinc/FlickrNofar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codesinc/FlickrNofar/downloads","issues_url":"https://api.github.com/repos/codesinc/FlickrNofar/issues{/number}","pulls_url":"https://api.github.com/repos/codesinc/FlickrNofar/pulls{/number}","milestones_url":"https://api.github.com/repos/codesinc/FlickrNofar/milestones{/number}","notifications_url":"https://api.github.com/repos/codesinc/FlickrNofar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codesinc/FlickrNofar/labels{/name}","releases_url":"https://api.github.com/repos/codesinc/FlickrNofar/releases{/id}","deployments_url":"https://api.github.com/repos/codesinc/FlickrNofar/deployments","created_at":"2016-04-04T14:15:34Z","updated_at":"2016-05-05T14:46:00Z","pushed_at":"2016-05-22T08:56:39Z","git_url":"git://github.com/codesinc/FlickrNofar.git","ssh_url":"git@github.com:codesinc/FlickrNofar.git","clone_url":"https://github.com/codesinc/FlickrNofar.git","svn_url":"https://github.com/codesinc/FlickrNofar","homepage":null,"size":42,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","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":"master"}},"base":{"label":"CodeBaseCamp:develop","ref":"develop","sha":"e0dc20557d79fec2fb99c319e71a166926cd79a8","user":{"login":"CodeBaseCamp","id":7971250,"avatar_url":"https://avatars.githubusercontent.com/u/7971250?v=3","gravatar_id":"","url":"https://api.github.com/users/CodeBaseCamp","html_url":"https://github.com/CodeBaseCamp","followers_url":"https://api.github.com/users/CodeBaseCamp/followers","following_url":"https://api.github.com/users/CodeBaseCamp/following{/other_user}","gists_url":"https://api.github.com/users/CodeBaseCamp/gists{/gist_id}","starred_url":"https://api.github.com/users/CodeBaseCamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CodeBaseCamp/subscriptions","organizations_url":"https://api.github.com/users/CodeBaseCamp/orgs","repos_url":"https://api.github.com/users/CodeBaseCamp/repos","events_url":"https://api.github.com/users/CodeBaseCamp/events{/privacy}","received_events_url":"https://api.github.com/users/CodeBaseCamp/received_events","type":"User","site_admin":false},"repo":{"id":55416537,"name":"FlickrNofar","full_name":"CodeBaseCamp/FlickrNofar","owner":{"login":"CodeBaseCamp","id":7971250,"avatar_url":"https://avatars.githubusercontent.com/u/7971250?v=3","gravatar_id":"","url":"https://api.github.com/users/CodeBaseCamp","html_url":"https://github.com/CodeBaseCamp","followers_url":"https://api.github.com/users/CodeBaseCamp/followers","following_url":"https://api.github.com/users/CodeBaseCamp/following{/other_user}","gists_url":"https://api.github.com/users/CodeBaseCamp/gists{/gist_id}","starred_url":"https://api.github.com/users/CodeBaseCamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CodeBaseCamp/subscriptions","organizations_url":"https://api.github.com/users/CodeBaseCamp/orgs","repos_url":"https://api.github.com/users/CodeBaseCamp/repos","events_url":"https://api.github.com/users/CodeBaseCamp/events{/privacy}","received_events_url":"https://api.github.com/users/CodeBaseCamp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CodeBaseCamp/FlickrNofar","description":"","fork":false,"url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar","forks_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/forks","keys_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/teams","hooks_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/hooks","issue_events_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/issues/events{/number}","events_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/events","assignees_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/assignees{/user}","branches_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/branches{/branch}","tags_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/tags","blobs_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/git/refs{/sha}","trees_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/statuses/{sha}","languages_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/languages","stargazers_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/stargazers","contributors_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/contributors","subscribers_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/subscribers","subscription_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/subscription","commits_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/commits{/sha}","git_commits_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/git/commits{/sha}","comments_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/comments{/number}","issue_comment_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/issues/comments{/number}","contents_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/contents/{+path}","compare_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/merges","archive_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/downloads","issues_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/issues{/number}","pulls_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/pulls{/number}","milestones_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/milestones{/number}","notifications_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/labels{/name}","releases_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/releases{/id}","deployments_url":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/deployments","created_at":"2016-04-04T14:11:12Z","updated_at":"2016-04-11T11:24:44Z","pushed_at":"2016-05-22T08:56:39Z","git_url":"git://github.com/CodeBaseCamp/FlickrNofar.git","ssh_url":"git@github.com:CodeBaseCamp/FlickrNofar.git","clone_url":"https://github.com/CodeBaseCamp/FlickrNofar.git","svn_url":"https://github.com/CodeBaseCamp/FlickrNofar","homepage":null,"size":131,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/pulls/9"},"html":{"href":"https://github.com/CodeBaseCamp/FlickrNofar/pull/9"},"issue":{"href":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/issues/9"},"comments":{"href":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/CodeBaseCamp/FlickrNofar/statuses/d2f0290bad20c577c6d221be26cccf43ce6a08cf"}}}}
{"actor":{"display_login":"CodeBaseCamp"}}