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 axios = require("axios"); | |
function salvar(valor1, valor2, valor3){ | |
axios.post('SUA_URL',{ | |
"data": { | |
"valor1": valor1, | |
"valor2": valor2, | |
"valor3": valor3, | |
} | |
},{ |
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 functions = require('firebase-functions'); | |
const {WebhookClient} = require('dialogflow-fulfillment'); | |
var nodemailer = require('nodemailer'); | |
function enviarEmail(usuario, produto, quantidade){ | |
// Configurações do Email | |
var transporter = nodemailer.createTransport({ | |
service: 'gmail', |
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 = function(controller) { | |
// Mensagens | |
controller.hears(['Oi', 'Olá!'],'message', async(bot, message) => { | |
await bot.reply(message, 'Olá!'); | |
}); | |
controller.hears(new RegExp(/^meu nome é (.*?)$/i), 'message', async(bot, message) => { | |
let param = message.matches[1]; | |
await bot.reply(message, `Bem-vindo ${ param }!`); | |
}); |
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
controller.hears('get_started', 'facebook_postback', async(bot, message) => { | |
await bot.reply(message, `Vamos começar!`); | |
await bot.reply(message, { | |
text: 'Qual é o seu nome?', | |
quick_replies: [ | |
{ | |
title: "Michael", | |
payload: "meu nome é Michael", | |
}, | |
{ |
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
controller.on('facebook_postback', async(bot, message) => { | |
await bot.reply(message,`Escutei o seguinte postback: ${ message.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
controller.hears('get_started', 'facebook_postback', async(bot, message) => { | |
await bot.reply(message, `Vamos começar!`); | |
await bot.reply(message, `Qual é o seu nome?`); | |
}); |
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 = function(controller) { | |
controller.hears(new RegExp(/^meu nome é (.*?)$/i), 'message', async(bot, message) => { | |
let param = message.matches[1]; | |
await bot.reply(message, `Bem-vindo ${ param }!`); | |
}); | |
} |
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 = function(controller) { | |
controller.hears(['Oi', 'Olá!'],'message', async(bot, message) => { | |
await bot.reply(message, 'Olá!'); | |
}); | |
} |
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
// Import Botkit | |
const { Botkit } = require('botkit'); | |
// Import Facebook Adapter | |
const { FacebookAdapter, FacebookEventTypeMiddleware } = require('botbuilder-adapter-facebook'); | |
// Load process.env values from .env file | |
require('dotenv').config(); | |
// Configure Facebook Adapter |
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
import SwiftUI | |
import GoogleMobileAds | |
import UIKit | |
final class Rewarded: NSObject, GADRewardedAdDelegate{ | |
var rewardedAd:GADRewardedAd = GADRewardedAd(adUnitID: rewardID) | |
var rewardFunction: (() -> Void)? = nil | |
NewerOlder