Method: Bitly::API::Organization.fetch
- Defined in:
- lib/bitly/api/organization.rb
.fetch(client:, organization_guid:) ⇒ Bitly::API::Organization
Retrieve an organization from the API. It receives an authorized ‘Bitly::API::Client` object and an organization guid and uses it to
request the `/organizations/:organization_guid` endpoint.
[‘GET /v4/organizations/organization_guid`](dev.bitly.com/v4/#operation/getOrganization)
50 51 52 53 |
# File 'lib/bitly/api/organization.rb', line 50 def self.fetch(client:, organization_guid:) response = client.request(path: "/organizations/#{organization_guid}") Organization.new(data: response.body, client: client, response: response) end |