From 2f44d78dc020a35e212b0fde4c7fc674da2c9bde Mon Sep 17 00:00:00 2001 From: Nick Mohoric Date: Thu, 11 Apr 2013 05:49:24 -0400 Subject: [PATCH] Init setup for class --- nypl-collections.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 nypl-collections.py diff --git a/nypl-collections.py b/nypl-collections.py new file mode 100644 index 0000000..7f6bdc6 --- /dev/null +++ b/nypl-collections.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python + +class NYPLsearch: + def __init__(self,token=None): + self.token = token or "" + + try: + assert self.token + except: + AssertionError: + print "You will need to use your Authenticaton Token.\n + This can be retrieved at http://api.repo.nypl.org/sign_up" + + self.base = "http://api.repo.nypl.org/api/v1/items" + +