Class: Warden::Oauthed::Oauth::User
- Inherits:
-
Struct
- Object
- Struct
- Warden::Oauthed::Oauth::User
- Defined in:
- lib/warden-oauthed/user.rb
Instance Attribute Summary collapse
-
#attribs ⇒ Object
Returns the value of attribute attribs.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
Instance Attribute Details
#attribs ⇒ Object
Returns the value of attribute attribs
4 5 6 |
# File 'lib/warden-oauthed/user.rb', line 4 def attribs @attribs end |
#token ⇒ Object
Returns the value of attribute token
4 5 6 |
# File 'lib/warden-oauthed/user.rb', line 4 def token @token end |
Instance Method Details
#oauthed_raw_request(path, _params = {}) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/warden-oauthed/user.rb', line 5 def oauthed_raw_request(path, _params = {}) puts "#{ENV['API_BASE_URL']}/#{path}" req = Faraday.new(url: "#{ENV['API_BASE_URL']}/#{path}") req. :Bearer, token req.get.body end |
#oauthed_request(path, params = {}) ⇒ Object
12 13 14 |
# File 'lib/warden-oauthed/user.rb', line 12 def oauthed_request(path, params = {}) MultiJson.load(oauthed_raw_request(path, params)) end |