Module: Lelylan::Client::Status

Included in:
Lelylan::Client
Defined in:
lib/lelylan/client/status.rb

Instance Method Summary collapse

Instance Method Details

#create_status(params = {}) ⇒ Object

Public: Create a status and returns extended information for it.

params - The Hash used to create the resource (default: {}).

Returns Hashie The created status.



45
46
47
# File 'lib/lelylan/client/status.rb', line 45

def create_status(params = {})
  post('/statuses', params)
end

#delete_status(id) ⇒ Object

Public: Delete a status identified from its ID and returns extended information for it.

id - A String that represent the status ID.

Returns Hashie The deleted status.



68
69
70
# File 'lib/lelylan/client/status.rb', line 68

def delete_status(id)
  delete("/statuses/#{id}")
end

#public_statuses(params = {}) ⇒ Object

Public: Returns a list of all existing statuses.

params - The Hash used to refine the search (default: {}).

Returns Array List of statuses.



34
35
36
# File 'lib/lelylan/client/status.rb', line 34

def public_statuses(params = {})
  get('/statuses/public', params)
end

#status(id) ⇒ Object

Public: Returns extended information for a given status identified from its ID.

id - A String that represent the status ID.

Returns Hashie The status.



12
13
14
# File 'lib/lelylan/client/status.rb', line 12

def status(id)
  get("/statuses/#{id}")
end

#statuses(params = {}) ⇒ Object

Public: Returns a list of owned statuses.

params - The Hash used to refine the search (default: {}).

Returns Array List of statuses.



23
24
25
# File 'lib/lelylan/client/status.rb', line 23

def statuses(params = {})
  get('/statuses', params)
end

#update_status(id, params = {}) ⇒ Object

Public: Update a status identified from its ID and returns extended information for it.

id - A String that represent the status ID. params - The Hash used to update the resource (default: {}).

Returns Hashie The updated status.



57
58
59
# File 'lib/lelylan/client/status.rb', line 57

def update_status(id, params = {})
  put("/statuses/#{id}", params)
end