Simple client for querying the NYPL Platform API.
1.0.0
- Configure the client with Platform API credentials
- Make requests
Example configuration:
require 'nypl_platform_api_client'
client = NyplPlatformApiClient.new({
base_url: "https://platform.nypl.org/api/v0.1/", # Defaults to ENV['PLATFORM_API_BASE_URL']
client_id: "client-id", # Defaults to ENV['NYPL_OAUTH_ID']
client_secret: "client-secret", # Defaults to ENV['NYPL_OAUTH_SECRET']
oauth_url: "https://isso.nypl.org" # Defaults to ENV['NYPL_OAUTH_URL'],
log_level: "debug" # Defaults to 'info'
})Example GET:
bib = client.get 'bibs/sierra-nypl/12082323'Example POST:
new_job = client.post 'jobs', '', { 'Content-Type' => 'text/plain' }This repo uses a single, versioned master branch.
- Create feature branch off
master - Compute next logical version and update
README.md,CHANGELOG.md, &nypl_platform_api_client.gemspec - Create PR against
master - After merging the PR, git tag
masterwith new version number.
After merging to master, push the updated gem to rubygems.org:
gem build nypl_platform_api_client.gemspec
gem push nypl_platform_api_client-[version].gem
See this guide for additional help.
bundle exec rspec