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:
# Load the gem
require 'reed_sdk'
# Setup authorization
ReedSdk.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
# Configure a proc to get access tokens in lieu of the static access_token configuration
config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' }
end
api_instance = ReedSdk::TheOneApiApi.new
id = 'id_example' # String | Movie ID
begin
#Retrieve a movie by a specific ID
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
Class | Method | HTTP request | Description |
---|---|---|---|
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
- ReedSdk::Movie
- ReedSdk::MovieAllOf
- ReedSdk::Movies
- ReedSdk::MoviesAllOf
- ReedSdk::Paged
- ReedSdk::Quote
- ReedSdk::QuoteAllOf
- ReedSdk::Quotes
- ReedSdk::QuotesAllOf
Documentation for Authorization
Authentication schemes defined for the API:
bearerAuth
- Type: Bearer authentication