Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documenting #2

Merged
merged 2 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions LEIAME.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# bacenptax-gas

## ctrl+s :v:

**BacenPtax** é uma biblioteca JavaScript para o Google Apps Script para obter cotações de moedas do Banco Central do Brasil (Bacen) através do sistema PTAX. Essa biblioteca facilita a integração de seus projetos com os dados de câmbio mais atualizados, permitindo que você construa soluções personalizadas para suas necessidades.


## Funcionalidades:

* **Obtenção de cotações:** Recupera as cotações de diversas moedas em uma data específica.
* **Formatação de datas:** Formata datas para atender aos requisitos da API do Bacen.
* **Construção de endpoints:** Gera automaticamente os endpoints para as requisições HTTP.
* **Facilidade de uso:** Interface simples e intuitiva para interagir com a API do Bacen.


## Como usar:

Para utilizar o **BacenPtax** em seu script do Google Apps Script, siga os seguintes passos:

1. Abra o script do Google Apps Script onde deseja utilizar a biblioteca.
2. Acesse **Biblioteca > Adicionar bibliotecas**.
3. Cole a ID do projeto:

```plaintext
1mu3XX24jnB9iIr5Zwfse4BGwPYxn0YQR_ChnrvuXu6BaHdqW_RnUych6
```


**Exemplo:**

```javascript
function getDollarQuote() {

var code = 'usd';
var quote = BacenPtax.getPriceQuote(code, '10/22/2024');

Logger.log(quote);

}
```

---

Agradeço por considerar **BacenPtax** para as suas necessidades. Se você tiver alguma dúvida ou precisar de mais assistência, não hesite em entrar em contato.

<br />
<br />
<div align="center">
<a href="https://bitbucket.org/rmottalabs/"><img alt="Static Badge" src="https://img.shields.io/badge/-Bitbucket?style=social&logo=bitbucket&logoSize=auto&label=Bitbucket&link=https%3A%2F%2Fbitbucket.org%2Frmottalabs%2Fworkspace%2Foverview%2F"></a>
<a href="https://gitlab.com/rmottanet"><img alt="Static Badge" src="https://img.shields.io/badge/-Gitlab?style=social&logo=gitlab&logoSize=auto&label=Gitlab&link=https%3A%2F%2Fgitlab.com%2Frmottanet"></a>
<a href="https://github.com/rmottanet"><img alt="Static Badge" src="https://img.shields.io/badge/-Github?style=social&logo=github&logoSize=auto&label=Github&link=https%3A%2F%2Fgithub.com%2Frmottanet"></a>
<a href="https://hub.docker.com/"><img alt="Static Badge" src="https://img.shields.io/badge/-DockerHub?style=social&logo=docker&logoSize=auto&label=DockerHub&link=https%3A%2F%2Fhub.docker.com%2Fu%2Frmottanet"></a>
</div>
51 changes: 51 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,52 @@
# bacenptax-gas

## ctrl+s :v:

**BacenPtax** is a JavaScript library for Google Apps Script to obtain currency quotes from the Central Bank of Brazil (Bacen) via the PTAX system. This library makes it easy to integrate your projects with the most up-to-date exchange rate data, allowing you to build customized solutions for your needs.


## Features:

* **Quotation retrieval:** Retrieves the quotations of various currencies on a specific date.
* **Date formatting:** Formats dates to meet the requirements of the Bacen API.
* **Endpoint construction:** Automatically generates endpoints for HTTP requests.
* **Ease of use:** Simple and intuitive interface for interacting with the Bacen API.


## How to use:

To use **BacenPtax** in your Google Apps Script, follow these steps:

1. Open the Google Apps Script script where you want to use the library.
2. Go to **Library > Add libraries**.
3. Paste the project ID:

```plaintext
1mu3XX24jnB9iIr5Zwfse4BGwPYxn0YQR_ChnrvuXu6BaHdqW_RnUych6
```

**Exemple:**

```javascript
function getDollarQuote() {

var code = 'usd';
var quote = BacenPtax.getPriceQuote(code, '10/22/2024');

Logger.log(quote);

}
```

---

Thank you for considering the **BacenPtax** for your needs. If you have any questions or need further assistance, please don't hesitate to reach out.

<br />
<br />
<div align="center">
<a href="https://bitbucket.org/rmottalabs/"><img alt="Static Badge" src="https://img.shields.io/badge/-Bitbucket?style=social&logo=bitbucket&logoSize=auto&label=Bitbucket&link=https%3A%2F%2Fbitbucket.org%2Frmottalabs%2Fworkspace%2Foverview%2F"></a>
<a href="https://gitlab.com/rmottanet"><img alt="Static Badge" src="https://img.shields.io/badge/-Gitlab?style=social&logo=gitlab&logoSize=auto&label=Gitlab&link=https%3A%2F%2Fgitlab.com%2Frmottanet"></a>
<a href="https://github.com/rmottanet"><img alt="Static Badge" src="https://img.shields.io/badge/-Github?style=social&logo=github&logoSize=auto&label=Github&link=https%3A%2F%2Fgithub.com%2Frmottanet"></a>
<a href="https://hub.docker.com/"><img alt="Static Badge" src="https://img.shields.io/badge/-DockerHub?style=social&logo=docker&logoSize=auto&label=DockerHub&link=https%3A%2F%2Fhub.docker.com%2Fu%2Frmottanet"></a>
</div>