logic_monitor v0.0.9 LogicMonitor.Request
Provides the base request function and helper functions for GET and POST. Requests are authenticated using LMv1 Authentication as described here. All request functions return either {:ok, {status, data}} or {:error, reason}
Summary
Functions
Sends a GET request to the specified resource_path with the specified query_params. Sends multiple requests if more resources are available
Sends a GET request to the specified resource_path with the specified query_params. Expects a single return item
Sends a POST request to the specified resource_path with the specified query_params (as a string in the form “key1=val1&key2=val2”) and the specified payload
Sends a request using the specified method to the specified resource_path with the specified query_params (as a string in the form “key1=val1&key2=val2”) and the specified payload
Types
request_response ::
{:ok, {any, any}} |
{:error, any}
Functions
Specs
get_all(String.t, String.t) :: request_response
Sends a GET request to the specified resource_path with the specified query_params. Sends multiple requests if more resources are available.
Specs
get_one(String.t, String.t) :: request_response
Sends a GET request to the specified resource_path with the specified query_params. Expects a single return item.
Specs
post(String.t, String.t, String.t) :: request_response
Sends a POST request to the specified resource_path with the specified query_params (as a string in the form “key1=val1&key2=val2”) and the specified payload.
Specs
request(String.t, String.t, String.t, String.t) :: request_response
Sends a request using the specified method to the specified resource_path with the specified query_params (as a string in the form “key1=val1&key2=val2”) and the specified payload.