Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
zoedsoupe committed Apr 15, 2024
1 parent a6c24f2 commit 4ab3b06
Show file tree
Hide file tree
Showing 9 changed files with 1,021 additions and 391 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ result

# Ignore credentials
.env

.elixir-tools/
.lexical/
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
# Supabase PostgREST

**TODO: Add description**
[PostgREST](https://postgrest.org/en/v12/) implementation for the `supabase_potion` SDK in Elixir.

## Installation

```elixir
def deps do
[
{:supabase_potion, "~> 0.3"},
{:supabase_postgrest, "~> 0.1"}
]
end
```

## Usage

Firstly you need to initialize your Supabase client(s) as can be found on the [supabase_potion documentation](https://hexdocs.pm/supabase_potion/Supabase.html#module-starting-a-client):

```elixir
iex> Supabase.init_client(%{name: Conn, conn: %{base_url: "<supa-url>", api_key: "<supa-key>"}})
{:ok, #PID<>}
```

Now you can pass the Client to the `Supabase.PostgREST` functions as a `PID` or the name that was registered on the client initialization:

```elixir
iex> Supabase.Storage.list_buckets(pid | client_name)
```
Loading

0 comments on commit 4ab3b06

Please sign in to comment.