mirror of
https://github.com/Redume/Kekkai.git
synced 2025-04-02 21:37:36 +03:00
Compare commits
3 commits
b3aab3e7aa
...
9c9d0352c6
Author | SHA1 | Date | |
---|---|---|---|
9c9d0352c6 | |||
fe8959577c | |||
a707bb2da7 |
5 changed files with 117 additions and 4 deletions
|
@ -7,15 +7,27 @@ export default defineConfig({
|
|||
integrations: [
|
||||
starlight({
|
||||
title: 'Kekkai',
|
||||
social: {
|
||||
github: 'https://github.com/redume/kekkai',
|
||||
},
|
||||
social: { github: 'https://github.com/redume/kekkai' },
|
||||
editLink: { baseUrl: 'https://github.com/redume/kekkai/edit/main/docs/' },
|
||||
sidebar: [
|
||||
{
|
||||
label: 'Getting started',
|
||||
items: [
|
||||
{
|
||||
label: 'Docker', slug: 'getting-started/docker', badge: 'recommended'
|
||||
label: 'Docker',
|
||||
slug: 'docs/getting-started/docker',
|
||||
badge: 'recommended',
|
||||
},
|
||||
{
|
||||
label: 'Contributing', slug: 'docs/getting-started/contributing'
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Endpoints',
|
||||
items: [
|
||||
{
|
||||
label: 'Endpoints list', slug: 'docs/endpoints/endpoints-list'
|
||||
}
|
||||
],
|
||||
},
|
||||
|
|
21
docs/src/content/docs/docs/endpoints/endpoints-list.mdx
Normal file
21
docs/src/content/docs/docs/endpoints/endpoints-list.mdx
Normal file
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
title: Endpoints list
|
||||
---
|
||||
|
||||
## API Base URL
|
||||
All requests to our API should be directed to the URL below:
|
||||
|
||||
```
|
||||
https://kekkai.redume.su/api/
|
||||
```
|
||||
|
||||
|
||||
## API Endpoints
|
||||
Kekkai has 3 API endpoints: `getRate`, `getChart` and `metadata`.
|
||||
Below you will find a list of parameters that each endpoint requires and a description of what the API does.
|
||||
|
||||
| Service | API Endpoint | Description |
|
||||
|--------------|------------------------------------------|---------------------------------------------------------------------------------------------|
|
||||
| Get Rate | `https://kekkai.redume.su/api/getRate/` | Get currency exchange rate for a specific day or period |
|
||||
| Create Chart | `https://kekkai.redume.su/api/getChart/` | Creating a chart with exchange rate |
|
||||
| Metadata | `https://kekkai.redume.su/api/metadata/` | Shows the last and first dates of currency rate collection, as well as available currencies |
|
80
docs/src/content/docs/docs/getting-started/contributing.mdx
Normal file
80
docs/src/content/docs/docs/getting-started/contributing.mdx
Normal file
|
@ -0,0 +1,80 @@
|
|||
---
|
||||
title: Contributing
|
||||
---
|
||||
|
||||
If you have any questions, you can write to the
|
||||
[mail](mailto:redddume@gmail.com)
|
||||
or [Telegram](https://t.me/Redddume)
|
||||
|
||||
### Fork and clone your repository
|
||||
1. Fork the repository
|
||||
([click here to fork now](https://github.com/Redume/Kekkai/fork))
|
||||
2. Clone your forked code
|
||||
```bash
|
||||
git clone https://github.com/<nickname>/Kekkai.git
|
||||
```
|
||||
3. Create new branch
|
||||
```bash
|
||||
git branch <name_new_branch>
|
||||
```
|
||||
4. Switch to new branch
|
||||
```bash
|
||||
git checkout <name_new_branch>
|
||||
```
|
||||
5. Push your commits
|
||||
6. Submit a new Pull Request
|
||||
|
||||
### Testing
|
||||
Before sending a Pull Request, test the functionality.
|
||||
Everything should work both in Docker Compose and without it.
|
||||
|
||||
It is recommended to use Debugger and Debug log for testing.
|
||||
The logging level is changed in `config.yaml`
|
||||
|
||||
### Code Style
|
||||
[`Pylint`][pylint], [`mypy`][mypy],
|
||||
[`eslint`][eslint] and [`prettier`][prettier] are used as code syntax checks
|
||||
|
||||
#### Checking the Node.JS code
|
||||
|
||||
To check the code, you must first download the necessary libraries,
|
||||
which are located at the root of the project
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
`eslint` and `prettier` is used to check and automatically correct the Node.JS code
|
||||
```bash
|
||||
npx eslint .
|
||||
```
|
||||
Or add the `--fix` flag to automatically fix the code
|
||||
|
||||
#### Checking the Python code
|
||||
To check code, you need to install libraries `mypy` and `pylint`
|
||||
|
||||
```bash
|
||||
python3 -m pip install -U mypy
|
||||
```
|
||||
|
||||
and install `pylint`
|
||||
```bash
|
||||
pip install pylint
|
||||
```
|
||||
Start check the code
|
||||
|
||||
for `pylint`:
|
||||
```bash
|
||||
pylint /chart/
|
||||
```
|
||||
|
||||
and for `mypy`:
|
||||
```bash
|
||||
mypy /chart/
|
||||
```
|
||||
|
||||
|
||||
|
||||
[pylint]: https://github.com/pylint-dev/pylint
|
||||
[mypy]: https://github.com/python/mypy
|
||||
[eslint]: https://github.com/eslint/eslint
|
||||
[prettier]: https://github.com/prettier/prettier
|
Loading…
Add table
Add a link
Reference in a new issue