Class: TheOneApi::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/the_one_api/client.rb

Overview

A client for The One Api

Constant Summary collapse

BASE_URL =
"https://the-one-api.dev/v2/"

Instance Method Summary collapse

Constructor Details

#initialize(api_key) ⇒ Client



17
18
19
# File 'lib/the_one_api/client.rb', line 17

def initialize(api_key)
  @api_key = api_key
end

Instance Method Details

#movieObject



21
22
23
# File 'lib/the_one_api/client.rb', line 21

def movie
  @movie ||= ResourceWrapper.new(Movie, @api_key)
end

#quoteObject



25
26
27
# File 'lib/the_one_api/client.rb', line 25

def quote
  @quote ||= ResourceWrapper.new(Quote, @api_key)
end