Class: LocalBitcoins::Client
- Inherits:
-
Object
- Object
- LocalBitcoins::Client
- Defined in:
- lib/localbitcoins/client.rb
Constant Summary
Constants included from Public
Constants included from Markets
Constants included from Request
Instance Attribute Summary collapse
-
#access_token ⇒ Object
readonly
Returns the value of attribute access_token.
-
#oauth_client ⇒ Object
readonly
Returns the value of attribute oauth_client.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
Initialize a LocalBitcoins::Client instance.
Methods included from Public
#currencies, #local_buy_ad, #local_sell_ad, #online_buy_ads_lookup, #online_sell_ads_lookup, #payment_methods, #places
Methods included from Wallet
#valid_pin?, #wallet, #wallet_addr, #wallet_balance, #wallet_pin_send, #wallet_send
Methods included from Markets
Methods included from Contacts
#active_contacts, #cancel_contact, #canceled_contacts, #closed_contacts, #contact_info, #contacts_info, #create_contact, #dispute_contact, #fund_contact, #mark_contact_as_paid, #message_contact, #messages_from_contact, #released_contacts
Methods included from Users
#account_info, #logout, #myself
Methods included from Ads
#ad, #ad_list, #ads, #create_ad, #update_ad
Methods included from Escrows
Constructor Details
#initialize(options = {}) ⇒ Client
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/localbitcoins/client.rb', line 31 def initialize(={}) unless .kind_of?(Hash) raise ArgumentError, "Options hash required." end @oauth_client = OAuth2::Client.new( [:client_id], [:client_secret], authorize_url: "/oauth2/authorize", token_url: "/oauth2/access_token", site: "https://localbitcoins.com" ) @access_token = OAuth2::AccessToken.new( oauth_client, [:oauth_token] ) end |
Instance Attribute Details
#access_token ⇒ Object (readonly)
Returns the value of attribute access_token.
23 24 25 |
# File 'lib/localbitcoins/client.rb', line 23 def access_token @access_token end |
#oauth_client ⇒ Object (readonly)
Returns the value of attribute oauth_client.
23 24 25 |
# File 'lib/localbitcoins/client.rb', line 23 def oauth_client @oauth_client end |