Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite1bc354

Browse files
committed
Merge pull requestFirebaseExtended#89 from proppy/fix-ctor
firebase: fix ctor
2 parentsee9644c +24d0f82 commite1bc354

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

‎examples/FirebasePush_ESP8266/FirebasePush_ESP8266.ino‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
#include<Firebase.h>
2121

2222
// create firebase client.
23-
Firebase fbase = Firebase("example.firebaseio.com")
24-
.auth("secret_or_token");
23+
Firebasefbase("example.firebaseio.com","secret_or_token");
24+
2525
voidsetup() {
2626
Serial.begin(9600);
2727

‎src/Firebase.cpp‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,10 @@ String makeFirebaseURL(const String& path, const String& auth) {
4040

4141
}// namespace
4242

43-
Firebase::Firebase(const String& host) : host_(host) {
43+
Firebase::Firebase(const String& host,const String& auth) : host_(host), auth_(auth) {
4444
http_.setReuse(true);
4545
}
4646

47-
Firebase&Firebase::auth(const String& auth) {
48-
auth_ = auth;
49-
return *this;
50-
}
51-
5247
FirebaseGetFirebase::get(const String& path) {
5348
returnFirebaseGet(host_, auth_, path, &http_);
5449
}

‎src/Firebase.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ class FirebaseStream;
3535
// Firebase REST API client.
3636
classFirebase {
3737
public:
38-
Firebase(const String& host);
39-
Firebase&auth(const String& auth);
38+
Firebase(const String& host,const String& auth ="");
4039

4140
// Fetch json encoded `value` at `path`.
4241
FirebaseGetget(const String& path);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp