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'; | |
module.exports = (context, cb) => { | |
console.log(context); | |
// post we use body | |
if(context.body.token != context.secrets.app_token){ | |
const msg = 'Not authorized to use this service outside of our company slack channel'; | |
cb(null,msg); |
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
var request = require('request-promise'); | |
module.exports = function(ctx, cb) { | |
var opts = { | |
uri: 'https://api.meetup.com/2/events.json', | |
qs:{ | |
group_id: ctx.meta.group_id, | |
key: ctx.secrets.meetup_token, | |
}, | |
json: true |
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) => { | |
const base64Codec = require('codec/base64'); | |
const xhr = require('xhr'); | |
const qs = require('codec/query_string'); | |
const credentials = { | |
url: 'https://gateway.watsonplatform.net/tone-analyzer/api/v3/tone', | |
username: '<IBM USERNAME>', | |
password: '<IBM PASSWORD>' |
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
<!-- Include the PubNub Library --> | |
<script src="https://cdn.pubnub.com/sdk/javascript/pubnub.[version number].js"></script> | |
<!-- Instantiate PubNub --> | |
<script type="text/javascript"> | |
var pubnubDemo = new PubNub({ | |
publishKey: 'Your Publish Key Here', | |
subscribeKey: 'Your Subscribe Key Here' | |
}); |
NewerOlder