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
export default (request, response) => { | |
const pubnub = require('pubnub'); | |
const xhr = require('xhr'); | |
const db = require("kvstore"); | |
console.log('request',request); | |
//extract from typeform | |
const tf_data = JSON.parse(request.body); | |
console.log('tf_data', tf_data) | |
const { answers } = tf_data.form_response; |
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
export default (request, response) => { | |
const kvstore = require('kvstore'); | |
const xhr = require('xhr'); | |
const PubNub = require("pubnub"); | |
let pubnub = new PubNub({ | |
publishKey: 'demo', | |
subscribeKey: 'demo' | |
}); | |
let bodyString = request.body; |
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
#%RAML 1.0 Library | |
usage: | |
types: | |
Text: !include dataTypes/dataType.raml | |
resourceTypes: | |
text: | |
post: | |
description: This API will send a secure text message with Twilio to the phone number you input | |
body: Text | |
responses: |
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
#%RAML 1.0 DataType | |
properties: | |
ToPhoneNumber: | |
description: Enter the mobile number to send a text | |
example: 15553334444 | |
type: integer | |
required: true | |
Message: | |
description: Enter your message | |
example: Text message body |
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
mediaType: application/json | |
uses: | |
library: library.raml | |
/text: | |
type: library.text |
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
#%RAML 1.0 DataType | |
properties: | |
ToPhoneNumber: | |
description: Enter the mobile number to send a text | |
example: 15553334444 | |
type: integer | |
required: true | |
Message: | |
description: Enter your message | |
example: Text message body |
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
mediaType: application/json | |
uses: | |
library: library.raml | |
/text: | |
type: library.text |
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
#%RAML 1.0 SecurityScheme | |
type: Basic Authentication | |
describedBy: | |
headers: | |
client_id: | |
type: string | |
client_secret: | |
type: string | |
responses: | |
401: |
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
securitySchemes: | |
clientIDrequired: !include securityScheme.raml |
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
securedBy: | |
- library.clientIDrequired |
OlderNewer