[plugin] firebase

Post your completed addons to share with the community

Post » Sat Sep 10, 2016 4:20 am

rexrainbow wrote:@remy-jay

Oops, I had broken my old capx. Here is some new sample capxs of my room plugin. And I will try to fix my old capx if possible.

Edit:

I had rewrote most of code in rex_firebase_room plugin befrore, hope it could be more easy to use.



When I try the referenced CAPX I see the following :)

https://www.dropbox.com/s/irlcn7pkxmw2p ... 2.png?dl=0
B
74
S
14
G
1
Posts: 152
Reputation: 5,051

Post » Sat Sep 10, 2016 4:24 am

@remy-jay

I see. You might update all firebase related plugins. I moved some subroutines into rex_firebase_apiv3 plugin, to remove repeated code.
B
110
S
28
G
280
Posts: 4,487
Reputation: 156,566

Post » Sat Sep 10, 2016 4:39 am

@Rexrainbow, I"m pretty sure I jumped in with rex_firebase_apiv3 from the beginning... that's the only rex_firebase_api* behavior I have in the C2 folder anyways :)
B
74
S
14
G
1
Posts: 152
Reputation: 5,051

Post » Sat Sep 10, 2016 6:16 am

@remy-jay

I had updated all firebase plugins again, to ensure that we will have the same version of plugin, please try updating them again.
B
110
S
28
G
280
Posts: 4,487
Reputation: 156,566

Post » Mon Oct 03, 2016 7:45 am

@rexrainbow

Hi, I've just started using your plugins and I need help with some of the basic, of probably some suggestion of the best practice using firebase. Lets say I have firebase db like this:

Code: Select all
"queue":
   - "queue_a":
      - "1":
         - "pax":2
         - "status":"CALLED"
      - "2":
         - "pax":1
         - "status":"WAITING"
   - "queue_b":
      - "1"
         - "pax":4
         - "status":"WAITING"
      - "2"
         - "pax":4,
         - "status":"WAITING"
"other_key":...


How can I get the count of groups waiting in each queue_a and queue_b?

So far, I've tried using your itemtable plugins: I load all items at the start of layout and display result with ItemTable.Count, but I only get the count result of the root domain. How can I get the count of subdomain? Do I need to set domain to each specific subdomain, get count, and set to another subdomain, get count again? Or in related with construct 2, is it probably better if I load all items then store it in local JSON plugin (I'm using Yann's JSON plugin) and count it from there?

I hope my question is clear enough. Thank in advanced.
B
33
S
10
G
2
Posts: 46
Reputation: 3,063

Post » Mon Oct 03, 2016 9:06 am

@tmntppn

Load the whole result into Yann's JSON plugin ( I had another JSON plugin, too ) to get items count at arbitrary node.
B
110
S
28
G
280
Posts: 4,487
Reputation: 156,566

Post » Wed Oct 05, 2016 8:57 am

Hi rex, I've come across something that I'm not sure whether it's a bug or it's intended to be.

- If I set a value (with send-set) into, lets say a tickcount, I received one callback as I think it should.
- But if I set server timestamp, I received two callbacks, both with different Firebase.LastData value.

Is this a bug?
B
33
S
10
G
2
Posts: 46
Reputation: 3,063

Post » Wed Oct 05, 2016 9:12 am

@tmntppn

Do you receive data back by "Action:Add callback"? Yes, it will receive data when the watching value has changed.
And server timestamp will receive twice, it is not a bug. First time it returns the hypothetical value from local, then it returns the real server timestamp.
To get the server timestamp value directly, try calling "Action:Add once" after sets server timestamp COMPLETED.


Edit
Here is another application plugin to get server timestamp continuously.
B
110
S
28
G
280
Posts: 4,487
Reputation: 156,566

Post » Wed Oct 05, 2016 12:21 pm

@rexrainbow Thx, I'll try your curtime plugin.

One more thing is with the FirebaseAPIV3. Is there a way to set the database URL value from construct action (such as Firebase-set domain)? The reason is because I want to be able to set this URL dynamically (I use AJAX plugin to read external config file) so I can deploy my project in two places, both needs their own db, without needing to change the programming code.
B
33
S
10
G
2
Posts: 46
Reputation: 3,063

Post » Wed Oct 05, 2016 4:07 pm

@tmntppn

I could try to add this feature, it might take some days.
B
110
S
28
G
280
Posts: 4,487
Reputation: 156,566

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 0 guests