Class: Dato::Client

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#gqlObject (readonly)

Returns the value of attribute gql.



4
5
6
# File 'lib/dato/client.rb', line 4

def gql
  @gql
end

#itemsObject (readonly)

Returns the value of attribute items.



4
5
6
# File 'lib/dato/client.rb', line 4

def items
  @items
end

#uploadsObject (readonly)

Returns the value of attribute uploads.



4
5
6
# File 'lib/dato/client.rb', line 4

def uploads
  @uploads
end