Class Client
- Namespace
- Supabase
- Assembly
- Supabase.dll
A class representing the Supabase Client, coordinating between all child APIs
public class Client : ISupabaseClient<User, Session, RealtimeSocket, RealtimeChannel, Bucket, FileObject>
- Inheritance
-
Client
- Implements
- Inherited Members
Constructors
Client(IGotrueClient<User, Session>, IRealtimeClient<RealtimeSocket, RealtimeChannel>, IFunctionsClient, IPostgrestClient, IStorageClient<Bucket, FileObject>, SupabaseOptions)
Constructor supplied for dependency injection support.
public Client(IGotrueClient<User, Session> auth, IRealtimeClient<RealtimeSocket, RealtimeChannel> realtime, IFunctionsClient functions, IPostgrestClient postgrest, IStorageClient<Bucket, FileObject> storage, SupabaseOptions options)
Parameters
auth
IGotrueClient<User, Session>realtime
IRealtimeClient<RealtimeSocket, RealtimeChannel>functions
IFunctionsClientpostgrest
IPostgrestClientstorage
IStorageClient<Bucket, FileObject>options
SupabaseOptions
Client(string, string?, SupabaseOptions?)
Creates a new Supabase Client.
public Client(string supabaseUrl, string? supabaseKey, SupabaseOptions? options = null)
Parameters
supabaseUrl
stringsupabaseKey
stringoptions
SupabaseOptions
Properties
Auth
Supabase Auth allows you to create and manage user sessions for access to data that is secured by access policies.
public IGotrueClient<User, Session> Auth { get; set; }
Property Value
Functions
Supabase Edge functions allow you to deploy and invoke edge functions.
public IFunctionsClient Functions { get; set; }
Property Value
Postgrest
Supabase Postgrest allows for strongly typed REST interactions with the your database.
public IPostgrestClient Postgrest { get; set; }
Property Value
Realtime
Supabase Realtime allows for realtime feedback on database changes.
public IRealtimeClient<RealtimeSocket, RealtimeChannel> Realtime { get; set; }
Property Value
Storage
Supabase Storage allows you to manage user-generated content, such as photos or videos.
public IStorageClient<Bucket, FileObject> Storage { get; set; }
Property Value
Methods
AdminAuth(string)
Returns a Stateless Gotrue Admin client given a service_key JWT. This should really only be accessed from a server environment where a private service_key would remain secure.
public IGotrueAdminClient<User> AdminAuth(string serviceKey)
Parameters
serviceKey
string
Returns
From<TModel>()
Gets the Postgrest client to prepare for a query.
public ISupabaseTable<TModel, RealtimeChannel> From<TModel>() where TModel : BaseModel, new()
Returns
- ISupabaseTable<TModel, RealtimeChannel>
Type Parameters
TModel
InitializeAsync()
Attempts to retrieve the session from Gotrue (set in SupabaseOptions) and connects to realtime (if options.AutoConnectRealtime
is set)
public Task<ISupabaseClient<User, Session, RealtimeSocket, RealtimeChannel, Bucket, FileObject>> InitializeAsync()
Returns
Rpc(string, object?)
Perform a stored procedure call.
public Task<BaseResponse> Rpc(string procedureName, object? parameters)
Parameters
procedureName
stringThe function name to call
parameters
objectThe parameters to pass to the function call
Returns
Rpc<TModeledResponse>(string, object?)
Perform a stored procedure call.
public Task<TModeledResponse?> Rpc<TModeledResponse>(string procedureName, object? parameters)
Parameters
procedureName
stringThe function name to call
parameters
objectThe parameters to pass to the function call
Returns
- Task<TModeledResponse>
A hydrated model
Type Parameters
TModeledResponse
A type used for hydrating the HTTP response content (hydration through JSON.NET)