Method: Bitly::API::Bitlink#link_clicks

Defined in:
lib/bitly/api/bitlink.rb

Get the clicks for the bitlink. [‘GET /v4/bitlink/bitlink/clicks`](dev.bitly.com/v4/#operation/getClicksForBitlink)

Parameters:

  • sort (String)

    The data to sort on. Default and only option is “clicks”.

  • unit (String) (defaults to: nil)

    A unit of time. Default is “day” and can be “minute”, “hour”, “day”, “week” or “month”

  • units (Integer) (defaults to: nil)

    An integer representing the time units to query data for. pass -1 to return all units of time. Defaults to -1.

  • unit_reference (String) (defaults to: nil)

    An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time.

  • size (Integer) (defaults to: nil)

    The number of links to be returned. Defaults to 50

Returns:



341
342
343
# File 'lib/bitly/api/bitlink.rb', line 341

def link_clicks(unit: nil, units: nil, unit_reference: nil, size: nil)
  LinkClick.list(client: @client, bitlink: id, unit: unit, units: units, unit_reference: unit_reference, size: size)
end