Skip to content

Commit

Permalink
0.0.5 composer.json and changelog updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelwendel committed May 17, 2023
1 parent 82ec711 commit b302d59
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changes in PHPSupabase #

## 0.0.5 - 2022-05-17

### Changed

- Change the Service class constructor to accept the URI base without suffix. It is now possible to use a single service instance to create an auth object or database/querybuilder objects.
- Change the `getUriBase` method.
- Change on Auth, Database and QueryBuilder the methods that called `getUriBase`, setting now the suffix (`auth/v1` or `rest/v1`)

### Added

- Create `suffix` attribute in Auth, Database and QueryBuilder classes to set the respective suffix of URI (`auth/v1` or `rest/v1`)


## 0.0.4 - 2022-12-15

### Fixed
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ composer require rafaelwendel/phpsupabase

## How to use

To use the PHPSupabse library you must have an account and a project created in the Supabase panel. In the project settings (API section), you should note down your project's `API key` and `URL`. (NOTE: Basically we have 2 suffixes to use with the url: `/rest/v1` & `/auth/v1`)
To use the PHPSupabse library you must have an account and a project created in the Supabase panel. In the project settings (API section), you should note down your project's `API key` and `URL`. (NOTE: Basically we have 2 suffixes to use with the url: `/rest/v1` & `/auth/v1`, but since version `0.0.5` the definition of one of these suffixes is optional)

To start, let's instantiate the `Service()` class. We must pass the `API key` and `url` (with one of the suffixes mentioned above) in the constructor
To start, let's instantiate the `Service()` class. We must pass the `API key` and `url` in the constructor

```php
<?php
Expand All @@ -59,7 +59,13 @@ require "vendor/autoload.php";

$service = new PHPSupabase\Service(
"YOUR_API_KEY",
"https://aaabbbccc.supabase.co/auth/v1/"
"https://aaabbbccc.supabase.co"
);

//In versions 0.0.4 or earlier it is necessary to set the suffix
$service = new PHPSupabase\Service(
"YOUR_API_KEY",
"https://aaabbbccc.supabase.co/auth/v1" // or https://aaabbbccc.supabase.co/rest/v1
);
```

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "rafaelwendel/phpsupabase",
"description" : "PHPSupabase is a library written in php language, which allows you to use the resources of a project created in Supabase (https://supabase.io), through integration with its Rest API.",
"keywords": ["supabase", "php", "client"],
"version" : "0.0.4",
"version" : "0.0.5",
"type": "library",
"homepage": "https://github.com/rafaelwendel/phpsupabase",
"license": "MIT",
Expand Down

0 comments on commit b302d59

Please sign in to comment.