Class: Pdga::Client
- Inherits:
-
Object
- Object
- Pdga::Client
- Defined in:
- lib/pdga_api/client.rb
Overview
API Client for PDGA
Constant Summary
Constants included from Request
Instance Attribute Summary collapse
-
#password ⇒ Object
Returns the value of attribute password.
-
#sessid ⇒ Object
Returns the value of attribute sessid.
-
#session_name ⇒ Object
Returns the value of attribute session_name.
-
#token ⇒ Object
Returns the value of attribute token.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
Methods included from Event
Methods included from Player
Methods included from Course
Methods included from Auth
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
23 24 25 26 27 28 29 30 |
# File 'lib/pdga_api/client.rb', line 23 def initialize( = {}) raise(ArgumentError, "username and password are required parameters") unless .key?(:username) && .key?(:password) @username = [:username] @password = [:password] login(username: @username, password: @password) end |
Instance Attribute Details
#password ⇒ Object
Returns the value of attribute password.
16 17 18 |
# File 'lib/pdga_api/client.rb', line 16 def password @password end |
#sessid ⇒ Object
Returns the value of attribute sessid.
16 17 18 |
# File 'lib/pdga_api/client.rb', line 16 def sessid @sessid end |
#session_name ⇒ Object
Returns the value of attribute session_name.
16 17 18 |
# File 'lib/pdga_api/client.rb', line 16 def session_name @session_name end |
#token ⇒ Object
Returns the value of attribute token.
16 17 18 |
# File 'lib/pdga_api/client.rb', line 16 def token @token end |
#username ⇒ Object
Returns the value of attribute username.
16 17 18 |
# File 'lib/pdga_api/client.rb', line 16 def username @username end |