{"action":"created","comment":{"url":"https://api.github.com/repos/HubTurbo/addressbook/pulls/comments/65145474","id":65145474,"diff_hunk":"@@ -0,0 +1,394 @@\n+package address.sync;\n+\n+import address.model.datatypes.Tag;\n+import address.model.datatypes.Person;\n+import address.sync.model.CloudTag;\n+import address.sync.model.CloudPerson;\n+import address.util.JsonUtil;\n+import java.io.*;\n+import java.time.LocalDateTime;\n+import java.util.*;\n+\n+/**\n+ * Emulates the local cloud service\n+ *\n+ * This component is responsible for providing a high-level API for communication with the cloud,\n+ * as well as the reformatting the cloud's response into a format understood by the local logic\n+ */\n+public class CloudService implements ICloudService {\n+    private static final int RESOURCES_PER_PAGE = 100;\n+\n+    private final CloudSimulator cloud;\n+\n+    public CloudService(boolean shouldSimulateUnreliableNetwork) {\n+        cloud = new CloudSimulator(shouldSimulateUnreliableNetwork);\n+    }\n+\n+    public static void main(String[] args) {\n+        CloudService test = new CloudService(false);\n+    }\n+\n+    public static boolean isValid(RawCloudResponse response) {\n+        switch (response.getResponseCode()) {\n+            case 200:\n+            case 201:\n+            case 202:\n+            case 203:\n+            case 204:\n+                return true;\n+            default:\n+                return false;\n+        }\n+    }\n+\n+    /**\n+     * Gets the list of persons for addressBookName\n+     *\n+     * Consumes 1 + floor(persons size/RESOURCES_PER_PAGE) API usage\n+     * @param addressBookName\n+     * @return wrapped response with list of persons\n+     * @throws IOException if content cannot be interpreted\n+     */\n+    @Override\n+    public ExtractedCloudResponse<List<Person>> getPersons(String addressBookName) throws IOException {\n+        RawCloudResponse cloudResponse = cloud.getPersons(addressBookName, RESOURCES_PER_PAGE);\n+        HashMap<String, Long> headerHashMap = getHashMapFromHeader(cloudResponse.getHeaders());\n+        if (!isValid(cloudResponse)) {\n+            return getResponseWithNoData(cloudResponse, headerHashMap);\n+        }\n+        List<CloudPerson> cloudPersons = getDataListFromBody(cloudResponse.getBody(), CloudPerson.class);\n+        return new ExtractedCloudResponse<>(cloudResponse.getResponseCode(), getRateLimitFromHeader(headerHashMap),\n+                                            getRateRemainingFromHeader(headerHashMap),\n+                                            getRateResetFromHeader(headerHashMap),\n+                                            convertToPersonList(cloudPersons));\n+    }\n+\n+    /**\n+     * Gets the list of tags for addressBookName\n+     *\n+     * Consumes 1 + floor(tags size/RESOURCES_PER_PAGE) API usage\n+     * @param addressBookName\n+     * @return wrapped response with list of tags\n+     * @throws IOException if content cannot be interpreted\n+     */\n+    @Override\n+    public ExtractedCloudResponse<List<Tag>> getTags(String addressBookName) throws IOException {\n+        RawCloudResponse cloudResponse = cloud.getTags(addressBookName, RESOURCES_PER_PAGE);\n+        HashMap<String, Long> headerHashMap = getHashMapFromHeader(cloudResponse.getHeaders());\n+        if (!isValid(cloudResponse)) {\n+            return getResponseWithNoData(cloudResponse, headerHashMap);\n+        }\n+        List<CloudTag> cloudTags = getDataListFromBody(cloudResponse.getBody(), CloudTag.class);\n+        return new ExtractedCloudResponse<>(cloudResponse.getResponseCode(), getRateLimitFromHeader(headerHashMap),\n+                                            getRateRemainingFromHeader(headerHashMap),\n+                                            getRateResetFromHeader(headerHashMap), convertToTagList(cloudTags));\n+    }\n+\n+    /**\n+     * Adds a person to the cloud\n+     *\n+     * Consumes 1 API usage\n+     *\n+     * @param addressBookName\n+     * @param newPerson\n+     * @return\n+     * @throws IOException if content cannot be interpreted\n+     */\n+    @Override\n+    public ExtractedCloudResponse<Person> createPerson(String addressBookName, Person newPerson) throws IOException {\n+        RawCloudResponse cloudResponse = cloud.createPerson(addressBookName, convertToCloudPerson(newPerson));\n+        HashMap<String, Long> headerHashMap = getHashMapFromHeader(cloudResponse.getHeaders());\n+        if (!isValid(cloudResponse)) {\n+            return getResponseWithNoData(cloudResponse, headerHashMap);\n+        }\n+        CloudPerson returnedPerson = getDataFromBody(cloudResponse.getBody(), CloudPerson.class);\n+        return new ExtractedCloudResponse<>(cloudResponse.getResponseCode(), getRateLimitFromHeader(headerHashMap),\n+                                            getRateRemainingFromHeader(headerHashMap),\n+                                            getRateResetFromHeader(headerHashMap), convertToPerson(returnedPerson));\n+    }\n+\n+    /**\n+     * Updates a person on the cloud\n+     *\n+     * Consumes 1 API usage\n+     *\n+     * @param addressBookName\n+     * @param oldFirstName\n+     * @param oldLastName\n+     * @param updatedPerson\n+     * @return\n+     * @throws IOException if content cannot be interpreted\n+     */\n+    @Override\n+    public ExtractedCloudResponse<Person> updatePerson(String addressBookName, String oldFirstName, String oldLastName, Person updatedPerson) throws IOException {\n+        RawCloudResponse cloudResponse = cloud.updatePerson(addressBookName, oldFirstName, oldLastName, convertToCloudPerson(updatedPerson));\n+        HashMap<String, Long> headerHashMap = getHashMapFromHeader(cloudResponse.getHeaders());\n+        if (!isValid(cloudResponse)) {\n+            return getResponseWithNoData(cloudResponse, headerHashMap);\n+        }\n+        CloudPerson returnedPerson = getDataFromBody(cloudResponse.getBody(), CloudPerson.class);\n+        return new ExtractedCloudResponse<>(cloudResponse.getResponseCode(), getRateLimitFromHeader(headerHashMap),\n+                                            getRateRemainingFromHeader(headerHashMap),\n+                                            getRateResetFromHeader(headerHashMap),\n+                                            convertToPerson(returnedPerson));\n+    }\n+\n+    /**\n+     * Deletes a person on the cloud\n+     *\n+     * Consumes 1 API usage\n+     *\n+     * @param addressBookName\n+     * @param firstName\n+     * @param lastName\n+     * @return\n+     * @throws IOException if content cannot be interpreted\n+     */\n+    @Override\n+    public ExtractedCloudResponse<Void> deletePerson(String addressBookName, String firstName, String lastName)\n+            throws IOException {\n+        RawCloudResponse cloudResponse = cloud.deletePerson(addressBookName, firstName, lastName);\n+        HashMap<String, Long> headerHashMap = getHashMapFromHeader(cloudResponse.getHeaders());\n+        if (!isValid(cloudResponse)) {\n+            return getResponseWithNoData(cloudResponse, headerHashMap);\n+        }\n+        return new ExtractedCloudResponse<>(cloudResponse.getResponseCode(), getRateLimitFromHeader(headerHashMap),\n+                                            getRateRemainingFromHeader(headerHashMap),\n+                                            getRateResetFromHeader(headerHashMap), null);\n+    }\n+\n+    /**\n+     * Creates a tag on the cloud\n+     *\n+     * Consumes 1 API usage\n+     *\n+     * @param addressBookName\n+     * @param tag\n+     * @return\n+     * @throws IOException if content cannot be interpreted\n+     */\n+    @Override\n+    public ExtractedCloudResponse<Tag> createTag(String addressBookName, Tag tag) throws IOException {\n+        RawCloudResponse cloudResponse = cloud.createTag(addressBookName, convertToCloudTag(tag));\n+        HashMap<String, Long> headerHashMap = getHashMapFromHeader(cloudResponse.getHeaders());\n+        if (!isValid(cloudResponse)) {\n+            return getResponseWithNoData(cloudResponse, headerHashMap);\n+        }\n+        CloudTag returnedTag = getDataFromBody(cloudResponse.getBody(), CloudTag.class);\n+        return new ExtractedCloudResponse<>(cloudResponse.getResponseCode(), getRateLimitFromHeader(headerHashMap),\n+                                            getRateRemainingFromHeader(headerHashMap),\n+                                            getRateResetFromHeader(headerHashMap), convertToTag(returnedTag));\n+    }\n+\n+    /**\n+     * Updates a tag on the cloud\n+     *\n+     * Consumes 1 API usage\n+     *\n+     * @param addressBookName\n+     * @param oldTagName\n+     * @param newTag\n+     * @return\n+     * @throws IOException if content cannot be interpreted\n+     */\n+    @Override\n+    public ExtractedCloudResponse<Tag> editTag(String addressBookName, String oldTagName, Tag newTag)\n+            throws IOException {\n+        RawCloudResponse cloudResponse = cloud.editTag(addressBookName, oldTagName, convertToCloudTag(newTag));\n+        HashMap<String, Long> headerHashMap = getHashMapFromHeader(cloudResponse.getHeaders());\n+        if (!isValid(cloudResponse)) {\n+            return getResponseWithNoData(cloudResponse, headerHashMap);\n+        }\n+        CloudTag returnedTag = getDataFromBody(cloudResponse.getBody(), CloudTag.class);\n+        return new ExtractedCloudResponse<>(cloudResponse.getResponseCode(), getRateLimitFromHeader(headerHashMap),\n+                                            getRateRemainingFromHeader(headerHashMap),\n+                                            getRateResetFromHeader(headerHashMap),\n+                                            convertToTag(returnedTag));\n+    }\n+\n+    /**\n+     * Deletes a tag on the cloud\n+     *\n+     * Consumes 1 API usage\n+     *\n+     * @param addressBookName\n+     * @param tagName\n+     * @return\n+     * @throws IOException if content cannot be interpreted\n+     */\n+    @Override\n+    public ExtractedCloudResponse<Void> deleteTag(String addressBookName, String tagName) throws IOException {\n+        RawCloudResponse cloudResponse = cloud.deleteTag(addressBookName, tagName);\n+        HashMap<String, Long> headerHashMap = getHashMapFromHeader(cloudResponse.getHeaders());\n+        if (!isValid(cloudResponse)) {\n+            return getResponseWithNoData(cloudResponse, headerHashMap);\n+        }\n+        return new ExtractedCloudResponse<>(cloudResponse.getResponseCode(), getRateLimitFromHeader(headerHashMap),\n+                                            getRateRemainingFromHeader(headerHashMap),\n+                                            getRateResetFromHeader(headerHashMap), null);\n+    }\n+\n+    /**\n+     * Gets the list of persons for addressBookName, which have been modified after a certain time\n+     *\n+     * Consumes 1 + floor(result size/RESOURCES_PER_PAGE) API usage\n+     * @param addressBookName\n+     * @return wrapped response with list of persons\n+     * @throws IOException if content cannot be interpreted\n+     */\n+    @Override\n+    public ExtractedCloudResponse<List<Person>> getUpdatedPersonsSince(String addressBookName, LocalDateTime time)\n+            throws IOException {\n+        RawCloudResponse cloudResponse = cloud.getUpdatedPersons(addressBookName, time.toString(), RESOURCES_PER_PAGE);\n+        HashMap<String, Long> headerHashMap = getHashMapFromHeader(cloudResponse.getHeaders());\n+        if (!isValid(cloudResponse)) {\n+            return getResponseWithNoData(cloudResponse, headerHashMap);\n+        }\n+        List<CloudPerson> cloudPersons = getDataListFromBody(cloudResponse.getBody(), CloudPerson.class);\n+        return new ExtractedCloudResponse<>(cloudResponse.getResponseCode(), getRateLimitFromHeader(headerHashMap),\n+                                            getRateRemainingFromHeader(headerHashMap),\n+                                            getRateResetFromHeader(headerHashMap), convertToPersonList(cloudPersons));\n+    }\n+\n+    /**\n+     * Returns the limit status information\n+     *\n+     * This does NOT consume API usage.\n+     *\n+     * @return\n+     * @throws IOException if content cannot be interpreted\n+     */\n+    @Override\n+    public ExtractedCloudResponse<RateLimitStatus> getLimitStatus() throws IOException {\n+        RawCloudResponse cloudResponse = cloud.getRateLimitStatus();\n+        HashMap<String, Long> headerHashMap = getHashMapFromHeader(cloudResponse.getHeaders());\n+        if (!isValid(cloudResponse)) {\n+            return getResponseWithNoData(cloudResponse, headerHashMap);\n+        }\n+        return new ExtractedCloudResponse<>(cloudResponse.getResponseCode(), getRateLimitFromHeader(headerHashMap),\n+                                            getRateRemainingFromHeader(headerHashMap),\n+                                            getRateResetFromHeader(headerHashMap), null);\n+    }\n+\n+    @Override\n+    public ExtractedCloudResponse<Void> createAddressBook(String addressBookName) throws IOException {\n+        RawCloudResponse cloudResponse = cloud.initializeAddressBook(addressBookName);\n+        HashMap<String, Long> headerHashMap = getHashMapFromHeader(cloudResponse.getHeaders());\n+        if (!isValid(cloudResponse)) {\n+            return getResponseWithNoData(cloudResponse, headerHashMap);\n+        }\n+        return new ExtractedCloudResponse<>(cloudResponse.getResponseCode(), getRateLimitFromHeader(headerHashMap),\n+                                            getRateRemainingFromHeader(headerHashMap),\n+                                            getRateResetFromHeader(headerHashMap), null);\n+    }\n+\n+    private <V> ExtractedCloudResponse<V> getResponseWithNoData(RawCloudResponse cloudResponse,\n+                                                                HashMap<String, Long> headerHashMap) {\n+        return new ExtractedCloudResponse<>(cloudResponse.getResponseCode(), getRateLimitFromHeader(headerHashMap),\n+                                            getRateRemainingFromHeader(headerHashMap),\n+                                            getRateResetFromHeader(headerHashMap), null);\n+    }\n+\n+    private BufferedReader getReaderForStream(InputStream stream) {\n+        return new BufferedReader(new InputStreamReader(stream));\n+    }\n+\n+    private String convertToString(InputStream stream) throws IOException {\n+        BufferedReader reader = getReaderForStream(stream);\n+        StringBuilder stringBuffer = new StringBuilder();\n+        while (reader.ready()) {\n+            stringBuffer.append(reader.readLine());\n+        }\n+\n+        return stringBuffer.toString();\n+    }\n+\n+    /**\n+     * Parses the stream content and attempts to convert it into an object T\n+     * @param bodyStream\n+     * @param type\n+     * @param <T>\n+     * @return\n+     * @throws IOException\n+     */\n+    private <T> T getDataFromBody(InputStream bodyStream, Class<T> type) throws IOException {\n+        return JsonUtil.fromJsonString(convertToString(bodyStream), type);\n+    }\n+\n+    /**\n+     * Parses the stream content and attempts to convert it into a List of object Ts\n+     *\n+     * @param bodyStream\n+     * @param type\n+     * @param <T>\n+     * @return\n+     * @throws IOException\n+     */\n+    private <T> List<T> getDataListFromBody(InputStream bodyStream, Class<T> type) throws IOException {\n+        return JsonUtil.fromJsonStringToList(convertToString(bodyStream), type);\n+    }\n+\n+    /**\n+     * Parses the JSON-formatted stream and attempts to get the header in HashMap<String, Long> form\n+     *\n+     * @param headerStream\n+     * @return\n+     * @throws IOException\n+     */\n+    private HashMap<String, Long> getHashMapFromHeader(InputStream headerStream) throws IOException {\n+        return JsonUtil.fromJsonStringToHashMap(\n+                convertToString(headerStream), String.class, Long.class);\n+    }\n+\n+    private int getRateLimitFromHeader(HashMap<String, Long> header) {\n+        return header.get(\"X-RateLimit-Limit\").intValue();\n+    }\n+\n+    private int getRateRemainingFromHeader(HashMap<String, Long> header) {\n+        return header.get(\"X-RateLimit-Remaining\").intValue();\n+    }\n+\n+    private long getRateResetFromHeader(HashMap<String, Long> header) {\n+        return header.get(\"X-RateLimit-Limit\");\n+    }\n+\n+    private List<Person> convertToPersonList(List<CloudPerson> cloudPersonList) {\n+        List<Person> convertedList = new ArrayList<>();\n+        cloudPersonList.stream()\n+                .forEach(cloudPerson -> convertedList.add(convertToPerson(cloudPerson)));\n+\n+        return convertedList;\n+    }\n+\n+    private List<Tag> convertToTagList(List<CloudTag> cloudTagList) {\n+        List<Tag> convertedList = new ArrayList<>();\n+        cloudTagList.stream()\n+                .forEach(cloudTag -> convertedList.add(convertToTag(cloudTag)));\n+\n+        return convertedList;\n+    }\n+\n+    private Person convertToPerson(CloudPerson cloudPerson) {\n+        Person person = new Person(cloudPerson.getFirstName(), cloudPerson.getLastName());\n+        person.setStreet(cloudPerson.getStreet());\n+        person.setCity(cloudPerson.getCity());\n+        person.setPostalCode(cloudPerson.getPostalCode());\n+        return person;","path":"src/main/java/address/sync/CloudService.java","position":376,"original_position":376,"commit_id":"22b05dd885786407adb6db2f137d69b689de318c","original_commit_id":"22b05dd885786407adb6db2f137d69b689de318c","user":{"login":"m133225","id":12193772,"avatar_url":"https://avatars.githubusercontent.com/u/12193772?v=3","gravatar_id":"","url":"https://api.github.com/users/m133225","html_url":"https://github.com/m133225","followers_url":"https://api.github.com/users/m133225/followers","following_url":"https://api.github.com/users/m133225/following{/other_user}","gists_url":"https://api.github.com/users/m133225/gists{/gist_id}","starred_url":"https://api.github.com/users/m133225/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m133225/subscriptions","organizations_url":"https://api.github.com/users/m133225/orgs","repos_url":"https://api.github.com/users/m133225/repos","events_url":"https://api.github.com/users/m133225/events{/privacy}","received_events_url":"https://api.github.com/users/m133225/received_events","type":"User","site_admin":false},"body":"Yep that's missing. Also `githubUserName` and `tags`. 😢 ","created_at":"2016-05-31T09:01:18Z","updated_at":"2016-05-31T09:01:18Z","html_url":"https://github.com/HubTurbo/addressbook/pull/127#discussion_r65145474","pull_request_url":"https://api.github.com/repos/HubTurbo/addressbook/pulls/127","_links":{"self":{"href":"https://api.github.com/repos/HubTurbo/addressbook/pulls/comments/65145474"},"html":{"href":"https://github.com/HubTurbo/addressbook/pull/127#discussion_r65145474"},"pull_request":{"href":"https://api.github.com/repos/HubTurbo/addressbook/pulls/127"}}},"pull_request":{"url":"https://api.github.com/repos/HubTurbo/addressbook/pulls/127","id":71511529,"html_url":"https://github.com/HubTurbo/addressbook/pull/127","diff_url":"https://github.com/HubTurbo/addressbook/pull/127.diff","patch_url":"https://github.com/HubTurbo/addressbook/pull/127.patch","issue_url":"https://api.github.com/repos/HubTurbo/addressbook/issues/127","number":127,"state":"open","locked":false,"title":"Make the cloud's API similar to GitHub's #94","user":{"login":"m133225","id":12193772,"avatar_url":"https://avatars.githubusercontent.com/u/12193772?v=3","gravatar_id":"","url":"https://api.github.com/users/m133225","html_url":"https://github.com/m133225","followers_url":"https://api.github.com/users/m133225/followers","following_url":"https://api.github.com/users/m133225/following{/other_user}","gists_url":"https://api.github.com/users/m133225/gists{/gist_id}","starred_url":"https://api.github.com/users/m133225/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m133225/subscriptions","organizations_url":"https://api.github.com/users/m133225/orgs","repos_url":"https://api.github.com/users/m133225/repos","events_url":"https://api.github.com/users/m133225/events{/privacy}","received_events_url":"https://api.github.com/users/m133225/received_events","type":"User","site_admin":false},"body":"Fixes #94.\r\n\r\nOngoing.\r\n\r\n- [X] Implement `CloudService`, responsible for high-level API\r\n- [X] Implement `CloudSimulator`, responsible for providing similar cloud API as GitHub\r\n- [X] Handle conversion of cloud's response to local response\r\n- [X] Rename `ContactGroup` to `Tag`\r\n- [X] Add random chance of simulating loss of data/bad response code\r\n- [X] Read/write from mirror file\r\n- [X] Read latest cloud data using the new API\r\n- [X] Implement API quota counter & its hourly reset\r\n- [X] Check for bad response code from Cloud's response\r\n- [X] Add random delay to `CloudSimulator`'s response\r\n- [X] Differentiate cloud's and local model's `RateLimitStatus`\r\n- [x] Handle multiple address books (including reading/writing to mirror file)\r\n- [x] Add random chance of simulating data mutation/addition\r\n- [ ] Update with documentations/comments & Refactoring\r\n\r\n - Writes updates to cloud using the new API  \r\nThis should be handled by the model implementation. Will be temporarily disabled when this PR is merged.","created_at":"2016-05-26T07:28:38Z","updated_at":"2016-05-31T09:01:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4138dd8a879a13e9a8d2303e0c435bd3378fd8ce","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/HubTurbo/addressbook/pulls/127/commits","review_comments_url":"https://api.github.com/repos/HubTurbo/addressbook/pulls/127/comments","review_comment_url":"https://api.github.com/repos/HubTurbo/addressbook/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HubTurbo/addressbook/issues/127/comments","statuses_url":"https://api.github.com/repos/HubTurbo/addressbook/statuses/22b05dd885786407adb6db2f137d69b689de318c","head":{"label":"m133225:94-cloud-api","ref":"94-cloud-api","sha":"22b05dd885786407adb6db2f137d69b689de318c","user":{"login":"m133225","id":12193772,"avatar_url":"https://avatars.githubusercontent.com/u/12193772?v=3","gravatar_id":"","url":"https://api.github.com/users/m133225","html_url":"https://github.com/m133225","followers_url":"https://api.github.com/users/m133225/followers","following_url":"https://api.github.com/users/m133225/following{/other_user}","gists_url":"https://api.github.com/users/m133225/gists{/gist_id}","starred_url":"https://api.github.com/users/m133225/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m133225/subscriptions","organizations_url":"https://api.github.com/users/m133225/orgs","repos_url":"https://api.github.com/users/m133225/repos","events_url":"https://api.github.com/users/m133225/events{/privacy}","received_events_url":"https://api.github.com/users/m133225/received_events","type":"User","site_admin":false},"repo":{"id":58345617,"name":"addressbook","full_name":"m133225/addressbook","owner":{"login":"m133225","id":12193772,"avatar_url":"https://avatars.githubusercontent.com/u/12193772?v=3","gravatar_id":"","url":"https://api.github.com/users/m133225","html_url":"https://github.com/m133225","followers_url":"https://api.github.com/users/m133225/followers","following_url":"https://api.github.com/users/m133225/following{/other_user}","gists_url":"https://api.github.com/users/m133225/gists{/gist_id}","starred_url":"https://api.github.com/users/m133225/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m133225/subscriptions","organizations_url":"https://api.github.com/users/m133225/orgs","repos_url":"https://api.github.com/users/m133225/repos","events_url":"https://api.github.com/users/m133225/events{/privacy}","received_events_url":"https://api.github.com/users/m133225/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/m133225/addressbook","description":"A small app for training and experimentation","fork":true,"url":"https://api.github.com/repos/m133225/addressbook","forks_url":"https://api.github.com/repos/m133225/addressbook/forks","keys_url":"https://api.github.com/repos/m133225/addressbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/m133225/addressbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/m133225/addressbook/teams","hooks_url":"https://api.github.com/repos/m133225/addressbook/hooks","issue_events_url":"https://api.github.com/repos/m133225/addressbook/issues/events{/number}","events_url":"https://api.github.com/repos/m133225/addressbook/events","assignees_url":"https://api.github.com/repos/m133225/addressbook/assignees{/user}","branches_url":"https://api.github.com/repos/m133225/addressbook/branches{/branch}","tags_url":"https://api.github.com/repos/m133225/addressbook/tags","blobs_url":"https://api.github.com/repos/m133225/addressbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/m133225/addressbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/m133225/addressbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/m133225/addressbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/m133225/addressbook/statuses/{sha}","languages_url":"https://api.github.com/repos/m133225/addressbook/languages","stargazers_url":"https://api.github.com/repos/m133225/addressbook/stargazers","contributors_url":"https://api.github.com/repos/m133225/addressbook/contributors","subscribers_url":"https://api.github.com/repos/m133225/addressbook/subscribers","subscription_url":"https://api.github.com/repos/m133225/addressbook/subscription","commits_url":"https://api.github.com/repos/m133225/addressbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/m133225/addressbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/m133225/addressbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/m133225/addressbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/m133225/addressbook/contents/{+path}","compare_url":"https://api.github.com/repos/m133225/addressbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/m133225/addressbook/merges","archive_url":"https://api.github.com/repos/m133225/addressbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/m133225/addressbook/downloads","issues_url":"https://api.github.com/repos/m133225/addressbook/issues{/number}","pulls_url":"https://api.github.com/repos/m133225/addressbook/pulls{/number}","milestones_url":"https://api.github.com/repos/m133225/addressbook/milestones{/number}","notifications_url":"https://api.github.com/repos/m133225/addressbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/m133225/addressbook/labels{/name}","releases_url":"https://api.github.com/repos/m133225/addressbook/releases{/id}","deployments_url":"https://api.github.com/repos/m133225/addressbook/deployments","created_at":"2016-05-09T03:22:15Z","updated_at":"2016-05-09T03:22:16Z","pushed_at":"2016-05-31T08:03:32Z","git_url":"git://github.com/m133225/addressbook.git","ssh_url":"git@github.com:m133225/addressbook.git","clone_url":"https://github.com/m133225/addressbook.git","svn_url":"https://github.com/m133225/addressbook","homepage":null,"size":600,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"HubTurbo:master","ref":"master","sha":"cb5221287b971113fa054d4f96c24ac4f1bc56e4","user":{"login":"HubTurbo","id":7955871,"avatar_url":"https://avatars.githubusercontent.com/u/7955871?v=3","gravatar_id":"","url":"https://api.github.com/users/HubTurbo","html_url":"https://github.com/HubTurbo","followers_url":"https://api.github.com/users/HubTurbo/followers","following_url":"https://api.github.com/users/HubTurbo/following{/other_user}","gists_url":"https://api.github.com/users/HubTurbo/gists{/gist_id}","starred_url":"https://api.github.com/users/HubTurbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HubTurbo/subscriptions","organizations_url":"https://api.github.com/users/HubTurbo/orgs","repos_url":"https://api.github.com/users/HubTurbo/repos","events_url":"https://api.github.com/users/HubTurbo/events{/privacy}","received_events_url":"https://api.github.com/users/HubTurbo/received_events","type":"Organization","site_admin":false},"repo":{"id":58317461,"name":"addressbook","full_name":"HubTurbo/addressbook","owner":{"login":"HubTurbo","id":7955871,"avatar_url":"https://avatars.githubusercontent.com/u/7955871?v=3","gravatar_id":"","url":"https://api.github.com/users/HubTurbo","html_url":"https://github.com/HubTurbo","followers_url":"https://api.github.com/users/HubTurbo/followers","following_url":"https://api.github.com/users/HubTurbo/following{/other_user}","gists_url":"https://api.github.com/users/HubTurbo/gists{/gist_id}","starred_url":"https://api.github.com/users/HubTurbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HubTurbo/subscriptions","organizations_url":"https://api.github.com/users/HubTurbo/orgs","repos_url":"https://api.github.com/users/HubTurbo/repos","events_url":"https://api.github.com/users/HubTurbo/events{/privacy}","received_events_url":"https://api.github.com/users/HubTurbo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HubTurbo/addressbook","description":"A small app for training and experimentation","fork":false,"url":"https://api.github.com/repos/HubTurbo/addressbook","forks_url":"https://api.github.com/repos/HubTurbo/addressbook/forks","keys_url":"https://api.github.com/repos/HubTurbo/addressbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HubTurbo/addressbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HubTurbo/addressbook/teams","hooks_url":"https://api.github.com/repos/HubTurbo/addressbook/hooks","issue_events_url":"https://api.github.com/repos/HubTurbo/addressbook/issues/events{/number}","events_url":"https://api.github.com/repos/HubTurbo/addressbook/events","assignees_url":"https://api.github.com/repos/HubTurbo/addressbook/assignees{/user}","branches_url":"https://api.github.com/repos/HubTurbo/addressbook/branches{/branch}","tags_url":"https://api.github.com/repos/HubTurbo/addressbook/tags","blobs_url":"https://api.github.com/repos/HubTurbo/addressbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HubTurbo/addressbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HubTurbo/addressbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/HubTurbo/addressbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HubTurbo/addressbook/statuses/{sha}","languages_url":"https://api.github.com/repos/HubTurbo/addressbook/languages","stargazers_url":"https://api.github.com/repos/HubTurbo/addressbook/stargazers","contributors_url":"https://api.github.com/repos/HubTurbo/addressbook/contributors","subscribers_url":"https://api.github.com/repos/HubTurbo/addressbook/subscribers","subscription_url":"https://api.github.com/repos/HubTurbo/addressbook/subscription","commits_url":"https://api.github.com/repos/HubTurbo/addressbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/HubTurbo/addressbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/HubTurbo/addressbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/HubTurbo/addressbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/HubTurbo/addressbook/contents/{+path}","compare_url":"https://api.github.com/repos/HubTurbo/addressbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HubTurbo/addressbook/merges","archive_url":"https://api.github.com/repos/HubTurbo/addressbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HubTurbo/addressbook/downloads","issues_url":"https://api.github.com/repos/HubTurbo/addressbook/issues{/number}","pulls_url":"https://api.github.com/repos/HubTurbo/addressbook/pulls{/number}","milestones_url":"https://api.github.com/repos/HubTurbo/addressbook/milestones{/number}","notifications_url":"https://api.github.com/repos/HubTurbo/addressbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HubTurbo/addressbook/labels{/name}","releases_url":"https://api.github.com/repos/HubTurbo/addressbook/releases{/id}","deployments_url":"https://api.github.com/repos/HubTurbo/addressbook/deployments","created_at":"2016-05-08T15:05:27Z","updated_at":"2016-05-08T23:35:38Z","pushed_at":"2016-05-31T08:03:32Z","git_url":"git://github.com/HubTurbo/addressbook.git","ssh_url":"git@github.com:HubTurbo/addressbook.git","clone_url":"https://github.com/HubTurbo/addressbook.git","svn_url":"https://github.com/HubTurbo/addressbook","homepage":null,"size":806,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":19,"forks":2,"open_issues":19,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HubTurbo/addressbook/pulls/127"},"html":{"href":"https://github.com/HubTurbo/addressbook/pull/127"},"issue":{"href":"https://api.github.com/repos/HubTurbo/addressbook/issues/127"},"comments":{"href":"https://api.github.com/repos/HubTurbo/addressbook/issues/127/comments"},"review_comments":{"href":"https://api.github.com/repos/HubTurbo/addressbook/pulls/127/comments"},"review_comment":{"href":"https://api.github.com/repos/HubTurbo/addressbook/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HubTurbo/addressbook/pulls/127/commits"},"statuses":{"href":"https://api.github.com/repos/HubTurbo/addressbook/statuses/22b05dd885786407adb6db2f137d69b689de318c"}}}}
{"actor":{"display_login":"m133225"}}