Class: Kippt::Clips

Inherits:
Object
  • Object
show all
Includes:
CollectionResource
Defined in:
lib/kippt/clips.rb

Overview

Generic clip proxy. Used to wrap endpoints that return clips as JSON.

Direct Known Subclasses

RootClips, UserClips

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from CollectionResource

#build, #create, #destroy_resource, #save_resource

Methods included from ReadCollectionResource

#[], #fetch

Constructor Details

#initialize(client, base_uri) ⇒ Clips

Returns a new instance of Clips.



10
11
12
13
# File 'lib/kippt/clips.rb', line 10

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

Instance Attribute Details

#base_uriObject (readonly)

Returns the value of attribute base_uri.



8
9
10
# File 'lib/kippt/clips.rb', line 8

def base_uri
  @base_uri
end

Class Method Details

.valid_filter_parametersObject



15
16
17
# File 'lib/kippt/clips.rb', line 15

def self.valid_filter_parameters
  [:limit, :offset, :is_read_later, :is_starred, :url, :since, :include_data]
end

Instance Method Details

#collection_classObject



23
24
25
# File 'lib/kippt/clips.rb', line 23

def collection_class
  Kippt::ClipCollection
end

#object_classObject



19
20
21
# File 'lib/kippt/clips.rb', line 19

def object_class
  Kippt::Clip
end