{"id":15563222,"url":"https://github.com/timwaters/nypl_repo","last_synced_at":"2025-06-11T18:06:29.675Z","repository":{"id":56886005,"uuid":"13925626","full_name":"timwaters/nypl_repo","owner":"timwaters","description":"A Ruby Gem for the New York Public Libraries Digital Collections Repository API at http://api.repo.nypl.org/","archived":false,"fork":false,"pushed_at":"2014-01-23T15:27:05.000Z","size":176,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-06T23:03:39.119Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timwaters.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-28T12:46:46.000Z","updated_at":"2015-09-30T21:48:14.000Z","dependencies_parsed_at":"2022-08-21T00:50:14.854Z","dependency_job_id":null,"html_url":"https://github.com/timwaters/nypl_repo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/timwaters/nypl_repo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timwaters%2Fnypl_repo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timwaters%2Fnypl_repo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timwaters%2Fnypl_repo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timwaters%2Fnypl_repo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timwaters","download_url":"https://codeload.github.com/timwaters/nypl_repo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timwaters%2Fnypl_repo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259312601,"owners_count":22838965,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T16:20:32.050Z","updated_at":"2025-06-11T18:06:29.630Z","avatar_url":"https://github.com/timwaters.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nypl_repo\n\nA Ruby Gem for the New York Public Libraries Digital Collections Repository API at http://api.repo.nypl.org/\n\n## Usage\n\n```\ntoken = \"your_nypl_api_token\"\nclient = NyplRepo::Client.new(token)\n```\nadditionally, an options hash can be passed in, all optional.\n```\ntoken = \"your_nypl_api_token\"\noptions = {:debug =\u003e true, :server_url =\u003e \"http://example.com/api/v2/\"}\nclient = client = NyplRepo::Client.new(token, options)\n```\n\n### Initialisation Options\n\nSetting `:debug` to true puts a number of debugging statements\n\nThe default `:server_url` is http://api.repo.nypl.org/api/v1\n\n### Examples\n```\ntoken = \"your_nypl_api_token\"\nclient = NyplRepo::Client.new(token)\nmods_uuid = \"510d47e2-8e15-a3d9-e040-e00a18064a99\"\nmods_item = client.get_mods_item(mods_uuid)\n```\n```\ntoken = \"your_nypl_api_token\"\nclient = NyplRepo::Client.new(token)\nbibl_uuid = \"12deb230-c603-012f-b946-58d385a7bc34\"\nimage_id = \"1268326\"\nmods_uuid  = client.get_mods_uuid(bibl_uuid, image_id)\n```\n\n## Methods\n\n`item_uuid` also known as `mods_uuid` refers to the actual item itself, so for example, a map.\n\n`container_uuid` also known as `bibl_uuid` refers the the bibliographic container. For example it would be an Atlas, containing individual maps.\n\n* get_mods_item(item_uuid)\n* get_mods_uuid(container_uuid, image_id)\n* get_bibl_uuid(image_id)\n* get_highreslink(container_uuid, image_id)\n* get_items_since(query, since_date, until_date)\n  * since_date, until_date format YYYY-MM-DD \n  * Returns array of items\n  * Will paginate if there are a number of pages - this means it will repeatedly call the API for each call\n* get_capture_items(container_uuid)\n  * Returns array of items. \n  * Will paginate if there are a number of pages - this means it will repeatedly call the API for each call\n* get_image_id(container_uuid, item_uuid)\n  \nThe above methods all use the get_json method, which can also be called directly:\n   \n* get_json(url)\n  * where url is the full API url to be called: example `http://api.repo.nypl.org/api/v1/items/search.json?q=unicorns`\n\n\n## Tests\n```\n API_TOKEN=YourAPIToken rake test\n```\n\nWith debugging output:\n```\nDEBUG=true API_TOKEN=YourAPIToken rake test\n```\n\n\n## Author\nCopyright 2014 Tim Waters http://github.com/timwaters  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimwaters%2Fnypl_repo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimwaters%2Fnypl_repo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimwaters%2Fnypl_repo/lists"}