mirror of
https://codeberg.org/JasterV/sentences-crud.git
synced 2026-04-27 02:15:43 +00:00
Merge branch 'main' of github.com:JasterV/talentbait-test into main
This commit is contained in:
commit
09ae5f8d2e
1 changed files with 34 additions and 0 deletions
34
README.md
34
README.md
|
|
@ -5,14 +5,48 @@
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
> Nodejs CRUD app using Firebase & Firestore
|
||||||
|
|
||||||
|
## BUILD
|
||||||
|
|
||||||
|
```npm run build```
|
||||||
|
|
||||||
|
## RUN
|
||||||
|
|
||||||
|
```npm run start```
|
||||||
|
|
||||||
|
## DOCS
|
||||||
|
|
||||||
### API Authentication
|
### API Authentication
|
||||||
|
|
||||||
|
To make any request to the sentences or translation api you will need to provide an authorization header:
|
||||||
|
|
||||||
|
```{ 'Authorization': 'Bearer <token>' }```
|
||||||
|
|
||||||
### Sentences API
|
### Sentences API
|
||||||
|
|
||||||
|
+ Endpoint: `https://sentences-crud.herokuapp.com/api/v1/sentences`
|
||||||
|
|
||||||
|
+ operations:
|
||||||
|
+ + GET /?[lastId=string]&[orderBy=string]&[order='asc' | 'desc']
|
||||||
|
+ + GET /:id
|
||||||
|
+ + POST /:id { text: string, category: string }
|
||||||
|
+ + PUT /:id { text?: string, category?: string }
|
||||||
|
+ + DELETE /:id
|
||||||
|
|
||||||
### Translation API
|
### Translation API
|
||||||
|
|
||||||
|
+ Endpoint: `https://sentences-crud.herokuapp.com/api/v1/translate`
|
||||||
|
|
||||||
|
+ operations:
|
||||||
|
+ + POST / { sentence: string }
|
||||||
|
|
||||||
### Sentences views
|
### Sentences views
|
||||||
|
|
||||||
|
You can access the views on `https://sentences-crud.herokuapp.com`
|
||||||
|
|
||||||
|
From this webpage you can perform any operation you can do with the sentences API
|
||||||
|
|
||||||
### TODO
|
### TODO
|
||||||
|
|
||||||
- Test sentences component
|
- Test sentences component
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue