Class: PrizePicks::Client
- Inherits:
-
Object
- Object
- PrizePicks::Client
- Includes:
- Api::Endpoints, Faraday::Connection, Faraday::Request
- Defined in:
- lib/prizepicks/client.rb
Constant Summary
Constants included from Api::Endpoints::SignIn
Api::Endpoints::SignIn::ENDPOINT
Constants included from Api::Endpoints::Projections
Api::Endpoints::Projections::ENDPOINT
Constants included from Api::Endpoints::MemberTransactions
Api::Endpoints::MemberTransactions::ENDPOINT
Constants included from Api::Endpoints::Leagues
Api::Endpoints::Leagues::ENDPOINT
Constants included from Api::Endpoints::Entries
Api::Endpoints::Entries::ENDPOINT
Instance Attribute Summary collapse
-
#adapter ⇒ Object
readonly
Returns the value of attribute adapter.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
- #inspect ⇒ Object
Methods included from Api::Endpoints::SignIn
Methods included from Api::Endpoints::Projections
Methods included from Api::Endpoints::MemberTransactions
#member_transactions, #parsed_resp
Methods included from Api::Endpoints::Leagues
Methods included from Api::Endpoints::Entries
Methods included from Faraday::Request
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
11 12 13 14 15 16 17 18 19 |
# File 'lib/prizepicks/client.rb', line 11 def initialize( = {}) PrizePicks::Config::ATTRIBUTES.each do |key| send("#{key}=", .fetch(key, PrizePicks.config.send(key))) end # For testing @stubs = [:stubs] || nil @adapter = [:adapter] || nil end |
Instance Attribute Details
#adapter ⇒ Object (readonly)
Returns the value of attribute adapter.
9 10 11 |
# File 'lib/prizepicks/client.rb', line 9 def adapter @adapter end |
Instance Method Details
#inspect ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/prizepicks/client.rb', line 21 def inspect content = Config::ATTRIBUTES.map do |key| if key == :password "#{key}: [FILTERED]" else "#{key}: #{send(key).inspect}" end end.compact.join(', ') "#<#{self.class.name} #{content}>" end |