Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/PRCV1/pocketbase-csharp-sdk
https://github.com/PRCV1/pocketbase-csharp-sdk
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/PRCV1/pocketbase-csharp-sdk
- Owner: PRCV1
- License: mit
- Archived: true
- Created: 2022-10-06T20:34:21.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-11-13T21:17:53.000Z (about 1 year ago)
- Last Synced: 2024-07-31T20:39:32.452Z (4 months ago)
- Language: C#
- Size: 400 KB
- Stars: 57
- Watchers: 6
- Forks: 6
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-pocketbase - GitHub
- awesome-pocketbase - GitHub
- awesome-pocketbase - C# - PocketBase Client in C#. ![GitHub Repo stars](https://img.shields.io/github/stars/PRCV1/pocketbase-csharp-sdk) (Unofficial PocketBase Clients (SDKs))
README
PocketBase C# SDK
======================================================================
This project is currently still under development. It is not recommended to use it in a productive environment. Things can and will change.Community-developed C# SDK (Multiplatform) for interacting with the [PocketBase API](https://pocketbase.io/docs)
- [PocketBase C# SDK](#pocketbase-c-sdk)
- [Installation](#installation)
- [Nuget](#nuget)
- [Usage](#usage)
- [Development](#development)
- [Requirements](#requirements)
- [Steps](#steps)# Installation
## Nuget
Coming soon
# Usage
```c#
//create a new Client which connects to your PocketBase-API
var client = new PocketBase("http://127.0.0.1:8090");//authenticate as a Admin
var admin = await client.Admin.AuthenticateWithPassword("[email protected]", "0123456789");//or as a User
var user = await client.User.AuthenticateWithPassword("[email protected]", "0123456789");//query some data (for example, some restaurants)
//note that each CRUD action requires a data type which inherits from the base class 'ItemBaseModel'.
var restaurantList = await client.Records.ListAsync("restaurants");//like this one
class Restaurant : ItemBaseModel
{
public string? Name { get; set; }
}
```# Development
## Requirements
- Visual Studio (Community Edition should work just fine)
- .NET 6/7 SDK## Steps
1. Clone this repository
```cmd
git clone https://github.com/PRCV1/pocketbase-csharp-sdk
```
2. Open the [pocketbase-csharp-sdk.sln](pocketbase-csharp-sdk.sln) with Visual Studio (Community Edition should work just fine)