Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mvfsillva/dialetus-service

API to Informal dictionary for the idiomatic expressions that each Brazilian region It has
https://github.com/mvfsillva/dialetus-service

api aws aws-lambda brazilian-dialects dialects dialects-mapped dynamodb idiomatic-expressions javascript json nodejs regions rest-api serverless serverless-examples serverless-offline yarn

Last synced: about 19 hours ago
JSON representation

API to Informal dictionary for the idiomatic expressions that each Brazilian region It has

Awesome Lists containing this project

README

        



[![CircleCI](https://circleci.com/gh/mvfsillva/dialetus-service.svg?style=svg&circle-token=1e9adb58a5664ddd2c80e17f641775e2cbb6346f)](https://circleci.com/gh/mvfsillva/dialetus-service)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/Naereen/StrapDown.js/blob/master/LICENSE)
[![All Contributors](https://img.shields.io/badge/all_contributors-28-orange.svg?style=flat-square)](#contributors-)

# How did the idea come about?

The idea came about through the meeting of friends who only knew each other through the internet, each one with its linguistic-cultural traits, we thought of creating an informal dictionary for the idiomatic expressions that each Brazilian region possessed, so the project was totally collaborative, bringing cultural diversity from each one of us, being able, to deepen in the our Brazilian's daily culture.

## Projects using the dialects-service

- [dialetus web](https://github.com/mvfsillva/dialetus)
- [dialetus-cli](https://github.com/bukinoshita/dialetus-cli) by [Bu Kinoshita](https://github.com/bukinoshita)
- [dialetus-ios](https://github.com/pamnovalli/dialetus-ios) by [Pamela Bembe](https://github.com/pamnovalli/dialetus-ios)

## 📃 API

All endpoints live under the URL https://dialetus-service.herokuapp.com and then generally follow the REST architecture.

All requests must be encoded as JSON with the Content-Type: application/json header. Most responses, including errors, are encoded exclusively as JSON as well.

### Structure of dialect object

The dialect object in `dialects` folder has the following fields:

```js
{
"dialect": String,
"meanings": Array,
"examples": Array,
"synonyms": Array // (optional)
}
```

### GET /regions

List all regions available with the total mapped dialects.

#### Request

```bash
$ curl https://dialetus-service.herokuapp.com/regions
```

#### Response

```json
[{
"name": "alagoanes",
"total": 64
}, {
"name": "amazones",
"total": 9
}, {
"name": "baianes",
"total": 42
}, {
"name": "carioques",
"total": 14
}, {
"name": "catarines",
"total": 22
}, {
"name": "cearences",
"total": 10
}, {
"name": "gauches",
"total": 25
}, {
"name": "lageanes",
"total": 28
}, {
"name": "maranhes",
"total": 15
}, {
"name": "mineires",
"total": 26
}, {
"name": "paraense",
"total": 30
}, {
"name": "paranes",
"total": 53
}, {
"name": "paulistes",
"total": 16
}, {
"name": "pernambuques",
"total": 17
}, {
"name": "piauies",
"total": 30
}, {
"name": "potiguares",
"total": 35
}, {
"name": "rondones",
"total": 9
}, {
"name": "sergipanes",
"total": 11
}]
```

### GET /regions/:region/dialects

List all dialects mapped.

#### Request

```bash
$ curl https://dialetus-service.herokuapp.com/regions/baianes/dialects
```

#### Response

```json
[
{
"slug": "relaxe-mo-fiu",
"dialect": "Relaxe mô fiu.",
"meanings": [
"Sem problemas",
"Fique tranquilo"
],
"examples": [
"Ô vei, relaxe mô fiu todo nervoso ele."
]
},
{
"slug": "e-bala",
"dialect": "É bala!",
"meanings": [
"algo interessante",
"massa"
],
"examples": [
"Que computador bala!"
]
},
{
"slug": "comer-agua",
"dialect": "Comer água!",
"meanings": [
"Vodka",
"Cerveja",
"Qualquer bebida que contenha álcool"
],
"examples": [
"Vamo pro reg comer água galera!"
]
},
]
```

### GET /regions/:region/dialects/:slug

Get a dialect by slug.

#### Request

```bash
$ curl https://dialetus-service.herokuapp.com/regions/baianes/dialects/relaxe-mo-fiu
```

#### Response

```json
{
"slug": "relaxe-mo-fiu",
"dialect": "Relaxe mô fiu.",
"meanings": [
"Sem problemas",
"Fique tranquilo"
],
"examples": [
"Ô vei, relaxe mô fiu todo nervoso ele."
]
}
```

### GET /search?q={words}

Search the words in all dialects mapped.

#### Request

```bash
$ curl https://dialetus-service.herokuapp.com/search?q=regui
```

#### List of dialects

### GET /dialect

```bash
GET /dialect

# /dialect/:region
GET /dialect/baianes
GET /dialect/mineires
GET /dialect/paranes
GET /dialect/carioques
GET /dialect/potiguares
GET /dialect/rondones
GET /dialect/cearences
GET /dialect/pernambuques
GET /dialect/piauies
GET /dialect/catarines
GET /dialect/paraense
GET /dialect/gauches
```

#### Response

```json
{
"baianes": [
{
"slug": "regui",
"dialect": "Regui",
"meanings": [
"Reunião com os amigos",
"Balada",
"Festa"
],
"examples": [
"Ô mizera, bora pro regui logo vá!"
]
},
{
"slug": "num-to-comeno-regui",
"dialect": "Num tô comeno regui",
"meanings": [
"Não acreditar em algo",
"Não se importar"
],
"examples": [
"Num tô comeno regui não viu pae."
]
}
]
}
```

#### Request

```bash
$ curl https://dialetus-service.herokuapp.com/search?q=Virado no cão
```

#### Response

```json
{
"baianes": [{
"slug": "virado-no-cao",
"dialect": "Virado no cão",
"meanings": [
"Mal humorado",
"Aborrecido"
],
"examples": [
"Eu to virado no cão, o primeiro que passar na minha frente vou rumaláporra!"
]
}]
}
```

#### Request

```bash
$ curl https://dialetus-service.herokuapp.com/search?q=baita
```

#### Response

```json
{
"gauches": [{
"slug": "baita",
"dialect": "Baita",
"meanings": [
"Grande",
"Imenso"
],
"examples": [
"Bah tchê, que baita de um problema tu arranjaste?!"
]
}],
"paranes": [{
"slug": "baita",
"dialect": "Baita",
"meanings": [
"grande",
"enorme",
"de grandes proporções"
],
"examples": [
"Mas que baita susto tu me deu"
]
}]
}
```

### GET /flags

List all flags of a dialects available.

#### Request

```bash
$ curl https://dialetus-service.herokuapp.com/flags
```

#### Response

```json
{
"flags": [
{
"key": "alagoanes",
"url": "https://mydomain.com.br/database/flags/alagoanes.svg"
},
{
"key": "amazones",
"url": "https://mydomain.com.br/database/flags/amazones.svg"
},
{
"key": "baianes",
"url": "https://mydomain.com.br/database/flags/baianes.svg"
},
{
"key": "carioques",
"url": "https://mydomain.com.br/database/flags/carioques.svg"
},
{
"key": "catarines",
"url": "https://mydomain.com.br/database/flags/catarines.svg"
},
{
"key": "cearences",
"url": "https://mydomain.com.br/database/flags/cearences.svg"
},
{
"key": "gauches",
"url": "https://mydomain.com.br/database/flags/gauches.svg"
},
{
"key": "lageanes",
"url": "https://mydomain.com.br/database/flags/lageanes.svg"
},
{
"key": "maranhes",
"url": "https://mydomain.com.br/database/flags/maranhes.svg"
},
{
"key": "mineires",
"url": "https://mydomain.com.br/database/flags/mineires.svg"
},
{
"key": "paraense",
"url": "https://mydomain.com.br/database/flags/paraense.svg"
},
{
"key": "paranes",
"url": "https://mydomain.com.br/database/flags/paranes.svg"
},
{
"key": "paulistes",
"url": "https://mydomain.com.br/database/flags/paulistes.svg"
},
{
"key": "pernambuques",
"url": "https://mydomain.com.br/database/flags/pernambuques.svg"
},
{
"key": "piauies",
"url": "https://mydomain.com.br/database/flags/piauies.svg"
},
{
"key": "potiguares",
"url": "https://mydomain.com.br/database/flags/potiguares.svg"
},
{
"key": "rondones",
"url": "https://mydomain.com.br/database/flags/rondones.svg"
},
{
"key": "sergipanes",
"url": "https://mydomain.com.br/database/flags/sergipanes.svg"
}
]
}
```

### GET /flags/:key

Get a dialect flag by key.

#### Request

```bash
$ curl https://dialetus-service.herokuapp.com/flags/baianes
```

#### Response

```json
{
"flag": {
"key": "baianes",
"url": "https://mydomain.com.br/database/flags/baianes.svg"
}
}
```

## Contribute 🍕
### 01. Install dependencies

```sh
$ yarn
```

### 02. Create configs

Create a `.env` file at the root of the project. Make sure you follow the [`.env.example`](.env.example) file as a guide.

### 03. Run project

```sh
$ yarn dev
```

### 04. Learn more in the Contributing guide

Please take a look at the [contributing guide](.github/contributing.md).

## Respect earns Respect 👏

Please respect our [Code of Conduct](.github/code-of-conduct.md), in short:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

## Authors 😎

- Marcus Silva ([@mvfsillva](https://github.com/mvfsillva))
- Angelmario Santana ([@anfsantana](https://github.com/anfsantana))
- Jader Gomes ([@jdrgomes](https://github.com/jdrgomes))
- Rodolfo Silva ([@RodolfoSilva](https://github.com/RodolfoSilva))

## Maintainers
- Marcus Silva ([@mvfsillva](https://github.com/mvfsillva))
- Mateus Malaquias ([@malaquiasdev](https://github.com/malaquiasdev))

## Contributors 🎉
Thanks goes out to all these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):

| [
Marcus Silva](https://github.com/mvfsillva)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=mvfsillva "Code") [📖](https://github.com/mvfsillva/dialetus-service/commits?author=mvfsillva "Documentation") [👀](#review-mvfsillva "Reviewed Pull Requests") | [
Angelmário Santana](https://github.com/anfsantana)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=anfsantana "Code") [📖](https://github.com/mvfsillva/dialetus-service/commits?author=anfsantana "Documentation") [👀](#review-anfsantana "Reviewed Pull Requests") | [
Rodolfo Silva](http://www.rodolfosilva.com)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=RodolfoSilva "Code") [📖](https://github.com/mvfsillva/dialetus-service/commits?author=RodolfoSilva "Documentation") [👀](#review-RodolfoSilva "Reviewed Pull Requests") | [
Bruno Pulis](http://www.brunopulis.com)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=brunopulis "Code") | [
Wellington Mitrut](https://medium.com/blog-do-mitrut/)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=Wmitrut "Code") | [
Diego Ramos](https://www.linkedin.com/in/rdiego26/)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=rdiego26 "Code") | [
Caio Alcântara](http://sourcerer.io/clucasalcantara)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=clucasalcantara "Code") |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| [
Lucas Farias](https://medium.com/@luksrn)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=luksrn "Code") | [
Higor Morais](https://github.com/higorae)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=higorae "Code") | [
Medson Mendes](https://github.com/lmedson)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=lmedson "Code") | [
Randѕon Oliveira](https://rands0n.com)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=rands0n "Code") | [
Murillo de Miranda Pereira](https://twitter.com/murillomirandaa)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=murillo94 "Code") | [
Rafael Nunes](http://peaonunes.github.io/)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=peaonunes "Code") | [
Will Mendes](https://medium.com/@willmendesneto)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=willmendesneto "Code") |
| [
kathleenrego](https://github.com/kathleenrego)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=kathleenrego "Code") | [
Jader](https://github.com/jdrgomes)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=jdrgomes "Code") | [
Rodolfo Candido](https://github.com/rdl-candido)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=rdl-candido "Code") | [
Jefferson Moura](http://jeffersonmourak.me)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=jeffersonmourak "Code") | [
Raphael Amorim](http://raphamorim.io)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=raphamorim "Code") | [
Adriano Canofre](https://adrianocanofre.github.io/)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=adrianocanofre "Code") | [
Maurício Coelho](https://github.com/mauscoelho)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=mauscoelho "Code") |
| [
Marcela Barella](https://twitter.com/MarcelaBarella)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=MarcelaBarella "Code") | [
Matheus Monte](https://matheusmonte.github.io/)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=matheusmonte "Code") | [
Gabriel Kalani](https://gkal19.github.io)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=gkal19 "Code") | [
Ruan Kaylo](https://ruankaylo.netlify.com)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=RuanAyram "Code") | [
Thiago Guimarães](https://github.com/thiagogsr)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=thiagogsr "Code") | [
Welkson Ramos](https://twitter.com/welksonramos)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=welksonramos "Code") | [
Mateus Malaquias](http://malaquias.dev)
[💻](https://github.com/mvfsillva/dialetus-service/commits?author=malaquiasdev "Code") |

## License

Dialetus is released under the [MIT license](license).

Copyright © 2019.