Wardrik.Connections (wardrik_protocol v0.1.0-rc.1)

Copy Markdown

Operations on the accounts an org or person connects for their agents, by provider.

Wardrik.Connections.connect(scope, "github", owner: "acme/@jon")
#=> {:ok, %Wardrik.Connecting{provider: "github", connected: false, authorization: %Wardrik.Authorization{...}}}

Summary

Functions

List the accounts an owner is offered

Functions

connect(scope, provider, input \\ [])

@spec connect(Wardrik.Scope.t(), String.t() | struct(), term()) ::
  term() | :ok | {:error, Wardrik.Error.t()}

Connect an account

Connecting asks nobody to approve; the account is held once the person has authorized.

POST /v1/connections/{provider}

disconnect(scope, provider, input \\ [])

@spec disconnect(Wardrik.Scope.t(), String.t() | struct(), term()) ::
  term() | :ok | {:error, Wardrik.Error.t()}

Forget an account

The next call that needs it asks again.

DELETE /v1/connections/{provider}

list(scope, input \\ [])

@spec list(Wardrik.Scope.t(), term()) :: term() | :ok | {:error, Wardrik.Error.t()}

List the accounts an owner is offered

GET /v1/connections