Skip to content

Commit

Permalink
adding import method to api client
Browse files Browse the repository at this point in the history
  • Loading branch information
mekarpeles authored and root committed Apr 18, 2017
1 parent 702b50e commit 0a6cb7a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions openlibrary/api.py
Expand Up @@ -194,6 +194,9 @@ def unlimited_query(q):
response = self._request("/query.json?" + urllib.urlencode(dict(query=q)))
return unmarshal(simplejson.loads(response.read()))

def import_ocaid(self, ocaid):
return self._request('/api/import/ia', method='POST', data='identifier=' + ocaid).read()


def marshal(data):
"""Serializes the specified data in the format required by OL.::
Expand Down

0 comments on commit 0a6cb7a

Please sign in to comment.