Class: Kippt::UserLikes

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

Overview

For fetching user’s public likes.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ReadCollectionResource

#[], #fetch

Constructor Details

#initialize(client, user) ⇒ UserLikes

Returns a new instance of UserLikes.



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

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

Instance Attribute Details

#userObject (readonly)

Returns the value of attribute user.



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

def user
  @user
end

Class Method Details

.valid_filter_parametersObject



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

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

Instance Method Details

#base_uriObject



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

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

#collection_classObject



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

def collection_class
  Kippt::ClipCollection
end

#object_classObject



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

def object_class
  Kippt::Clip
end