Class: Dato::Client
- Inherits:
-
Object
- Object
- Dato::Client
- Defined in:
- lib/dato/client.rb
Instance Attribute Summary collapse
-
#gql ⇒ Object
readonly
Returns the value of attribute gql.
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#uploads ⇒ Object
readonly
Returns the value of attribute uploads.
Instance Method Summary collapse
-
#initialize(api_token = Dato::Config.api_token, validate_query: false, preview: false, live: false) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(api_token = Dato::Config.api_token, validate_query: false, preview: false, live: false) ⇒ Client
Returns a new instance of Client.
6 7 8 9 10 11 |
# File 'lib/dato/client.rb', line 6 def initialize(api_token = Dato::Config.api_token, validate_query: false, preview: false, live: false) @api_token = api_token @gql = Dato::Gql.new(api_token, validate_query, preview, live) @items = Dato::Items.new(api_token) @uploads = Dato::Uploads.new(api_token) end |
Instance Attribute Details
#gql ⇒ Object (readonly)
Returns the value of attribute gql.
4 5 6 |
# File 'lib/dato/client.rb', line 4 def gql @gql end |
#items ⇒ Object (readonly)
Returns the value of attribute items.
4 5 6 |
# File 'lib/dato/client.rb', line 4 def items @items end |
#uploads ⇒ Object (readonly)
Returns the value of attribute uploads.
4 5 6 |
# File 'lib/dato/client.rb', line 4 def uploads @uploads end |