Skip to content

copyassignment/rashifal-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rashifal API in Flask

This is a very simple API that get the data about rashifal for the day, for the week, for the month and for the year. The data for the week cannot be accessed right now but I will soon add that feature

Base URL

"https://python.ankurgajurel.com.np/rashifal"

Authentication

At the moment, I have not implemented authentication to this API.

Endpoints

'GET /'

Retrieves the Home Page

Parameters

No parameters.

Example request:

import requests
base_url = "https://python.ankurgajurel.com.np/rashifal"
response = requests.get(base_url).text
print(response)

'GET /daily[rashi]'

Parameters

  • "rashi": The rashi you want to get the data for

Example request:

import requests
base_url = "https://python.ankurgajurel.com.np/rashifal"
work_url = base_url + "/daily"
rashi = "singha"
response = requests.get(work_url + "/" + rashi).text
print(response)

'GET /monthly/[rashi]'

Parameters

  • "rashi": The rashi you want to get the data for

Example request:

import requests
base_url = "https://python.ankurgajurel.com.np/rashifal"
work_url = base_url + "/monthly"
rashi = "singha"
response = requests.get(work_url + "/" + rashi).text
print(response)

'GET /yearly/[rashi]'

Parameters

  • "rashi": The rashi you want to get the data for

Example request:

import requests
base_url = "https://python.ankurgajurel.com.np/rashifal"
work_url = base_url + "/yearly"
rashi = "singha"
response = requests.get(work_url + "/" + rashi).text
print(response)

TESTS

To test the endpoints of the API, run the following commands

cd ./tests
python3 test_api.py

And, check the following URL on the browser.

http://127.0.0.1:9881

About

This is an unofficial Rashifal API built with Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%