Builder for app.rocksky.apikey.createApikey.
Example
alias Rocksky.Apikey.Builder, as: Apikey
Apikey.new(name: "my-bot")
|> Apikey.description("scrobbles from my home server")
|> Apikey.submit(client)
Summary
Functions
Set description on the builder.
Set name on the builder.
Build a new request from a keyword list or map of fields.
Batch-set fields. attrs is a keyword list or map. Accepts the same
key forms as new/1.
Submit the builder. Returns {:ok, body} on success or
{:error, %Rocksky.Error{}} on failure.
Return the JSON body that would be sent (nil fields stripped).
Types
Functions
Set description on the builder.
Set name on the builder.
Build a new request from a keyword list or map of fields.
Accepts either the canonical lexicon key (:mbId) or its snake-cased
equivalent (:mb_id). Unknown keys raise.
Batch-set fields. attrs is a keyword list or map. Accepts the same
key forms as new/1.
@spec submit(t(), Rocksky.Client.t()) :: {:ok, term()} | {:error, Rocksky.Error.t()}
Submit the builder. Returns {:ok, body} on success or
{:error, %Rocksky.Error{}} on failure.
Returns {:error, %Rocksky.Error{reason: :missing_fields}} without
making a network call when any required field is nil.
Return the JSON body that would be sent (nil fields stripped).