This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": { | |
"title": "Full Name", | |
"type": "string", | |
"githubKey": "name" | |
}, | |
"email": { | |
"title": "E-Mail", | |
"type": "string", | |
"githubKey": "email", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
curl -G https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Usage/Triggers.json \ | |
-d "TriggerBy=price" \ | |
-u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
TRIGGER_ID="$1" | |
curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Usage/Triggers/$TRIGGER_ID.json \ | |
-u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
curl -XPOST https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Usage/Triggers.json \ | |
-d "CallbackUrl=$CALLBACK_URL" \ | |
-d "UsageCategory=totalprice" \ | |
-d "FriendlyName=test_trigger" \ | |
-d "TriggerBy=price" \ | |
-d "TriggerValue=5.0000" \ | |
-d "Recurring=daily" \ | |
-u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
iamRoleStatements: | |
- Effect: "Allow" | |
Action: | |
- s3:* | |
Resource: | |
- arn:aws:s3:::${env:S3_BUCKET_NAME} | |
- arn:aws:s3:::${env:S3_BUCKET_NAME}/* | |
- Effect: "Allow" | |
Action: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const IOTA = require('iota.lib.js'); | |
const iota = new IOTA({provider: process.env.IOTA_URL}); | |
const AWS = require('aws-sdk'); | |
const s3 = new AWS.S3(); | |
const sns = new AWS.SNS({ | |
region: 'ap-southeast-2' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service: TangleTrigger | |
provider: | |
name: aws | |
runtime: nodejs6.10 | |
stage: dev | |
region: ap-southeast-2 | |
environment: | |
IOTA_URL: ${env:IOTA_URL} | |
IOTA_ADDRESS: ${env:IOTA_ADDRESS} | |
S3_BUCKET_NAME: ${env:S3_BUCKET_NAME} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const IOTA = require('iota.lib.js'); | |
const iota = new IOTA({provider: process.env.IOTA_URL}); | |
var AWS = require('aws-sdk'); | |
var s3 = new AWS.S3(); | |
module.exports.checkAddress = (event, context, callback) => { | |
console.log("CHECKING ADDRESS:", process.env.IOTA_ADDRESS); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service: TangleTrigger | |
provider: | |
name: aws | |
runtime: nodejs6.10 | |
stage: dev | |
region: ap-southeast-2 | |
environment: | |
IOTA_URL: ${env:IOTA_URL} | |
IOTA_ADDRESS: ${env:IOTA_ADDRESS} | |
S3_BUCKET_NAME: ${env:S3_BUCKET_NAME} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
module.exports.checkAddress = (event, context, callback) => { | |
console.log("CHECKING ADDRESS:", process.env.IOTA_ADDRESS); | |
const searchValues = { addresses: [process.env.IOTA_ADDRESS]}; | |
iota.api.findTransactionObjects(searchValues, (err, res) => { | |
if (err) { | |
console.log("error finding transactions!", err); | |
throw err; |
NewerOlder