Skip to content

Commit

Permalink
Documenting .... @wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Medina committed Feb 18, 2010
1 parent add49d9 commit 2ff53bf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/read_it_later.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,21 @@ def send(user, params)
@last_response = query(:send, user, params)
end


# Returns statistics on usage of bookmarks, number of bookmarks added, etc.
#
# @param [ReadItLater::User] user The ReadItLater::User instance representing the user
def stats(user)
response = query(:stats, user, :format => "json")
response[:data] = stringify_keys(JSON.parse(response[:text]))
response[:data][:user_since] = Time.at(response[:data][:user_since].to_i)
@last_response = response
end

# Gets a list of bookmarks according to call parameters
#
#
# @param [Hash] call_params The specifics of the data to be retrieved.
def get(user, call_params)
params = { :format => "json" }
params[:state] = call_params[:state].to_s.strip if call_params[:state]
Expand Down

0 comments on commit 2ff53bf

Please sign in to comment.