Skip to content

Commit

Permalink
expand readme
Browse files Browse the repository at this point in the history
  • Loading branch information
fitnr committed Feb 20, 2015
1 parent c450f46 commit 165efa4
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
39 changes: 38 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,41 @@
nypl-digital-collections
========================

Library to access the New York Public Library's Digital Collections API
Library to access the New York Public Library's [Digital Collections API](http://api.repo.nypl.org).

Basics:

````python
from nyplcollections import NYPLsearch

# Create search object
nypl = NYPLsearch(API_KEY)
````

Methods:
* NYPLsearch.captures
* NYPLsearch.mods
* NYPLsearch.search
* NYPLsearch.uuid

Search:

````python
cats = self.nypl.search('cats')

cats.results
# [...]
````

MODS:

````python
# Get a MODS record based on uuid
mods = nypl.mods('acfeeb2d-7c5e-4ce7-e040-e00a180644aa')

mods.status_code
200

mods.results
# {...}
````
1 change: 1 addition & 0 deletions nyplcollections/nyplcollections.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python
import requests


class NYPLsearch(object):

def __init__(self, token, page=None, per_page=None):
Expand Down

0 comments on commit 165efa4

Please sign in to comment.