diff --git a/README.md b/README.md index 973829c..7bb2884 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,23 @@ implementation 'io.supabase:postgrest-kt:{version}' ### Initializing the client +## strings.xml +```xml + + https://1234.supabase.co/rest/v1 + db.1234.supabase.co + eyJ1234c + +``` + + ```kotlin -val postgrestClient = PostgrestDefaultClient( - uri = URI("http://localhost:3111"), - headers = mapOf("Authorization" to "foobar") + var serviceKey: String = resources.getString(R.string.supabase_key); + val postgrestClient = PostgrestDefaultClient( + uri = URI(resources.getString(R.string.base_url)), + headers = mapOf("Authorization" to "Bearer $serviceKey", "apikey" to serviceKey) ) + ``` You can also pass in a custom schema using the `schema` parameter. @@ -206,4 +218,4 @@ val postgrestClient = PostgrestClient( httpClient = customHttpClient(), jsonConverter = customConverter() ) -``` \ No newline at end of file +```