Class: Kippt::UserClips

Inherits:
Clips
  • Object
show all
Defined in:
lib/kippt/user_clips.rb

Instance Attribute Summary collapse

Attributes inherited from Clips

#base_uri

Instance Method Summary collapse

Methods inherited from Clips

#collection_class, #object_class, valid_filter_parameters

Methods included from CollectionResource

#build, #create, #destroy_resource, #save_resource

Methods included from ReadCollectionResource

#[], #fetch

Constructor Details

#initialize(client, user) ⇒ UserClips

Returns a new instance of UserClips.



6
7
8
9
10
# File 'lib/kippt/user_clips.rb', line 6

def initialize(client, user)
  @user = user

  super(client, "users/#{user.id}/clips")
end

Instance Attribute Details

#userObject (readonly)

Returns the value of attribute user.



4
5
6
# File 'lib/kippt/user_clips.rb', line 4

def user
  @user
end

Instance Method Details

#favoritesObject



12
13
14
# File 'lib/kippt/user_clips.rb', line 12

def favorites
  Kippt::Clips.new(client, "#{base_uri}/favorites")
end

#likesObject



16
17
18
# File 'lib/kippt/user_clips.rb', line 16

def likes
  Kippt::Clips.new(client, "#{base_uri}/likes")
end