# `Backplane.Oauth.Ecto.Admin.Scopes`
[🔗](https://github.com/gsmlg-opt/backplane/blob/v1.10.77/apps/backplane_oauth/lib/backplane/oauth/adapters/ecto/admin/scopes.ex#L1)

`Backplane.Oauth.Ecto.Scope` resource administration

# `create_scope`

Creates a scope.

## Examples

    iex> create_scope(%{field: value})
    {:ok, %Scope{}}

    iex> create_scope(%{field: bad_value})
    {:error, %Ecto.Changeset{}}

# `delete_scope`

Deletes a Scope.

## Examples

    iex> delete_scope(scope)
    {:ok, %Scope{}}

    iex> delete_scope(scope)
    {:error, %Ecto.Changeset{}}

# `get_scope!`

Gets a single scope.

Raises `Ecto.NoResultsError` if the Scope does not exist.

## Examples

    iex> get_scope!(123)
    %Scope{}

    iex> get_scope!(456)
    ** (Ecto.NoResultsError)

# `get_scopes_by_ids`

Return scopes corresponding to the given ids.

## Examples

    iex> get_scopes_by_ids(["9864decf-8aa4-4387-a7e4-19d1a059c912", "7b6ec16d-ad8f-4332-ac55-559184ec0f51"])
    [%Scope{}, ...]

# `get_scopes_by_names`

Return scopes corresponding to the given names.

## Examples

    iex> get_scopes_by_names(["first:scope", "second:scope"])
    [%Scope{}, ...]

# `list_scopes`

Returns the list of scopes.

## Examples

    iex> list_scopes()
    [%Scope{}, ...]

# `update_scope`

Updates a scope.

## Examples

    iex> update_scope(scope, %{field: new_value})
    {:ok, %Scope{}}

    iex> update_scope(scope, %{field: bad_value})
    {:error, %Ecto.Changeset{}}

---

*Consult [api-reference.md](api-reference.md) for complete listing*
