Skip to content

Commit

Permalink
Generic search definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
nmohoric committed Apr 11, 2013
1 parent 2f44d78 commit 15920dc
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion nypl-collections.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env python

import requests

class NYPLsearch:
def __init__(self,token=None):
self.token = token or ""
Expand All @@ -13,4 +15,17 @@ def __init__(self,token=None):

self.base = "http://api.repo.nypl.org/api/v1/items"


def return_captures(self, uuid, withTitle=False, format='json'):
# Return the captures for a given uuid
# optional value withTitles=yes

def return_uuid(self, type, val, format='json'):
# Return the item-uuid for a identifier.

def return_mods(self, uuid, format='json'):
# Return a mods record for a given uuid

def search_mods(self, q, field=None, format='json'):
# Search across all (without field) or in specific field
# (valid fields at http://www.loc.gov/standards/mods/mods-outline.html)

0 comments on commit 15920dc

Please sign in to comment.