Packages

Webhook delivery, monitoring, and management API. All endpoints under `/v1` require authentication via `Authorization: Bearer <api_key>` header unless marked as **Public**.

Current section

Files

Jump to
hooksniff lib hook_sniff_api api playground.ex
Raw

lib/hook_sniff_api/api/playground.ex

# NOTE: This file is auto generated by OpenAPI Generator 7.22.0 (https://openapi-generator.tech).
# Do not edit this file manually.
defmodule HookSniffAPI.Api.Playground do
@moduledoc """
API calls for all endpoints tagged `Playground`.
"""
alias HookSniffAPI.Connection
import HookSniffAPI.RequestBuilder
@doc """
Get playground info (endpoints, sample payloads)
### Parameters
- `connection` (HookSniffAPI.Connection): Connection to server
- `opts` (keyword): Optional parameters
### Returns
- `{:ok, HookSniffAPI.Model.PlaygroundGet200Response.t}` on success
- `{:error, Tesla.Env.t}` on failure
"""
@spec playground_get(Tesla.Env.client, keyword()) :: {:ok, HookSniffAPI.Model.PlaygroundGet200Response.t} | {:error, Tesla.Env.t}
def playground_get(connection, _opts \\ []) do
request =
%{}
|> method(:get)
|> url("/playground")
|> Enum.into([])
connection
|> Connection.request(request)
|> evaluate_response([
{200, HookSniffAPI.Model.PlaygroundGet200Response}
])
end
@doc """
Test a webhook delivery
### Parameters
- `connection` (HookSniffAPI.Connection): Connection to server
- `test_webhook_request` (TestWebhookRequest):
- `opts` (keyword): Optional parameters
### Returns
- `{:ok, HookSniffAPI.Model.TestWebhookResponse.t}` on success
- `{:error, Tesla.Env.t}` on failure
"""
@spec playground_test_post(Tesla.Env.client, HookSniffAPI.Model.TestWebhookRequest.t, keyword()) :: {:ok, HookSniffAPI.Model.TestWebhookResponse.t} | {:error, Tesla.Env.t}
def playground_test_post(connection, test_webhook_request, _opts \\ []) do
request =
%{}
|> method(:post)
|> url("/playground/test")
|> add_param(:body, :body, test_webhook_request)
|> Enum.into([])
connection
|> Connection.request(request)
|> evaluate_response([
{200, HookSniffAPI.Model.TestWebhookResponse}
])
end
end