Class: Bitly::V3::RealtimeLink

Inherits:
Object
  • Object
show all
Defined in:
lib/bitly/v3/realtime_link.rb

Overview

Day objects are created by the realtime_links method of a user

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ RealtimeLink

Returns a new instance of RealtimeLink


7
8
9
10
# File 'lib/bitly/v3/realtime_link.rb', line 7

def initialize(opts)
  @clicks = opts['clicks']
  @user_hash = opts['user_hash']
end

Instance Attribute Details

#clicksObject (readonly)

Returns the value of attribute clicks


5
6
7
# File 'lib/bitly/v3/realtime_link.rb', line 5

def clicks
  @clicks
end

#user_hashObject (readonly)

Returns the value of attribute user_hash


5
6
7
# File 'lib/bitly/v3/realtime_link.rb', line 5

def user_hash
  @user_hash
end

Instance Method Details

#create_url(client) ⇒ Object

A convenience method to create a Bitly::Url from the data


13
14
15
# File 'lib/bitly/v3/realtime_link.rb', line 13

def create_url(client)
  Bitly::V3::Url.new(client, 'user_clicks' => clicks, 'user_hash' => user_hash)
end