Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gpalleschi/anagram_api
Anagram API RESTful Node.js based Multilingual (Italian, Spanish, English) is a free, open source anagram api to get all anagrams from a word or a group of letter.
https://github.com/gpalleschi/anagram_api
anagram anagrams api english italian multilanguage nodejs restful-api spanish
Last synced: 9 days ago
JSON representation
Anagram API RESTful Node.js based Multilingual (Italian, Spanish, English) is a free, open source anagram api to get all anagrams from a word or a group of letter.
- Host: GitHub
- URL: https://github.com/gpalleschi/anagram_api
- Owner: gpalleschi
- License: gpl-3.0
- Created: 2023-01-04T14:56:14.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-10T16:54:55.000Z (10 days ago)
- Last Synced: 2024-11-10T17:39:43.776Z (10 days ago)
- Topics: anagram, anagrams, api, english, italian, multilanguage, nodejs, restful-api, spanish
- Language: JavaScript
- Homepage:
- Size: 2.35 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# anagram_api
Anagram API RESTful Node.js based Multilingual (English, Italian and Spanish) is a free, open source anagram api to get all anagrams from a word or a group of letter. The search id done on dictionaries on sqlite3 db. Api is superfast and extensible with another language.
## API Reference
- [Languages](#Languages)
- [Anagram](#Anagram)
- [Error Managment](#Error-Managment)
## Languages
```HTTP
GET /languages
```Return all languages managed.
**Body**
None
**Response**
```ts
{
languages: array
}
```
**Examples**`http://localhost:35907/languages`
```
Response :{
"languages": ["it",
"en",
"es"]
}```
## Anagram
**Body**
```
{
languages: string,
word: string
}```
**Response**
```ts
{
language: string,
word: string,
anagrams: array}
```
**Examples**`http://localhost:35907/anagram`
```
Body :{
"languages": "en",
"word": "AEKST"
}```
```
Response :{
"language":"en",
"word":"AEKST",
"anagrams":["KEATS",
"SKATE",
"STAKE",
"STEAK",
"TAKES"]
}
```
## Error Managment
**Error Response**
```ts
{
// Language code
error: number,
// Description error
description: string
}
```## DB Reference
Dictionaries are loaded on sqlite3 DB in a single table named dictionaries :
| Column Name | Type | Description | Mandatory |
| :-------- | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |---|
| id | `Integer` | Incremental key | Yes |
| word | `text` | String in uppercase format represent the word | Yes |
| language | `text` | Language code [en, es or it] | Yes |
| length | `integer` | Word number of characters | Yes |
| word_code | `text` | Word index generated with the sum of integer value of each unicode character of the word | Yes |### Prerequisites
* Node v19.3.0 or upper
* npm v9.2.0 or upper### Built With
* [Visual Code Editor](https://code.visualstudio.com)### NPM Modules
npm install### Run
npm start### Authors
* **Giovanni Palleschi** - [gpalleschi](https://github.com/gpalleschi)
### License
This project is licensed under the GNU GENERAL PUBLIC LICENSE 3.0 License - see the [LICENSE](LICENSE) file for details