View Source Yousign.Request (yousign_ex v0.2.3)
A module for handling the internal requests to the Yousign API
Link to this section Summary
Functions
Returns the base URL for the Yousign API based on the current envorinment
Makes a request to the Yousign API
Returns the base URL for the Yousign webapp based on the current envorinment
Link to this section Functions
Returns the base URL for the Yousign API based on the current envorinment
Link to this function
make_multipart_request(atom, endpoint, body, success_status_code \\ 200)
View Source@spec make_request(atom(), String.t(), non_neg_integer()) :: {:error, any()} | {:ok, any()}
Makes a request to the Yousign API
examples
Examples
iex> Yousign.Request.make_request(:get, "signature_requests")
{:ok, %{"data" => [], "meta" => %{"pagination" => %{"total" => 0}}}}
iex> Yousign.Request.make_request(:get, "signature_requests/123")
{:ok, %{"data" => %{"id" => "123", "name" => "test"}}}
iex> Yousign.Request.make_request(:get, "signature_requests/invalid")
{:error, 404}
Link to this function
make_request_with_body(method, endpoint, body, success_status_code \\ 200)
View SourceReturns the base URL for the Yousign webapp based on the current envorinment