Class: Cinii::Client::Base

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

Direct Known Subclasses

Article, Book, Dissertation

Instance Method Summary collapse

Constructor Details

#initialize(app_id: nil) ⇒ Base

Returns a new instance of Base.



8
9
10
# File 'lib/cinii/client/base.rb', line 8

def initialize(app_id: nil)
  @app_id = app_id
end

Instance Method Details

#has_required_params?(params, required_keys) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/cinii/client/base.rb', line 16

def has_required_params?(params, required_keys)
  !!required_keys.find { |p| params[p] }
end

#send_get(path, params = nil) ⇒ Object



12
13
14
# File 'lib/cinii/client/base.rb', line 12

def send_get(path, params = nil)
  send_request(:get, path, params)
end