Class: Infostrada::Configuration

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

Overview

The configuration of the API requests.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#base_uriObject (readonly)

Returns the value of attribute base_uri.



14
15
16
# File 'lib/infostrada.rb', line 14

def base_uri
  @base_uri
end

#last_update_fileObject

Returns the value of attribute last_update_file.



15
16
17
# File 'lib/infostrada.rb', line 15

def last_update_file
  @last_update_file
end

#passwordObject

Returns the value of attribute password.



14
15
16
# File 'lib/infostrada.rb', line 14

def password
  @password
end

#retriesObject

Returns the value of attribute retries.



15
16
17
# File 'lib/infostrada.rb', line 15

def retries
  @retries
end

#timeoutObject

Returns the value of attribute timeout.



14
15
16
# File 'lib/infostrada.rb', line 14

def timeout
  @timeout
end

#usernameObject

Returns the value of attribute username.



14
15
16
# File 'lib/infostrada.rb', line 14

def username
  @username
end

Instance Method Details

#domain=(domain) ⇒ Object

Base URI of the service. Since the gem is only football related for now we can have the football path already in the base_uri.



37
38
39
40
41
42
# File 'lib/infostrada.rb', line 37

def domain=(domain)
  base_uri = "#{domain}/svc/Football.svc/json/"

  BaseRequest.base_uri(base_uri)
  @base_uri = base_uri
end