- baseurl/api/leaderboard/?matchname="MATCHNAME"&time="TIMEOPTION"
- baseurl/api/leaderboard/<USER_ID>/?matchname="MATCHNAME"
- baseurl/api/playerstats/?matchname="MATCHNAME"&time="TIMEOPTION"
- baseurl/api/playerstats/<USER_ID>/?matchname="MATCHNAME"
-
- all time -> will give result based on all time
- last week -> will give result based on games that were created in last week
- last day -> will give result based on games that were created in last day
- last month -> will give result based on games that were created in last month
In the file name "requirements.txt" project's pre requisites will be listed out
go inside project root folder
install using the following command:
pip3 install -r requirements.txt
DATABASES = {
'default': dj_database_url.config(
default=config('DATABASE_URL')
)
}
python manage.py makemigraitons
python manage.py migrate
python manage.py runserver
-
Creating Users:
from django.app.models import UserDetail user = UserDetail.objects.create(username="USERNAME", rank="RANK", kills="KILLS", score="SCORE", game="GAME OBJECT", games_list = "GAMES LIST OBJECT"
-
Creating Games:
from app.models import Game game = Game.objects.create(matchname="MATCHNAME")