Class: Colourlovers::Lover
- Inherits:
-
Object
- Object
- Colourlovers::Lover
- Defined in:
- lib/colourlovers/lover.rb
Class Method Summary collapse
-
.all(options) ⇒ Object
Retrieve lovers as an array of hashes with options available from Colourlovers API see documentation here: www.colourlovers.com/api#lovers orderCol = X [Where X can be: dateCreated, score, name, numVotes, or numViews] sortBy = X [Where X can be: ASC or DESC. Default ASC] numResults = 20 [Number of results to return, maximum of 100. Default 20] resultOffset = 5 [Result offset, for paging. Default 0].
-
.find(username) ⇒ Object
Retrieve lover details from username as an array with one hash.
-
.new(options) ⇒ Object
Retrives lovers as an array of hashes, same options as all but ordered by dateCreated.
-
.top(options) ⇒ Object
Retrives lovers as an array of hashes, same options as all but ordered by popularity.
Class Method Details
.all(options) ⇒ Object
Retrieve lovers as an array of hashes with options available from Colourlovers API see documentation here: www.colourlovers.com/api#lovers orderCol = X [Where X can be: dateCreated, score, name, numVotes, or numViews] sortBy = X [Where X can be: ASC or DESC. Default ASC] numResults = 20 [Number of results to return, maximum of 100. Default 20] resultOffset = 5 [Result offset, for paging. Default 0]
13 14 15 |
# File 'lib/colourlovers/lover.rb', line 13 def all() Client.get("/lovers", :query => ) end |
.find(username) ⇒ Object
Retrieve lover details from username as an array with one hash
28 29 30 |
# File 'lib/colourlovers/lover.rb', line 28 def find(username) Client.get("/lover/#{username}") end |
.new(options) ⇒ Object
Retrives lovers as an array of hashes, same options as all but ordered by dateCreated
23 24 25 |
# File 'lib/colourlovers/lover.rb', line 23 def new() Client.get("/lovers/new", :query => ) end |
.top(options) ⇒ Object
Retrives lovers as an array of hashes, same options as all but ordered by popularity
18 19 20 |
# File 'lib/colourlovers/lover.rb', line 18 def top() Client.get("/lovers/top", :query => ) end |