Class: Pixabay::Client
Instance Method Summary collapse
-
#initialize(api_key: nil, timeout: 10) ⇒ Client
constructor
A new instance of Client.
- #photos(**options) ⇒ Object
Constructor Details
#initialize(api_key: nil, timeout: 10) ⇒ Client
Returns a new instance of Client.
25 26 27 28 |
# File 'lib/pixabay.rb', line 25 def initialize(api_key: nil, timeout: 10) @api_key = api_key @timeout = timeout end |
Instance Method Details
#photos(**options) ⇒ Object
30 31 32 33 34 35 36 37 38 |
# File 'lib/pixabay.rb', line 30 def photos(**) = { query: { key: @api_key }.merge() } self.class.get('', ) end |