Class: Bitly::V4::Client
- Inherits:
-
Object
- Object
- Bitly::V4::Client
- Defined in:
- lib/bitly/v4/client.rb
Overview
Bitly Client.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Client
constructor
A new instance of Client.
- #shorten(long_url, options = {}) ⇒ Object
Constructor Details
#initialize(**args) ⇒ Client
Returns a new instance of Client.
10 11 12 13 14 |
# File 'lib/bitly/v4/client.rb', line 10 def initialize(**args) @conn = Faraday.new(BASE_URI) @conn.(:Bearer, args[:access_token]) @conn.headers[:content_type] = 'application/json' end |