Class: Bitly::API::OAuthApp
- Inherits:
-
Object
- Object
- Bitly::API::OAuthApp
- Includes:
- Base
- Defined in:
- lib/bitly/api/oauth_app.rb
Instance Attribute Summary
Attributes included from Base
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data:, client:, response: nil) ⇒ OAuthApp
constructor
A new instance of OAuthApp.
Methods included from Base
Constructor Details
#initialize(data:, client:, response: nil) ⇒ OAuthApp
Returns a new instance of OAuthApp.
19 20 21 22 23 |
# File 'lib/bitly/api/oauth_app.rb', line 19 def initialize(data:, client:, response: nil) assign_attributes(data) @client = client @response = response end |
Class Method Details
.attributes ⇒ Object
9 10 11 |
# File 'lib/bitly/api/oauth_app.rb', line 9 def self.attributes [:name, :description, :link, :client_id] end |
.fetch(client:, client_id:) ⇒ Object
14 15 16 17 |
# File 'lib/bitly/api/oauth_app.rb', line 14 def self.fetch(client:, client_id:) response = client.request(path: "/apps/#{client_id}") new(data: response.body, client: client, response: response) end |