Skip to content

Instantly share code, notes, and snippets.

Avatar

Xiaojing Ma randymxj

View GitHub Profile
View AWSIoTButtonPOSTtoFirebase.js
'use strict';
/**
* This is a sample AWS Lambda instance with NodeJS
* Simply sending a POST request to Google Firebase
*/
const AWS = require('aws-sdk');
/**
@randymxj
randymxj / SmartthingsHttpPostJsonToFirebase.groovy
Last active Jul 10, 2016
Sending JSON payload from Smartthings SmartApp to Google Firebase Cloud Message
View SmartthingsHttpPostJsonToFirebase.groovy
/*
Example of Smartthings SmartApp to send downstream cloud message with Firebase
Event subscription is needed to trigger the event handler
*/
def installed() {
initialize()
}
def updated() {
@randymxj
randymxj / NodeDownstreamFirebaseCloudMessage.js
Last active Jul 10, 2016
Node.js request sending downstream POST with Google Firebase Cloud Message
View NodeDownstreamFirebaseCloudMessage.js
/*
Example of Node.JS to send downstream cloud message with Firebase
NPM package request is needed in this code gist
*/
// Firebase auth key
var serverKey = "Firebase Server Key";
var clientToken= "Client Device Token"
// Payload message data