J
New
Sign in
https://jasonbase.com/things/zn1.json
Posting to Firebase
https://jasonbase.com/things/zn1.json
0
Posting to Firebase
Test posting to firebase
demo
firebase
Posting to Firebase
gliechtenstein
Clone
Comment
{ "$jason": { "head": { "title": "Posting to Firebase", "description": "Test posting to firebase", "tags": [ "firebase", "demo" ], "actions": { "fetch": { "type": "$network.request", "options": { "url": "https://posting-61bb2.firebaseio.com/result.json" }, "success": { "type": "$set", "options": { "items": "{{$jason}}" }, "success": { "type": "$render" } } }, "$load": { "trigger": "fetch" }, "$pull": { "type": "$util.alert", "options": { "title": "Enter a message", "description": "Say something", "form": [ { "name": "chat", "type": "text" } ] }, "success": { "type": "$network.request", "options": { "url": "https://posting-61bb2.firebaseio.com/result.json", "method": "post", "contentType": "json", "data": { "message": "{{$jason.chat}}", "timestamp": { ".sv": "timestamp" } } }, "success": { "trigger": "fetch" } } } }, "templates": { "body": { "sections": [ { "items": [ { "{{#if $get.items}}": { "{{#each Object.keys($get.items).map(function(key){return $get.items[key];}).sort(function(a,b){return b.timestamp - a.timestamp;})}}": { "type": "label", "text": "{{message}}" } } }, { "{{#else}}": [ { "type": "label", "text": "Pull to post" } ] } ] } ] } } } } }