From af1e4922a455b7836d7f2b7bbce0775cf7f16285 Mon Sep 17 00:00:00 2001 From: Sudheer S Date: Mon, 20 Nov 2023 20:08:16 +0530 Subject: [PATCH] issue#14: adds mkdocs to the RATE API --- rates/docs/index.md | 3 +++ rates/docs/rate.md | 19 +++++++++++++++++++ rates/mkdocs.yml | 6 ++++++ requirements.txt | 1 + 4 files changed, 29 insertions(+) create mode 100644 rates/docs/index.md create mode 100644 rates/docs/rate.md create mode 100644 rates/mkdocs.yml diff --git a/rates/docs/index.md b/rates/docs/index.md new file mode 100644 index 0000000..efd5c93 --- /dev/null +++ b/rates/docs/index.md @@ -0,0 +1,3 @@ +# Rates API Docs + +The Documentation of other APIs goes here.. \ No newline at end of file diff --git a/rates/docs/rate.md b/rates/docs/rate.md new file mode 100644 index 0000000..e907f28 --- /dev/null +++ b/rates/docs/rate.md @@ -0,0 +1,19 @@ +# RATE API + +The rate API is returns the BTC/USD, or other pair rate as a single value. + +### Request + +`GET /rate?pair=btcinr` + + curl -i -H 'Accept: application/json' http://localhost:8000/rate?pair=btcinr + +### Response + + HTTP/1.1 200 OK + date: Sun, 19 Nov 2023 07:47:00 GMT + server: uvicorn + content-length: 21 + content-type: application/json + + {"rate":"123.46"} diff --git a/rates/mkdocs.yml b/rates/mkdocs.yml new file mode 100644 index 0000000..634acff --- /dev/null +++ b/rates/mkdocs.yml @@ -0,0 +1,6 @@ +site_name: Rates +site_url: https://example.com/ +nav: + - Home: index.md + - Rate API: rate.md + \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 1564ca1..bc88f9a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,3 +5,4 @@ uvicorn==0.20.0 aiofiles==22.1.0 aiohttp==3.8.5 requests==2.31.0 +mkdocs