https://github.com/jeoooo/pocketbaseextended
(under development) Pocketbase Library for Arduino
https://github.com/jeoooo/pocketbaseextended
arduino esp32 esp8266 pocketbase
Last synced: 4 months ago
JSON representation
(under development) Pocketbase Library for Arduino
- Host: GitHub
- URL: https://github.com/jeoooo/pocketbaseextended
- Owner: jeoooo
- License: gpl-3.0
- Created: 2024-01-11T02:52:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-28T10:12:18.000Z (7 months ago)
- Last Synced: 2025-02-28T18:42:49.359Z (5 months ago)
- Topics: arduino, esp32, esp8266, pocketbase
- Language: C++
- Homepage:
- Size: 2 MB
- Stars: 13
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PocketbaseArduino

[](CONTRIBUTING.md)
[](https://opensource.org/)


[](https://github.com/jeoooo)
Arduino ESP8266/ESP32 Wrapper Library for Pocketbase
## Table of Contents
- [PocketbaseArduino](#pocketbasearduino)
- [Table of Contents](#table-of-contents)
- [Installation](#installation)
- [Usage](#usage)
- [Contributing](#contributing)
- [License](#license)## Installation
TODO: Instructions on how to install and set up your project.
## Usage
```cpp
#include "PocketBaseArduino.h"
// ESP8266
#include
#include// FOR ESP32
// #include
// #include
// #include// HTTPS REQUESTS
#includeconst char *ssid = "YOUR_SSID";
const char *password = "YOUR_PASSWORD";// Initializing the Pocketbase instance
PocketbaseArduino pb("YOUR_POCKETBASE_BASE_URL");
String record;void setup()
{
Serial.begin(115200);
WiFi.begin(ssid, password);while (WiFi.status() != WL_CONNECTED)
{
delay(1000);
Serial.println("Connecting to WiFi...");
}// Example usage of getOne() function
// getOne("record_id", "expand", "fields"),
// if expand or fields are empty place nullptr
record = pb.collection("collection_name").getOne("record_id", "expand", "fields");// Example usage of getList() function
// getList("page", "perPage", "sort", "filter", "skipTotal", "expand", "fields"),
// if expand or fields are empty place nullptr
record = pb.collection("collection_name").getList("page", "perPage", "sort", "filter", "skipTotal", "expand", "fields");// Example usage of deleteRecord function
// deleteRecord("record_id");
record = pb.collection("collection_name").deleteRecord("record_id");// printing data
Serial.println(record);
}void loop()
{
// Fetches and prints data from the 'notes' collection every 5 seconds
record = pb.collection("collection_name").getList("page", "perPage", "sort", "filter", "skipTotal", "expand", "fields");
Serial.println("Data from 'notes' collection:\n" + record);
delay(5000);
}```
## Contributing
1. [Fork](https://github.com/jeoooo/PocketbaseArduino/fork) this Github repository
2. Create your feature branch (`git checkout -b my-new-feature`).
3. Commit your changes (`git commit -am 'Add some feature`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a [pull request](https://github.com/jeoooo/PocketbaseArduino/pulls)## License
GPL-3.0 license