reed_sdk
ReedSdk - the Ruby gem for the The One Api Client
This is a sample client for the the-one-api service.
This client implements endpoints related to movie and quotes.
This SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
Installation
Build a gem
To build the Ruby code into a gem:
gem build reed_sdk.gemspec
Then either install the gem locally:
gem install ./reed_sdk-1.0.0.gem
(for development, run gem install --dev ./reed_sdk-1.0.0.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'reed_sdk', '~> 1.0.0'
Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'reed_sdk', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Getting Started
Please follow the installation procedure and then run the following code:
require 'reed_sdk'
ReedSdk.configure do |config|
config.access_token = 'YOUR_BEARER_TOKEN'
config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' }
end
api_instance = ReedSdk::TheOneApiApi.new
id = 'id_example'
begin
result = api_instance.retrieve_movie(id)
p result
rescue ReedSdk::ApiError => e
puts "Exception when calling TheOneApiApi->retrieve_movie: #{e}"
end
Documentation for API Endpoints
All URIs are relative to https://the-one-api.dev/v2
ReedSdk::TheOneApiApi | retrieve_movie | GET /movie/{id} | Retrieve a movie by a specific ID |
ReedSdk::TheOneApiApi | retrieve_movie_quotes | GET /movie/{id}/quote | Retrieve a specific movies quotes. |
ReedSdk::TheOneApiApi | retrieve_movies | GET /movie | Retrieve all movies |
ReedSdk::TheOneApiApi | retrieve_quote | GET /quote/{id} | Retrieve a specific movie quote |
ReedSdk::TheOneApiApi | retrieve_quotes | GET /quote | Retrieve all movie quotes |
Documentation for Models
Documentation for Authorization
Authentication schemes defined for the API:
bearerAuth
- Type: Bearer authentication