Module: Lelylan::Client::Function
- Included in:
- Lelylan::Client
- Defined in:
- lib/lelylan/client/function.rb
Instance Method Summary collapse
-
#create_function(params = {}) ⇒ Object
Public: Create a function and returns extended information for it.
-
#delete_function(id) ⇒ Object
Public: Delete a function identified from its ID and returns extended information for it.
-
#function(id) ⇒ Object
Public: Returns extended information for a given function identified from its ID.
-
#functions(params = {}) ⇒ Object
Public: Returns a list of owned functions.
-
#public_functions(params = {}) ⇒ Object
Public: Returns a list of all existing functions.
-
#update_function(id, params = {}) ⇒ Object
Public: Update a function identified from its ID and returns extended information for it.
Instance Method Details
#create_function(params = {}) ⇒ Object
Public: Create a function and returns extended information for it.
params - The Hash used to create the resource (default: {}).
Returns Hashie The created function.
45 46 47 |
# File 'lib/lelylan/client/function.rb', line 45 def create_function(params = {}) post('/functions', params) end |
#delete_function(id) ⇒ Object
Public: Delete a function identified from its ID and returns extended information for it.
id - A String that represent the function ID.
Returns Hashie The deleted function.
68 69 70 |
# File 'lib/lelylan/client/function.rb', line 68 def delete_function(id) delete("/functions/#{id}") end |
#function(id) ⇒ Object
Public: Returns extended information for a given function identified from its ID.
id - A String that represent the function ID.
Returns Hashie The function.
12 13 14 |
# File 'lib/lelylan/client/function.rb', line 12 def function(id) get("/functions/#{id}") end |
#functions(params = {}) ⇒ Object
Public: Returns a list of owned functions.
params - The Hash used to refine the search (default: {}).
Returns Array List of functions.
23 24 25 |
# File 'lib/lelylan/client/function.rb', line 23 def functions(params = {}) get('/functions', params) end |
#public_functions(params = {}) ⇒ Object
Public: Returns a list of all existing functions.
params - The Hash used to refine the search (default: {}).
Returns Array List of functions.
34 35 36 |
# File 'lib/lelylan/client/function.rb', line 34 def public_functions(params = {}) get('/functions/public', params) end |
#update_function(id, params = {}) ⇒ Object
Public: Update a function identified from its ID and returns extended information for it.
id - A String that represent the function ID. params - The Hash used to update the resource (default: {}).
Returns Hashie The updated function.
57 58 59 |
# File 'lib/lelylan/client/function.rb', line 57 def update_function(id, params = {}) put("/functions/#{id}", params) end |