Class: Kippt::ClipLikes

Inherits:
Object
  • Object
show all
Includes:
ReadCollectionResource
Defined in:
lib/kippt/clip_likes.rb

Overview

For fetching clip’s likes.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ReadCollectionResource

#[], #fetch

Constructor Details

#initialize(client, clip) ⇒ ClipLikes

Returns a new instance of ClipLikes.



9
10
11
12
# File 'lib/kippt/clip_likes.rb', line 9

def initialize(client, clip)
  @client = client
  @clip   = clip
end

Instance Attribute Details

#clipObject (readonly)

Returns the value of attribute clip.



7
8
9
# File 'lib/kippt/clip_likes.rb', line 7

def clip
  @clip
end

Class Method Details

.valid_filter_parametersObject



14
15
16
# File 'lib/kippt/clip_likes.rb', line 14

def self.valid_filter_parameters
  [:limit, :offset]
end

Instance Method Details

#base_uriObject



26
27
28
# File 'lib/kippt/clip_likes.rb', line 26

def base_uri
  "clips/#{clip.id}/likes"
end

#collection_classObject



22
23
24
# File 'lib/kippt/clip_likes.rb', line 22

def collection_class
  Kippt::UserCollection
end

#object_classObject



18
19
20
# File 'lib/kippt/clip_likes.rb', line 18

def object_class
  Kippt::User
end