From 4b171a9f9d50c6e2368b95bac554563ace8ed32b Mon Sep 17 00:00:00 2001 From: Suwatchai K Date: Wed, 2 Oct 2024 19:05:49 +0700 Subject: [PATCH] Fix Realtime database DatabaseOptions issue #154 --- README.md | 14 +++++++++++--- library.json | 2 +- library.properties | 2 +- src/core/Core.h | 2 +- src/database/RealtimeDatabase.h | 6 +++++- 5 files changed, 19 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 61ade422..032bc114 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/mobizt/FirebaseClient/.github%2Fworkflows%2Fcompile_library.yml?logo=github&label=compile) [![Github Stars](https://img.shields.io/github/stars/mobizt/FirebaseClient?logo=github)](https://github.com/mobizt/FirebaseClient/stargazers) ![Github Issues](https://img.shields.io/github/issues/mobizt/FirebaseClient?logo=github) -![GitHub Release](https://img.shields.io/github/v/release/mobizt/FirebaseClient) ![Arduino](https://img.shields.io/badge/Arduino-v1.3.11-57C207?logo=arduino) ![PlatformIO](https://badges.registry.platformio.org/packages/mobizt/library/FirebaseClient.svg) ![GitHub Release Date](https://img.shields.io/github/release-date/mobizt/FirebaseClient) +![GitHub Release](https://img.shields.io/github/v/release/mobizt/FirebaseClient) ![Arduino](https://img.shields.io/badge/Arduino-v1.3.12-57C207?logo=arduino) ![PlatformIO](https://badges.registry.platformio.org/packages/mobizt/library/FirebaseClient.svg) ![GitHub Release Date](https://img.shields.io/github/release-date/mobizt/FirebaseClient) [![GitHub Sponsors](https://img.shields.io/github/sponsors/mobizt?logo=github)](https://github.com/sponsors/mobizt) -Revision `2024-09-19T05:28:10Z` +Revision `2024-10-02T12:03:28Z` ## Table of Contents @@ -112,11 +112,14 @@ This [`FirebaseClient`](https://github.com/mobizt/FirebaseClient) library was ct > [!IMPORTANT] > For ESP8266 device usage, you should read the [Memory Options for ESP8266](#memory-options-for-esp8266) section for heap selection. +> [!NOTE] +> The Cloud Firestore Database data change listening does not support by REST API. + ## Frequently Asked Questions For the FAQ (Frequently Asked Questions), please visit [here](/FAQ.md). -## Supported Devices. +## Supported Devices * ESP8266 MCUs based boards * ESP32 MCUs based boards @@ -141,6 +144,11 @@ For the FAQ (Frequently Asked Questions), please visit [here](/FAQ.md). * SIMCom Modules with [TinyGSM](https://github.com/vshymanskyy/TinyGSM) + # Unsuppored Devices + + * All Atmega (AVR) devices + + ## Dependencies diff --git a/library.json b/library.json index c578fb9c..1f6b57a4 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "FirebaseClient", - "version": "1.3.11", + "version": "1.3.12", "keywords": "communication, REST, esp32, esp8266, arduino", "description": "Async Firebase Client library for Arduino.", "repository": { diff --git a/library.properties b/library.properties index cd5fd780..89e50bc3 100644 --- a/library.properties +++ b/library.properties @@ -1,6 +1,6 @@ name=FirebaseClient -version=1.3.11 +version=1.3.12 author=Mobizt diff --git a/src/core/Core.h b/src/core/Core.h index da88a9fa..72e2e9f7 100644 --- a/src/core/Core.h +++ b/src/core/Core.h @@ -7,7 +7,7 @@ #undef FIREBASE_CLIENT_VERSION #endif -#define FIREBASE_CLIENT_VERSION "1.3.11" +#define FIREBASE_CLIENT_VERSION "1.3.12" static void sys_idle() { diff --git a/src/database/RealtimeDatabase.h b/src/database/RealtimeDatabase.h index 7f4925c9..6f75a966 100644 --- a/src/database/RealtimeDatabase.h +++ b/src/database/RealtimeDatabase.h @@ -1,5 +1,5 @@ /** - * Created July 2, 2024 + * Created October 2, 2024 * * The MIT License (MIT) * Copyright (c) 2024 K. Suwatchai (Mobizt) @@ -1044,6 +1044,7 @@ class RealtimeDatabase : public RTDBResultBase void addParams(bool hasQueryParams, String &extras, async_request_handler_t::http_request_method method, DatabaseOptions *options, bool isFile) { URLUtil uut; + bool hasParam = hasQueryParams; if (options) { @@ -1060,7 +1061,10 @@ class RealtimeDatabase : public RTDBResultBase uut.addParam(extras, "print", "silent", hasQueryParams, true); if (options && options->filter.complete) + { + options->filter.uri[0] = !hasParam ? '?' : '&'; extras += options->filter.uri; + } } void setClientError(async_request_data_t &request, int code)