Method: Bitly::API::Bitlink.create
- Defined in:
- lib/bitly/api/bitlink.rb
.create(client:, long_url:, domain: nil, group_guid: nil, title: nil, tags: nil, deeplinks: nil) ⇒ Bitly::API::Bitlink
Creates a new Bitlink from a long URL. Similar to #shorten but takes more parameters. [‘POST /v4/bitlinks`](dev.bitly.com/v4/#operation/createFullBitlink)
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/bitly/api/bitlink.rb', line 66 def self.create(client:, long_url:, domain: nil, group_guid: nil, title: nil, tags: nil, deeplinks: nil) response = client.request( path: "/bitlinks", method: "POST", params: { "long_url" => long_url, "domain" => domain, "group_guid" => group_guid, "title" => title, "tags" => , "deeplinks" => deeplinks } ) new(data: response.body, client: client, response: response) end |