Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/programyazar/rust_news_api
Rust News Api
https://github.com/programyazar/rust_news_api
Last synced: 7 days ago
JSON representation
Rust News Api
- Host: GitHub
- URL: https://github.com/programyazar/rust_news_api
- Owner: ProgramYazar
- Created: 2024-05-11T06:11:23.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-05-11T06:17:52.000Z (6 months ago)
- Last Synced: 2024-05-11T07:25:53.721Z (6 months ago)
- Language: Rust
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rust Language Restfull News API
### Please read: Of course, I have not implemented all the functions such as paging, ... but in the source code you can find place holders for this purpose. This is just a demo project designed to interview only.
# Project
* This project use Rocket Framework for api design, http requests like json request,...
* i've created a very basic file cache system for caching
* I use GNews api for backend## Instructions:
* Install rust via
```shell
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```* Get an api key from GNEWS developer portal.
## Run Project
### For development test command:
```shell
API_KEY="blablabla" cargo run
```
-----------### For release test command:
```shell
API_KEY="blablabla" cargo run --release
```
-----------\
\
\
Restfull api endpoints for local development machine:```shell
$ curl "http://127.0.0.1:8000/searchByTitle/Best%20Programmer"
$ curl "http://127.0.0.1:8000/searchByDescription/Best%20Programmer"
$ curl "http://127.0.0.1:8000/searchByContent/Best%20Programmer"
```\
\
Ofcouse, I didnt implement all functions like paging, ... but in source code you can find place holders for this purpose.
This is only demo.## todo
* add an dotenv file for configuration
* add comments for functions
* implement all functions
* create an uml or flowchart for presentation