Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigobranas committed Apr 3, 2020
1 parent 9381d8e commit f9f2a65
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
16 changes: 16 additions & 0 deletions api/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const axios = require('axios');

(async function () {
const sms = await axios({
url: 'https://api2.totalvoice.com.br/sms',
method: 'post',
headers: {
'Access-Token': process.env.TOTALVOICE_API_KEY
},
data: {
'numero_destino': process.env.RODRIGOBRANAS_TELEPHONE,
'mensagem': 'Inscreva-se no canal Rodrigo Branas e fique por dentro de todas as novidades do mundo da programação!'
}
});
console.log(sms.data);
})();
37 changes: 37 additions & 0 deletions api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions api/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "api",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"axios": "^0.19.2"
}
}

0 comments on commit f9f2a65

Please sign in to comment.