diff options
Diffstat (limited to 'nypl_recrop.rb')
| -rwxr-xr-x | nypl_recrop.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nypl_recrop.rb b/nypl_recrop.rb index 304fc29..a5337ae 100755 --- a/nypl_recrop.rb +++ b/nypl_recrop.rb @@ -8,6 +8,10 @@ NYPL_API_TOKEN = ENV["NYPL_API_TOKEN"] NYPL_AUTH = "Token token=\"#{NYPL_API_TOKEN}\"" NYPL_ENDPOINT = "http://api.repo.nypl.org/api/v1/items" +if NYPL_API_TOKEN.nil? + abort("You must set an NYPL_API_TOKEN environment variable with your token from http://api.repo.nypl.org/") +end + stereo_metadata = JSON.parse(RestClient.get("http://stereo.nypl.org/view/#{ARGV[0]}.json")) unless stereo_metadata['external_id'] == 0 |
