Class: OmniAuth::Strategies::TradeKing
- Inherits:
-
OAuth
- Object
- OAuth
- OmniAuth::Strategies::TradeKing
- Defined in:
- lib/omniauth/strategies/tradeking.rb
Instance Method Summary collapse
Instance Method Details
#email ⇒ Object
39 40 41 |
# File 'lib/omniauth/strategies/tradeking.rb', line 39 def email raw_info['userdata']['userprofile']['entry'].select { |r| r['name'] == 'emailAddress1' }.first['value'] end |
#first_name ⇒ Object
31 32 33 |
# File 'lib/omniauth/strategies/tradeking.rb', line 31 def first_name raw_info['userdata']['userprofile']['entry'].select { |r| r['name'] == 'primaryFirstName' }.first['value'] end |
#last_name ⇒ Object
35 36 37 |
# File 'lib/omniauth/strategies/tradeking.rb', line 35 def last_name raw_info['userdata']['userprofile']['entry'].select { |r| r['name'] == 'primaryLastName' }.first['value'] end |
#login_id ⇒ Object
43 44 45 |
# File 'lib/omniauth/strategies/tradeking.rb', line 43 def login_id raw_info['userdata']['userprofile']['entry'].select { |r| r['name'] == 'login_id' }.first['value'] end |
#raw_info ⇒ Object
27 28 29 |
# File 'lib/omniauth/strategies/tradeking.rb', line 27 def raw_info @raw_info ||= MultiJson.decode(access_token.get('https://api.tradeking.com/v1/member/profile.json').body)['response'] end |