Module: Omdb::Api::PublicApi::FindBy

Included in:
Omdb::Api::PublicApi
Defined in:
lib/omdb/api/public_api/find_by.rb

Instance Method Summary collapse

Instance Method Details

#find_by_id(id, **options) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/omdb/api/public_api/find_by.rb', line 7

def find_by_id(id, **options)
  perform_get(
    klass: Omdb::Api::Types::Movie,
    query_params: { id: id }.merge(options),
    headers: options.fetch(:headers, {})
  )
end

#find_by_title(title, **options) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/omdb/api/public_api/find_by.rb', line 15

def find_by_title(title, **options)
  perform_get(
    klass: Omdb::Api::Types::Movie,
    query_params: { title: title }.merge(options),
    headers: options.fetch(:headers, {})
  )
end