{"action":"created","comment":{"url":"https://api.github.com/repos/NYPL-Simplified/circulation/pulls/comments/88481130","pull_request_review_id":9053909,"id":88481130,"diff_hunk":"@@ -0,0 +1,707 @@\n+import logging\n+from nose.tools import set_trace\n+\n+import datetime\n+import json;\n+import os\n+import requests\n+import uuid\n+\n+from circulation import (\n+    BaseCirculationAPI, \n+    FulfillmentInfo,\n+    HoldInfo,\n+    LoanInfo,\n+)\n+from circulation_exceptions import *\n+\n+from core.oneclick import (\n+    OneClickAPI as BaseOneClickAPI,\n+    MockOneClickAPI as BaseMockOneClickAPI,\n+    OneClickBibliographicCoverageProvider\n+)\n+\n+from core.model import (\n+    Edition,\n+    Identifier, \n+    Patron,\n+    Representation,\n+)\n+\n+from core.monitor import (\n+    Monitor,\n+    IdentifierSweepMonitor,\n+)\n+\n+from core.util.http import (\n+    BadResponseException,\n+)\n+\n+\n+class OneClickAPI(BaseOneClickAPI, BaseCirculationAPI):\n+\n+    NAME = \"OneClick\"\n+    \n+    EXPIRATION_DATE_FORMAT = '%Y-%m-%d'\n+\n+    log = logging.getLogger(\"OneClick Patron API\")\n+\n+\n+    def __init__(self, *args, **kwargs):\n+        super(OneClickAPI, self).__init__(*args, **kwargs)\n+        self.bibliographic_coverage_provider = (\n+            OneClickBibliographicCoverageProvider(\n+                self._db, oneclick_api=self\n+            )\n+        )\n+\n+        num_days = int(self.ebook_loan_length)\n+        self.ebook_expiration_default = datetime.timedelta(days=num_days)\n+        num_days = int(self.eaudio_loan_length)\n+        self.eaudio_expiration_default = datetime.timedelta(days=num_days)\n+\n+\n+    def checkin(self, patron, pin, licensepool):\n+        \"\"\"\n+        Allow a patron to return an ebook or audio before its due date.\n+\n+        :param patron: a Patron object for the patron who wants to return the book.\n+        :param pin: The patron's password (not used).\n+        :param licensepool: The Identifier of the book to be checked out is \n+        attached to this licensepool.\n+\n+        :return True on success, raises circulation exceptions on failure.\n+        \"\"\"\n+        patron_oneclick_id = self.validate_patron(patron)\n+        (item_oneclick_id, item_media) = self.validate_item(licensepool)\n+\n+        resp_dict = self.circulate_item(patron_id=patron_oneclick_id, item_id=item_oneclick_id, return_item=True)\n+\n+        if resp_dict == {}:\n+            self.log.debug(\"Patron %s/%s returned item %s.\", patron.authorization_identifier, \n+                patron_oneclick_id, item_oneclick_id)\n+            return True\n+\n+        # should never happen\n+        raise CirculationException(\"Unknown error %s/%s checking in %s.\", patron.authorization_identifier, \n+            patron_oneclick_id, item_oneclick_id)\n+\n+\n+    def checkout(self, patron, pin, licensepool, internal_format):\n+        \"\"\"\n+        Associate an ebook or audio with a patron.\n+\n+        :param patron: a Patron object for the patron who wants to check out the book.\n+        :param pin: The patron's password (not used).\n+        :param licensepool: The Identifier of the book to be checked out is \n+        attached to this licensepool.\n+        :param internal_format: Represents the patron's desired book format.  Ignored for now.\n+\n+        :return LoanInfo on success, None on failure\n+        \"\"\"\n+        patron_oneclick_id = self.validate_patron(patron)\n+        (item_oneclick_id, item_media) = self.validate_item(licensepool)\n+\n+        resp_dict = self.circulate_item(patron_id=patron_oneclick_id, item_id=item_oneclick_id, return_item=False)\n+\n+        if not resp_dict or ('error_code' in resp_dict):\n+            return None\n+\n+        self.log.debug(\"Patron %s/%s checked out item %s with transaction id %s.\", patron.authorization_identifier, \n+            patron_oneclick_id, item_oneclick_id, resp_dict['transactionId'])\n+\n+        today = datetime.datetime.now()\n+        if item_media == Edition.AUDIO_MEDIUM:\n+            expires = today + self.eaudio_expiration_default\n+        else:\n+            expires = today + self.ebook_expiration_default\n+\n+        # Create the loan info. We don't know the expiration for sure, \n+        # but we know the library default.  We do have the option of \n+        # getting expiration by checking patron's activity, but that \n+        # would mean another http call and is not currently merited.\n+        loan = LoanInfo(\n+            identifier_type=licensepool.identifier.type,\n+            identifier=item_oneclick_id,\n+            start_date=today,\n+            end_date=expires,\n+            fulfillment_info=None,\n+        )\n+        return loan\n+\n+\n+    def circulate_item(self, patron_id, item_id, hold=False, return_item=False):\n+        \"\"\"\n+        Borrow or return a catalog item.\n+        :param patron_id OneClick internal id\n+        :param item_id isbn\n+        :return A dictionary of information on the transaction or error status and message\n+            Calling methods are expected to use this dictionary to create XxxInfo objects.\n+        \"\"\"\n+        endpoint = \"checkouts\"\n+        if hold:\n+            endpoint = \"holds\"\n+        url = \"%s/libraries/%s/patrons/%s/%s/%s\" % (self.base_url, str(self.library_id), patron_id, endpoint, item_id)\n+\n+        method = \"post\"\n+        action = \"checkout\"\n+        if not hold and return_item:\n+            method = \"delete\"\n+            action = \"checkin\"\n+        elif hold and not return_item:\n+            action = \"place_hold\"\n+        elif hold and return_item:\n+            method = \"delete\"\n+            action = \"release_hold\"\n+\n+        resp_obj = {}\n+        message = None\n+        try:\n+            response = self.request(url=url, method=method)\n+\n+            if response.text:\n+                resp_obj = response.json()\n+\n+                # checkout responses are dictionaries, hold responses are strings\n+                if isinstance(resp_obj, dict):\n+                    message = resp_obj.get('message', None)\n+\n+        except Exception, e:\n+            self.log.error(\"Item circulation request failed: %r\", e, exc_info=e)\n+            raise RemoteInitiatedServerError(e.message, action)\n+\n+        self.validate_response(response=response, message=message, action=action)\n+\n+        return resp_obj\n+\n+\n+    def fulfill(self, patron, pin, licensepool, internal_format):\n+        \"\"\" Get the actual resource file to the patron.\n+        :return a FulfillmentInfo object.\n+        \"\"\"\n+\n+        patron_oneclick_id = self.validate_patron(patron)\n+        (item_oneclick_id, item_media) = self.validate_item(licensepool)\n+\n+        # find patron's checkouts\n+        checkouts_list = self.get_patron_checkouts(patron_id=patron_oneclick_id)\n+        if not checkouts_list:\n+            raise NoActiveLoan(\"Cannot fulfill %s - patron %s/%s has no checkouts.\", item_oneclick_id, \n+                patron.authorization_identifier, patron_oneclick_id)\n+\n+        # find this licensepool in patron's checkouts\n+        found_checkout = None\n+        for checkout in checkouts_list:\n+            if checkout.identifier == item_oneclick_id:\n+                found_checkout = checkout\n+                break\n+        if not found_checkout:\n+            raise NoActiveLoan(\"Cannot fulfill %s - patron %s/%s has no such checkout.\", item_oneclick_id, \n+                patron.authorization_identifier, patron_oneclick_id)\n+        \n+        return found_checkout.fulfillment_info\n+\n+\n+\n+    def place_hold(self, patron, pin, licensepool, notification_email_address):\n+        \"\"\"Place a book on hold.\n+\n+        Note: If the requested book is available for checkout, OneClick will respond \n+        with a \"success\" to the hold request.  Then, at the next database clean-up sweep, \n+        OneClick will automatically convert the hold record to a checkout record. \n+\n+        :param patron: a Patron object for the patron who wants to check out the book.\n+        :param pin: The patron's password (not used).\n+        :param licensepool: The Identifier of the book to be checked out is \n+        attached to this licensepool.\n+        :param internal_format: Represents the patron's desired book format.  Ignored for now.\n+\n+        :return: A HoldInfo object on success, None on failure\n+        \"\"\"\n+        patron_oneclick_id = self.validate_patron(patron)\n+        (item_oneclick_id, item_media) = self.validate_item(licensepool)\n+\n+        resp_obj = self.circulate_item(patron_id=patron_oneclick_id, item_id=item_oneclick_id, hold=True, return_item=False)\n+\n+        # successful holds return a numeric transaction id\n+        try:\n+            transaction_id = int(resp_obj)\n+        except Exception, e:\n+            self.log.error(\"Item hold request failed: %r\", e, exc_info=e)\n+            raise CannotHold(e.message)\n+\n+        self.log.debug(\"Patron %s/%s reserved item %s with transaction id %s.\", patron.authorization_identifier, \n+            patron_oneclick_id, item_oneclick_id, resp_obj)\n+\n+        today = datetime.datetime.now()\n+\n+        hold = HoldInfo(\n+            identifier_type=licensepool.identifier.type,\n+            identifier=item_oneclick_id,\n+            start_date=today,\n+            # OneClick sets hold expirations to 2050-12-31, as a \"forever\"\n+            end_date=None,\n+            hold_position=0,","path":"api/oneclick.py","position":244,"original_position":244,"commit_id":"84ad07069df94632fb0473fb2ec1634ab9ac089b","original_commit_id":"84ad07069df94632fb0473fb2ec1634ab9ac089b","user":{"login":"leonardr","id":662474,"avatar_url":"https://avatars.githubusercontent.com/u/662474?v=3","gravatar_id":"","url":"https://api.github.com/users/leonardr","html_url":"https://github.com/leonardr","followers_url":"https://api.github.com/users/leonardr/followers","following_url":"https://api.github.com/users/leonardr/following{/other_user}","gists_url":"https://api.github.com/users/leonardr/gists{/gist_id}","starred_url":"https://api.github.com/users/leonardr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonardr/subscriptions","organizations_url":"https://api.github.com/users/leonardr/orgs","repos_url":"https://api.github.com/users/leonardr/repos","events_url":"https://api.github.com/users/leonardr/events{/privacy}","received_events_url":"https://api.github.com/users/leonardr/received_events","type":"User","site_admin":false},"body":"This should be None as per above.","created_at":"2016-11-17T15:53:44Z","updated_at":"2016-11-17T15:53:44Z","html_url":"https://github.com/NYPL-Simplified/circulation/pull/386#discussion_r88481130","pull_request_url":"https://api.github.com/repos/NYPL-Simplified/circulation/pulls/386","_links":{"self":{"href":"https://api.github.com/repos/NYPL-Simplified/circulation/pulls/comments/88481130"},"html":{"href":"https://github.com/NYPL-Simplified/circulation/pull/386#discussion_r88481130"},"pull_request":{"href":"https://api.github.com/repos/NYPL-Simplified/circulation/pulls/386"}}},"pull_request":{"url":"https://api.github.com/repos/NYPL-Simplified/circulation/pulls/386","id":90900925,"html_url":"https://github.com/NYPL-Simplified/circulation/pull/386","diff_url":"https://github.com/NYPL-Simplified/circulation/pull/386.diff","patch_url":"https://github.com/NYPL-Simplified/circulation/pull/386.patch","issue_url":"https://api.github.com/repos/NYPL-Simplified/circulation/issues/386","number":386,"state":"open","locked":false,"title":"added checkout to oneclick","user":{"login":"daryanypl","id":18293410,"avatar_url":"https://avatars.githubusercontent.com/u/18293410?v=3","gravatar_id":"","url":"https://api.github.com/users/daryanypl","html_url":"https://github.com/daryanypl","followers_url":"https://api.github.com/users/daryanypl/followers","following_url":"https://api.github.com/users/daryanypl/following{/other_user}","gists_url":"https://api.github.com/users/daryanypl/gists{/gist_id}","starred_url":"https://api.github.com/users/daryanypl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daryanypl/subscriptions","organizations_url":"https://api.github.com/users/daryanypl/orgs","repos_url":"https://api.github.com/users/daryanypl/repos","events_url":"https://api.github.com/users/daryanypl/events{/privacy}","received_events_url":"https://api.github.com/users/daryanypl/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-25T22:03:50Z","updated_at":"2016-11-17T15:53:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"75be7dac256007e63d8657fe71276b7d7cd2894a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/NYPL-Simplified/circulation/pulls/386/commits","review_comments_url":"https://api.github.com/repos/NYPL-Simplified/circulation/pulls/386/comments","review_comment_url":"https://api.github.com/repos/NYPL-Simplified/circulation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NYPL-Simplified/circulation/issues/386/comments","statuses_url":"https://api.github.com/repos/NYPL-Simplified/circulation/statuses/84ad07069df94632fb0473fb2ec1634ab9ac089b","head":{"label":"NYPL-Simplified:oneclick_talker","ref":"oneclick_talker","sha":"84ad07069df94632fb0473fb2ec1634ab9ac089b","user":{"login":"NYPL-Simplified","id":16416905,"avatar_url":"https://avatars.githubusercontent.com/u/16416905?v=3","gravatar_id":"","url":"https://api.github.com/users/NYPL-Simplified","html_url":"https://github.com/NYPL-Simplified","followers_url":"https://api.github.com/users/NYPL-Simplified/followers","following_url":"https://api.github.com/users/NYPL-Simplified/following{/other_user}","gists_url":"https://api.github.com/users/NYPL-Simplified/gists{/gist_id}","starred_url":"https://api.github.com/users/NYPL-Simplified/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYPL-Simplified/subscriptions","organizations_url":"https://api.github.com/users/NYPL-Simplified/orgs","repos_url":"https://api.github.com/users/NYPL-Simplified/repos","events_url":"https://api.github.com/users/NYPL-Simplified/events{/privacy}","received_events_url":"https://api.github.com/users/NYPL-Simplified/received_events","type":"Organization","site_admin":false},"repo":{"id":27605405,"name":"circulation","full_name":"NYPL-Simplified/circulation","owner":{"login":"NYPL-Simplified","id":16416905,"avatar_url":"https://avatars.githubusercontent.com/u/16416905?v=3","gravatar_id":"","url":"https://api.github.com/users/NYPL-Simplified","html_url":"https://github.com/NYPL-Simplified","followers_url":"https://api.github.com/users/NYPL-Simplified/followers","following_url":"https://api.github.com/users/NYPL-Simplified/following{/other_user}","gists_url":"https://api.github.com/users/NYPL-Simplified/gists{/gist_id}","starred_url":"https://api.github.com/users/NYPL-Simplified/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYPL-Simplified/subscriptions","organizations_url":"https://api.github.com/users/NYPL-Simplified/orgs","repos_url":"https://api.github.com/users/NYPL-Simplified/repos","events_url":"https://api.github.com/users/NYPL-Simplified/events{/privacy}","received_events_url":"https://api.github.com/users/NYPL-Simplified/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NYPL-Simplified/circulation","description":"Circulation manager for Library Simplified","fork":false,"url":"https://api.github.com/repos/NYPL-Simplified/circulation","forks_url":"https://api.github.com/repos/NYPL-Simplified/circulation/forks","keys_url":"https://api.github.com/repos/NYPL-Simplified/circulation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NYPL-Simplified/circulation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NYPL-Simplified/circulation/teams","hooks_url":"https://api.github.com/repos/NYPL-Simplified/circulation/hooks","issue_events_url":"https://api.github.com/repos/NYPL-Simplified/circulation/issues/events{/number}","events_url":"https://api.github.com/repos/NYPL-Simplified/circulation/events","assignees_url":"https://api.github.com/repos/NYPL-Simplified/circulation/assignees{/user}","branches_url":"https://api.github.com/repos/NYPL-Simplified/circulation/branches{/branch}","tags_url":"https://api.github.com/repos/NYPL-Simplified/circulation/tags","blobs_url":"https://api.github.com/repos/NYPL-Simplified/circulation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NYPL-Simplified/circulation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NYPL-Simplified/circulation/git/refs{/sha}","trees_url":"https://api.github.com/repos/NYPL-Simplified/circulation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NYPL-Simplified/circulation/statuses/{sha}","languages_url":"https://api.github.com/repos/NYPL-Simplified/circulation/languages","stargazers_url":"https://api.github.com/repos/NYPL-Simplified/circulation/stargazers","contributors_url":"https://api.github.com/repos/NYPL-Simplified/circulation/contributors","subscribers_url":"https://api.github.com/repos/NYPL-Simplified/circulation/subscribers","subscription_url":"https://api.github.com/repos/NYPL-Simplified/circulation/subscription","commits_url":"https://api.github.com/repos/NYPL-Simplified/circulation/commits{/sha}","git_commits_url":"https://api.github.com/repos/NYPL-Simplified/circulation/git/commits{/sha}","comments_url":"https://api.github.com/repos/NYPL-Simplified/circulation/comments{/number}","issue_comment_url":"https://api.github.com/repos/NYPL-Simplified/circulation/issues/comments{/number}","contents_url":"https://api.github.com/repos/NYPL-Simplified/circulation/contents/{+path}","compare_url":"https://api.github.com/repos/NYPL-Simplified/circulation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NYPL-Simplified/circulation/merges","archive_url":"https://api.github.com/repos/NYPL-Simplified/circulation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NYPL-Simplified/circulation/downloads","issues_url":"https://api.github.com/repos/NYPL-Simplified/circulation/issues{/number}","pulls_url":"https://api.github.com/repos/NYPL-Simplified/circulation/pulls{/number}","milestones_url":"https://api.github.com/repos/NYPL-Simplified/circulation/milestones{/number}","notifications_url":"https://api.github.com/repos/NYPL-Simplified/circulation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NYPL-Simplified/circulation/labels{/name}","releases_url":"https://api.github.com/repos/NYPL-Simplified/circulation/releases{/id}","deployments_url":"https://api.github.com/repos/NYPL-Simplified/circulation/deployments","created_at":"2014-12-05T18:53:04Z","updated_at":"2016-10-24T13:30:36Z","pushed_at":"2016-11-17T15:27:08Z","git_url":"git://github.com/NYPL-Simplified/circulation.git","ssh_url":"git@github.com:NYPL-Simplified/circulation.git","clone_url":"https://github.com/NYPL-Simplified/circulation.git","svn_url":"https://github.com/NYPL-Simplified/circulation","homepage":null,"size":2673,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":68,"forks":5,"open_issues":68,"watchers":1,"default_branch":"master"}},"base":{"label":"NYPL-Simplified:master","ref":"master","sha":"0fb64d12c8162c98f2035588dc1d6dd8c76480b9","user":{"login":"NYPL-Simplified","id":16416905,"avatar_url":"https://avatars.githubusercontent.com/u/16416905?v=3","gravatar_id":"","url":"https://api.github.com/users/NYPL-Simplified","html_url":"https://github.com/NYPL-Simplified","followers_url":"https://api.github.com/users/NYPL-Simplified/followers","following_url":"https://api.github.com/users/NYPL-Simplified/following{/other_user}","gists_url":"https://api.github.com/users/NYPL-Simplified/gists{/gist_id}","starred_url":"https://api.github.com/users/NYPL-Simplified/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYPL-Simplified/subscriptions","organizations_url":"https://api.github.com/users/NYPL-Simplified/orgs","repos_url":"https://api.github.com/users/NYPL-Simplified/repos","events_url":"https://api.github.com/users/NYPL-Simplified/events{/privacy}","received_events_url":"https://api.github.com/users/NYPL-Simplified/received_events","type":"Organization","site_admin":false},"repo":{"id":27605405,"name":"circulation","full_name":"NYPL-Simplified/circulation","owner":{"login":"NYPL-Simplified","id":16416905,"avatar_url":"https://avatars.githubusercontent.com/u/16416905?v=3","gravatar_id":"","url":"https://api.github.com/users/NYPL-Simplified","html_url":"https://github.com/NYPL-Simplified","followers_url":"https://api.github.com/users/NYPL-Simplified/followers","following_url":"https://api.github.com/users/NYPL-Simplified/following{/other_user}","gists_url":"https://api.github.com/users/NYPL-Simplified/gists{/gist_id}","starred_url":"https://api.github.com/users/NYPL-Simplified/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYPL-Simplified/subscriptions","organizations_url":"https://api.github.com/users/NYPL-Simplified/orgs","repos_url":"https://api.github.com/users/NYPL-Simplified/repos","events_url":"https://api.github.com/users/NYPL-Simplified/events{/privacy}","received_events_url":"https://api.github.com/users/NYPL-Simplified/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NYPL-Simplified/circulation","description":"Circulation manager for Library Simplified","fork":false,"url":"https://api.github.com/repos/NYPL-Simplified/circulation","forks_url":"https://api.github.com/repos/NYPL-Simplified/circulation/forks","keys_url":"https://api.github.com/repos/NYPL-Simplified/circulation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NYPL-Simplified/circulation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NYPL-Simplified/circulation/teams","hooks_url":"https://api.github.com/repos/NYPL-Simplified/circulation/hooks","issue_events_url":"https://api.github.com/repos/NYPL-Simplified/circulation/issues/events{/number}","events_url":"https://api.github.com/repos/NYPL-Simplified/circulation/events","assignees_url":"https://api.github.com/repos/NYPL-Simplified/circulation/assignees{/user}","branches_url":"https://api.github.com/repos/NYPL-Simplified/circulation/branches{/branch}","tags_url":"https://api.github.com/repos/NYPL-Simplified/circulation/tags","blobs_url":"https://api.github.com/repos/NYPL-Simplified/circulation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NYPL-Simplified/circulation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NYPL-Simplified/circulation/git/refs{/sha}","trees_url":"https://api.github.com/repos/NYPL-Simplified/circulation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NYPL-Simplified/circulation/statuses/{sha}","languages_url":"https://api.github.com/repos/NYPL-Simplified/circulation/languages","stargazers_url":"https://api.github.com/repos/NYPL-Simplified/circulation/stargazers","contributors_url":"https://api.github.com/repos/NYPL-Simplified/circulation/contributors","subscribers_url":"https://api.github.com/repos/NYPL-Simplified/circulation/subscribers","subscription_url":"https://api.github.com/repos/NYPL-Simplified/circulation/subscription","commits_url":"https://api.github.com/repos/NYPL-Simplified/circulation/commits{/sha}","git_commits_url":"https://api.github.com/repos/NYPL-Simplified/circulation/git/commits{/sha}","comments_url":"https://api.github.com/repos/NYPL-Simplified/circulation/comments{/number}","issue_comment_url":"https://api.github.com/repos/NYPL-Simplified/circulation/issues/comments{/number}","contents_url":"https://api.github.com/repos/NYPL-Simplified/circulation/contents/{+path}","compare_url":"https://api.github.com/repos/NYPL-Simplified/circulation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NYPL-Simplified/circulation/merges","archive_url":"https://api.github.com/repos/NYPL-Simplified/circulation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NYPL-Simplified/circulation/downloads","issues_url":"https://api.github.com/repos/NYPL-Simplified/circulation/issues{/number}","pulls_url":"https://api.github.com/repos/NYPL-Simplified/circulation/pulls{/number}","milestones_url":"https://api.github.com/repos/NYPL-Simplified/circulation/milestones{/number}","notifications_url":"https://api.github.com/repos/NYPL-Simplified/circulation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NYPL-Simplified/circulation/labels{/name}","releases_url":"https://api.github.com/repos/NYPL-Simplified/circulation/releases{/id}","deployments_url":"https://api.github.com/repos/NYPL-Simplified/circulation/deployments","created_at":"2014-12-05T18:53:04Z","updated_at":"2016-10-24T13:30:36Z","pushed_at":"2016-11-17T15:27:08Z","git_url":"git://github.com/NYPL-Simplified/circulation.git","ssh_url":"git@github.com:NYPL-Simplified/circulation.git","clone_url":"https://github.com/NYPL-Simplified/circulation.git","svn_url":"https://github.com/NYPL-Simplified/circulation","homepage":null,"size":2673,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":68,"forks":5,"open_issues":68,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NYPL-Simplified/circulation/pulls/386"},"html":{"href":"https://github.com/NYPL-Simplified/circulation/pull/386"},"issue":{"href":"https://api.github.com/repos/NYPL-Simplified/circulation/issues/386"},"comments":{"href":"https://api.github.com/repos/NYPL-Simplified/circulation/issues/386/comments"},"review_comments":{"href":"https://api.github.com/repos/NYPL-Simplified/circulation/pulls/386/comments"},"review_comment":{"href":"https://api.github.com/repos/NYPL-Simplified/circulation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NYPL-Simplified/circulation/pulls/386/commits"},"statuses":{"href":"https://api.github.com/repos/NYPL-Simplified/circulation/statuses/84ad07069df94632fb0473fb2ec1634ab9ac089b"}}}}
{"actor":{"display_login":"leonardr"}}