From 8c610e77c5d06e1cd28a672f59f7d1b67b903927 Mon Sep 17 00:00:00 2001 From: caioagiani Date: Fri, 12 Feb 2021 12:11:14 -0300 Subject: [PATCH] update: readme --- README.MD | 57 +++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 47 insertions(+), 10 deletions(-) diff --git a/README.MD b/README.MD index fa42d82..fa1458d 100644 --- a/README.MD +++ b/README.MD @@ -5,27 +5,64 @@ */ --> -
+

- MobizonBR + MobizonBR +

-

Biblioteca para comunicação API HTTP Mobizon SMS

+

Biblioteca para comunicação API HTTP Mobizon SMS

+

GitHub language count GitHub top language GitHub repo size - GitHub last commit -

+ GitHub license +

-## Installation +## Instalação -Download node at [nodejs.org](http://nodejs.org) and install it, if you haven't already. +Baixe o node em [nodejs.org](http://nodejs.org) e instale-o, caso ainda não tenha, -```sh -npm install mobizon-br or yarn install mobizon-br +Pacote: `npm i mobizon-br` ou `yarn install mobizon-br` + +## Configuração: + +```js +const mobizon = require('mobizon-br'); + +/** + * Obtenha sua chave em: https://mobizon.com.br + */ +mobizon.setKey(process.env.API_KEY); ``` -## Test + +Veja todos os [exemplos](https://github.com/mobizon/mobizon-php/tree/master/docs/examples). +```js + +(async () => { + /** + * Saldo + */ + const getBalance = await mobizon.getBalance(); + + console.log(getBalance); + + /** + * Encurtar url + */ + const short = await mobizon.short({ + fullLink: 'https://mobizon.com.br', + status: 1, + expirationDate: '', + comment: 'MobizonBR', + }); + + console.log(short); +})(); +``` + +## Testes ```javascript $ jest --setupFiles dotenv/config --detectOpenHandles --forceExit