{"action":"created","comment":{"url":"https://api.github.com/repos/octokit/octokit.net/pulls/comments/22404229","id":22404229,"diff_hunk":"@@ -351,6 +351,19 @@\n     <Compile Include=\"Models\\Response\\ThreadSubscription.cs\" />\n     <Compile Include=\"Models\\Request\\MarkAsReadRequest.cs\" />\n     <Compile Include=\"Models\\Request\\NewThreadSubscription.cs\" />\n+    <Compile Include=\"Clients\\IRepositoryContentsClient.cs\" />\n+    <Compile Include=\"Clients\\RepositoryContentsClient.cs\" />\n+    <Compile Include=\"Models\\Response\\DirectoryContent.cs\" />\n+    <Compile Include=\"Models\\Request\\CreateFileRequest.cs\" />\n+    <Compile Include=\"Models\\Request\\Signature.cs\" />\n+    <Compile Include=\"Helpers\\SerializeAsBase64Attribute.cs\" />\n+    <Compile Include=\"Models\\Response\\ContentType.cs\" />\n+    <Compile Include=\"Models\\Response\\RepositoryContent.cs\" />\n+    <Compile Include=\"Models\\Response\\RepositoryContentChangeSet.cs\" />\n+    <Compile Include=\"Models\\Response\\CommitContent.cs\" />\n+    <Compile Include=\"Models\\Response\\SignatureResponse.cs\" />\n+    <Compile Include=\"Helpers\\PropertyOrField.cs\" />\n   </ItemGroup>\n   <Import Project=\"$(MSBuildExtensionsPath)\\Xamarin\\iOS\\Xamarin.MonoTouch.CSharp.targets\" />\n+  <Import Project=\"$(MSBuildBinPath)\\Microsoft.CSharp.targets\" />","path":"Octokit/Octokit-Monotouch.csproj","position":18,"original_position":18,"commit_id":"76a4040f69968d5d5294f8fc39afe2f38aab7ef1","original_commit_id":"76a4040f69968d5d5294f8fc39afe2f38aab7ef1","user":{"login":"shiftkey","id":359239,"avatar_url":"https://avatars.githubusercontent.com/u/359239?v=3","gravatar_id":"","url":"https://api.github.com/users/shiftkey","html_url":"https://github.com/shiftkey","followers_url":"https://api.github.com/users/shiftkey/followers","following_url":"https://api.github.com/users/shiftkey/following{/other_user}","gists_url":"https://api.github.com/users/shiftkey/gists{/gist_id}","starred_url":"https://api.github.com/users/shiftkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shiftkey/subscriptions","organizations_url":"https://api.github.com/users/shiftkey/orgs","repos_url":"https://api.github.com/users/shiftkey/repos","events_url":"https://api.github.com/users/shiftkey/events{/privacy}","received_events_url":"https://api.github.com/users/shiftkey/received_events","type":"User","site_admin":true},"body":"Urgh, I need to renew my Xamarin license and ensure everything still builds there...","created_at":"2015-01-02T04:19:29Z","updated_at":"2015-01-02T04:19:29Z","html_url":"https://github.com/octokit/octokit.net/pull/649#discussion_r22404229","pull_request_url":"https://api.github.com/repos/octokit/octokit.net/pulls/649","_links":{"self":{"href":"https://api.github.com/repos/octokit/octokit.net/pulls/comments/22404229"},"html":{"href":"https://github.com/octokit/octokit.net/pull/649#discussion_r22404229"},"pull_request":{"href":"https://api.github.com/repos/octokit/octokit.net/pulls/649"}}},"pull_request":{"url":"https://api.github.com/repos/octokit/octokit.net/pulls/649","id":26713136,"html_url":"https://github.com/octokit/octokit.net/pull/649","diff_url":"https://github.com/octokit/octokit.net/pull/649.diff","patch_url":"https://github.com/octokit/octokit.net/pull/649.patch","issue_url":"https://api.github.com/repos/octokit/octokit.net/issues/649","number":649,"state":"open","locked":false,"title":"Repository Contents API","user":{"login":"Haacked","id":19977,"avatar_url":"https://avatars.githubusercontent.com/u/19977?v=3","gravatar_id":"","url":"https://api.github.com/users/Haacked","html_url":"https://github.com/Haacked","followers_url":"https://api.github.com/users/Haacked/followers","following_url":"https://api.github.com/users/Haacked/following{/other_user}","gists_url":"https://api.github.com/users/Haacked/gists{/gist_id}","starred_url":"https://api.github.com/users/Haacked/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Haacked/subscriptions","organizations_url":"https://api.github.com/users/Haacked/orgs","repos_url":"https://api.github.com/users/Haacked/repos","events_url":"https://api.github.com/users/Haacked/events{/privacy}","received_events_url":"https://api.github.com/users/Haacked/received_events","type":"User","site_admin":true},"body":"This incorporates and supersedes #434 \r\n\r\nI took a slightly different approach. In the interest of keeping close to the API, there's only one method called `GetContents` that maps to the [\"Get contents\" API](https://developer.github.com/v3/repos/contents/#get-contents). I was able to accomplish this by changing the serializer a bit. When it's trying to deserialize a JSON object into an `IEnumerable<T>` but the JSON text is clearly a `T` and not an array, I simply wrap the json text with square brackets turning it into an array of one item and then deserialize it.\r\n\r\nThe other bit I had to do is when creating content, the text of the content needs to be base64 encoded. Also, when requesting content, the data is base64 encoded. So I changed the serializer to handle this transparently by simply applying the `SerializeAsBase64` attribute. So the consumer of the client doesn't have to worry about this.","created_at":"2014-12-31T02:30:57Z","updated_at":"2015-01-02T04:19:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3a9042dd6cf8c0d56066060bbf8b6e99151ab482","assignee":{"login":"shiftkey","id":359239,"avatar_url":"https://avatars.githubusercontent.com/u/359239?v=3","gravatar_id":"","url":"https://api.github.com/users/shiftkey","html_url":"https://github.com/shiftkey","followers_url":"https://api.github.com/users/shiftkey/followers","following_url":"https://api.github.com/users/shiftkey/following{/other_user}","gists_url":"https://api.github.com/users/shiftkey/gists{/gist_id}","starred_url":"https://api.github.com/users/shiftkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shiftkey/subscriptions","organizations_url":"https://api.github.com/users/shiftkey/orgs","repos_url":"https://api.github.com/users/shiftkey/repos","events_url":"https://api.github.com/users/shiftkey/events{/privacy}","received_events_url":"https://api.github.com/users/shiftkey/received_events","type":"User","site_admin":true},"milestone":null,"commits_url":"https://api.github.com/repos/octokit/octokit.net/pulls/649/commits","review_comments_url":"https://api.github.com/repos/octokit/octokit.net/pulls/649/comments","review_comment_url":"https://api.github.com/repos/octokit/octokit.net/pulls/comments/{number}","comments_url":"https://api.github.com/repos/octokit/octokit.net/issues/649/comments","statuses_url":"https://api.github.com/repos/octokit/octokit.net/statuses/76a4040f69968d5d5294f8fc39afe2f38aab7ef1","head":{"label":"octokit:haacked/repository-contents","ref":"haacked/repository-contents","sha":"76a4040f69968d5d5294f8fc39afe2f38aab7ef1","user":{"login":"octokit","id":3430433,"avatar_url":"https://avatars.githubusercontent.com/u/3430433?v=3","gravatar_id":"","url":"https://api.github.com/users/octokit","html_url":"https://github.com/octokit","followers_url":"https://api.github.com/users/octokit/followers","following_url":"https://api.github.com/users/octokit/following{/other_user}","gists_url":"https://api.github.com/users/octokit/gists{/gist_id}","starred_url":"https://api.github.com/users/octokit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octokit/subscriptions","organizations_url":"https://api.github.com/users/octokit/orgs","repos_url":"https://api.github.com/users/octokit/repos","events_url":"https://api.github.com/users/octokit/events{/privacy}","received_events_url":"https://api.github.com/users/octokit/received_events","type":"Organization","site_admin":false},"repo":{"id":7528679,"name":"octokit.net","full_name":"octokit/octokit.net","owner":{"login":"octokit","id":3430433,"avatar_url":"https://avatars.githubusercontent.com/u/3430433?v=3","gravatar_id":"","url":"https://api.github.com/users/octokit","html_url":"https://github.com/octokit","followers_url":"https://api.github.com/users/octokit/followers","following_url":"https://api.github.com/users/octokit/following{/other_user}","gists_url":"https://api.github.com/users/octokit/gists{/gist_id}","starred_url":"https://api.github.com/users/octokit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octokit/subscriptions","organizations_url":"https://api.github.com/users/octokit/orgs","repos_url":"https://api.github.com/users/octokit/repos","events_url":"https://api.github.com/users/octokit/events{/privacy}","received_events_url":"https://api.github.com/users/octokit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/octokit/octokit.net","description":"A GitHub API client library for .NET ","fork":false,"url":"https://api.github.com/repos/octokit/octokit.net","forks_url":"https://api.github.com/repos/octokit/octokit.net/forks","keys_url":"https://api.github.com/repos/octokit/octokit.net/keys{/key_id}","collaborators_url":"https://api.github.com/repos/octokit/octokit.net/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/octokit/octokit.net/teams","hooks_url":"https://api.github.com/repos/octokit/octokit.net/hooks","issue_events_url":"https://api.github.com/repos/octokit/octokit.net/issues/events{/number}","events_url":"https://api.github.com/repos/octokit/octokit.net/events","assignees_url":"https://api.github.com/repos/octokit/octokit.net/assignees{/user}","branches_url":"https://api.github.com/repos/octokit/octokit.net/branches{/branch}","tags_url":"https://api.github.com/repos/octokit/octokit.net/tags","blobs_url":"https://api.github.com/repos/octokit/octokit.net/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/octokit/octokit.net/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/octokit/octokit.net/git/refs{/sha}","trees_url":"https://api.github.com/repos/octokit/octokit.net/git/trees{/sha}","statuses_url":"https://api.github.com/repos/octokit/octokit.net/statuses/{sha}","languages_url":"https://api.github.com/repos/octokit/octokit.net/languages","stargazers_url":"https://api.github.com/repos/octokit/octokit.net/stargazers","contributors_url":"https://api.github.com/repos/octokit/octokit.net/contributors","subscribers_url":"https://api.github.com/repos/octokit/octokit.net/subscribers","subscription_url":"https://api.github.com/repos/octokit/octokit.net/subscription","commits_url":"https://api.github.com/repos/octokit/octokit.net/commits{/sha}","git_commits_url":"https://api.github.com/repos/octokit/octokit.net/git/commits{/sha}","comments_url":"https://api.github.com/repos/octokit/octokit.net/comments{/number}","issue_comment_url":"https://api.github.com/repos/octokit/octokit.net/issues/comments/{number}","contents_url":"https://api.github.com/repos/octokit/octokit.net/contents/{+path}","compare_url":"https://api.github.com/repos/octokit/octokit.net/compare/{base}...{head}","merges_url":"https://api.github.com/repos/octokit/octokit.net/merges","archive_url":"https://api.github.com/repos/octokit/octokit.net/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/octokit/octokit.net/downloads","issues_url":"https://api.github.com/repos/octokit/octokit.net/issues{/number}","pulls_url":"https://api.github.com/repos/octokit/octokit.net/pulls{/number}","milestones_url":"https://api.github.com/repos/octokit/octokit.net/milestones{/number}","notifications_url":"https://api.github.com/repos/octokit/octokit.net/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/octokit/octokit.net/labels{/name}","releases_url":"https://api.github.com/repos/octokit/octokit.net/releases{/id}","created_at":"2013-01-09T20:48:45Z","updated_at":"2015-01-02T03:19:56Z","pushed_at":"2015-01-02T03:52:44Z","git_url":"git://github.com/octokit/octokit.net.git","ssh_url":"git@github.com:octokit/octokit.net.git","clone_url":"https://github.com/octokit/octokit.net.git","svn_url":"https://github.com/octokit/octokit.net","homepage":null,"size":62596,"stargazers_count":568,"watchers_count":568,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":232,"mirror_url":null,"open_issues_count":70,"forks":232,"open_issues":70,"watchers":568,"default_branch":"master"}},"base":{"label":"octokit:master","ref":"master","sha":"267d0b840bce3d0864ec6030410aef7159d6cbb3","user":{"login":"octokit","id":3430433,"avatar_url":"https://avatars.githubusercontent.com/u/3430433?v=3","gravatar_id":"","url":"https://api.github.com/users/octokit","html_url":"https://github.com/octokit","followers_url":"https://api.github.com/users/octokit/followers","following_url":"https://api.github.com/users/octokit/following{/other_user}","gists_url":"https://api.github.com/users/octokit/gists{/gist_id}","starred_url":"https://api.github.com/users/octokit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octokit/subscriptions","organizations_url":"https://api.github.com/users/octokit/orgs","repos_url":"https://api.github.com/users/octokit/repos","events_url":"https://api.github.com/users/octokit/events{/privacy}","received_events_url":"https://api.github.com/users/octokit/received_events","type":"Organization","site_admin":false},"repo":{"id":7528679,"name":"octokit.net","full_name":"octokit/octokit.net","owner":{"login":"octokit","id":3430433,"avatar_url":"https://avatars.githubusercontent.com/u/3430433?v=3","gravatar_id":"","url":"https://api.github.com/users/octokit","html_url":"https://github.com/octokit","followers_url":"https://api.github.com/users/octokit/followers","following_url":"https://api.github.com/users/octokit/following{/other_user}","gists_url":"https://api.github.com/users/octokit/gists{/gist_id}","starred_url":"https://api.github.com/users/octokit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octokit/subscriptions","organizations_url":"https://api.github.com/users/octokit/orgs","repos_url":"https://api.github.com/users/octokit/repos","events_url":"https://api.github.com/users/octokit/events{/privacy}","received_events_url":"https://api.github.com/users/octokit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/octokit/octokit.net","description":"A GitHub API client library for .NET ","fork":false,"url":"https://api.github.com/repos/octokit/octokit.net","forks_url":"https://api.github.com/repos/octokit/octokit.net/forks","keys_url":"https://api.github.com/repos/octokit/octokit.net/keys{/key_id}","collaborators_url":"https://api.github.com/repos/octokit/octokit.net/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/octokit/octokit.net/teams","hooks_url":"https://api.github.com/repos/octokit/octokit.net/hooks","issue_events_url":"https://api.github.com/repos/octokit/octokit.net/issues/events{/number}","events_url":"https://api.github.com/repos/octokit/octokit.net/events","assignees_url":"https://api.github.com/repos/octokit/octokit.net/assignees{/user}","branches_url":"https://api.github.com/repos/octokit/octokit.net/branches{/branch}","tags_url":"https://api.github.com/repos/octokit/octokit.net/tags","blobs_url":"https://api.github.com/repos/octokit/octokit.net/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/octokit/octokit.net/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/octokit/octokit.net/git/refs{/sha}","trees_url":"https://api.github.com/repos/octokit/octokit.net/git/trees{/sha}","statuses_url":"https://api.github.com/repos/octokit/octokit.net/statuses/{sha}","languages_url":"https://api.github.com/repos/octokit/octokit.net/languages","stargazers_url":"https://api.github.com/repos/octokit/octokit.net/stargazers","contributors_url":"https://api.github.com/repos/octokit/octokit.net/contributors","subscribers_url":"https://api.github.com/repos/octokit/octokit.net/subscribers","subscription_url":"https://api.github.com/repos/octokit/octokit.net/subscription","commits_url":"https://api.github.com/repos/octokit/octokit.net/commits{/sha}","git_commits_url":"https://api.github.com/repos/octokit/octokit.net/git/commits{/sha}","comments_url":"https://api.github.com/repos/octokit/octokit.net/comments{/number}","issue_comment_url":"https://api.github.com/repos/octokit/octokit.net/issues/comments/{number}","contents_url":"https://api.github.com/repos/octokit/octokit.net/contents/{+path}","compare_url":"https://api.github.com/repos/octokit/octokit.net/compare/{base}...{head}","merges_url":"https://api.github.com/repos/octokit/octokit.net/merges","archive_url":"https://api.github.com/repos/octokit/octokit.net/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/octokit/octokit.net/downloads","issues_url":"https://api.github.com/repos/octokit/octokit.net/issues{/number}","pulls_url":"https://api.github.com/repos/octokit/octokit.net/pulls{/number}","milestones_url":"https://api.github.com/repos/octokit/octokit.net/milestones{/number}","notifications_url":"https://api.github.com/repos/octokit/octokit.net/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/octokit/octokit.net/labels{/name}","releases_url":"https://api.github.com/repos/octokit/octokit.net/releases{/id}","created_at":"2013-01-09T20:48:45Z","updated_at":"2015-01-02T03:19:56Z","pushed_at":"2015-01-02T03:52:44Z","git_url":"git://github.com/octokit/octokit.net.git","ssh_url":"git@github.com:octokit/octokit.net.git","clone_url":"https://github.com/octokit/octokit.net.git","svn_url":"https://github.com/octokit/octokit.net","homepage":null,"size":62596,"stargazers_count":568,"watchers_count":568,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":232,"mirror_url":null,"open_issues_count":70,"forks":232,"open_issues":70,"watchers":568,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/octokit/octokit.net/pulls/649"},"html":{"href":"https://github.com/octokit/octokit.net/pull/649"},"issue":{"href":"https://api.github.com/repos/octokit/octokit.net/issues/649"},"comments":{"href":"https://api.github.com/repos/octokit/octokit.net/issues/649/comments"},"review_comments":{"href":"https://api.github.com/repos/octokit/octokit.net/pulls/649/comments"},"review_comment":{"href":"https://api.github.com/repos/octokit/octokit.net/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/octokit/octokit.net/pulls/649/commits"},"statuses":{"href":"https://api.github.com/repos/octokit/octokit.net/statuses/76a4040f69968d5d5294f8fc39afe2f38aab7ef1"}}}}