# googly_document_ai
Google Cloud Document AI API client library.
A modern, self-contained Elixir client for the Google Cloud Document AI API, generated by
[googly](https://github.com/). Built on [Req](https://hex.pm/packages/req) and
[Jason](https://hex.pm/packages/jason).
## Installation
```elixir
def deps do
[{:googly_document_ai, "~> 0.1.0"}]
end
```
## Usage
Authentication is your concern — pass an OAuth2 bearer token (e.g. from
[Goth](https://hex.pm/packages/goth)) via the `:token` option:
```elixir
token = Goth.fetch!(MyApp.Goth).token
{:ok, result} = Googly.DocumentAI.Operations.delete(token: token)
```
Every call returns `{:ok, decoded}` on success. Failures are
`{:error, %Googly.DocumentAI.Error{}}` for an error *response* (HTTP 4xx/5xx), or
`{:error, exception}` (e.g. `%Req.TransportError{}`) for transport-level failures.
## Docs
* [Upstream API reference](https://cloud.google.com/document-ai/docs/)