Class: CrystalApi::StoreEndpoint

Inherits:
Object
  • Object
show all
Defined in:
lib/crystal_api/store_endpoint.rb

Defined Under Namespace

Classes: Response

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ StoreEndpoint

Returns a new instance of StoreEndpoint.



18
19
20
21
22
# File 'lib/crystal_api/store_endpoint.rb', line 18

def initialize(args = {})
  @base_url = args[:base_url]
  @username = args[:username]
  @license = args[:license]
end

Instance Attribute Details

#base_urlObject (readonly)

Returns the value of attribute base_url.



7
8
9
# File 'lib/crystal_api/store_endpoint.rb', line 7

def base_url
  @base_url
end

#licenseObject (readonly)

Returns the value of attribute license.



7
8
9
# File 'lib/crystal_api/store_endpoint.rb', line 7

def license
  @license
end

#usernameObject (readonly)

Returns the value of attribute username.



7
8
9
# File 'lib/crystal_api/store_endpoint.rb', line 7

def username
  @username
end

Instance Method Details

#headersObject



24
25
26
27
28
29
30
# File 'lib/crystal_api/store_endpoint.rb', line 24

def headers
  {
    "Accept"           => "application/json",
    "Content-Type"     => "application/json",
    "X-Requested-With" => "XMLHttpRequest"
  }
end