Achievements-of-IUT

所属分类:其他
开发工具:Python
文件大小:0KB
下载次数:0
上传日期:2024-01-19 18:15:07
上 传 者sh-1993
说明:  一个基于烧瓶的网络应用程序,为娱乐而创建,旨在创建我学校的技能树
(A Flask-based webapp created for fun, aiming to create a skill-tree of my school)

文件列表:
static/
templates/
admin.py
api.md
api.py
app.py
auth.py
bot.py
config.ini
db.py
logo.png
schema.sql

# IUT RPG - API ## User ### Overview Retrieve general user information. ### URL /api/get_user ### Parameters: - `id` - The id of the user **(required)**. ### Response A JSON dict containing user information, if such user is found. ```javascript { "id_user" : 1, // ID of the user "firstname" : "Rick", // Firstname of the user "lastname" : "Astley", // Lastname of the user "promotion_year" : 2017, // Year of the first year at the IUT "join_date" : "2007-03-29 12:42:42", // Join date, in UTC "score" : 75, // Global score of the user "count_easy" : 13, // Amount of 'easy' (1) achievements completed "count_normal" : 9, // Amount of 'normal' (2) achievements completed "count_hard" : 8, // Amount of 'hard' (3) achievements completed "count_hardcore" : 5, // Amount of 'hardcore' (4) achievements completed "count_impossible" : 0, // Amount of 'impossible' (5) achievements completed "global_rank" : 42, // Global rank of the user "year_rank" : 42, // User's rank among the others in their class (promotion_year) "completed_achievements" : [ // IDs of the completed achievements by the user 1, 20, 42, 69, ... ] } ``` ## Achievement ### Overview Retrieve general achievement information. ### URL /api/get_achievement ### Parameters: - `id` - The id of the achievement **(required)**. ### Response A JSON dict containing achievement information, if such achievement is found. ```javascript { "id_achievement" : 1, // ID of the achievement "name" : "Never Gonna Give You Up", // Name of the achievement (short) "lore" : "We'll never gonna let you down", // Description of the achievement (long) "difficulty" : 5, // Difficulty: 1 - Easy, 2 - Normal, 3 - Hard, 4 - Hardcore, 5 - Impossible "auto_complete" : 0, // Is auto-completed when all childs are completed: 1 - true, 0 - false "childs" : [ // IDs of the childs of the achievement 2, 3, 42, 69, ... ] } ``` ## Leaderboard ### Overview Retrieve information about leaderboard. ### URL /api/get_leaderboard ### Parameters: - `year` - The year of the leaderboard. Optional, default is global leaderboard. ### Response A JSON dict containing leaderboard information, and the users on the leaderboard. ```javascript { "year" : 0, // Year of the leadboard. 0 if global leaderboard "users" : [{ // Users in the leaderboard, order by their score "id_user" : 1, // ID of the user "name" : "Rick Astley", // Name of the user (firstname + lastname) "promotion_year" : "2017", // Year of first year at the IUT "score" : 42, // Total score }, { ... }, ...] } ```

近期下载者

相关文件


收藏者