Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- readme: {
- message: "You need to specify token in body (field called 'token') or in query (field called 'token') or in header x-access-token"
- },
- authentication: {
- path: "api/authenticate",
- method: "post",
- params: {
- username: "your username",
- password: "ur password"
- }
- },
- using: {
- get_current_tasks: {
- path: "api/current_tasks",
- method: "get",
- },
- submit_task: {
- path: "api/submit_task",
- method: "post",
- params: {
- id: "task id",
- answer: "task answer"
- }
- }
- },
- administration: {
- users: {
- create: {
- path: "api/create_user",
- method: "post",
- params: {
- username: "user name",
- password: "user password",
- admin: "have admin rigdasifhts"
- }
- },
- get_all: {
- path: "api/users",
- method: "get"
- },
- update: {
- path: "api/update_user",
- method: "put",
- params: {
- id: "user id",
- username: "can use this instead of id, but can't change (maybe in future i'll add this functions, tss)",
- password: " new password user password (optional)",
- admin: "new rights (optional)",
- score: "new score (optional)"
- }
- },
- delete_user: {
- path: "api/delete_user",
- method: "delete",
- params: {
- id: "user id. or u can use username",
- username: "can use this instead of id"
- }
- }
- },
- tasks: {
- create: {
- path: "api/create_task",
- method: "post",
- params: {
- name: "unique name of task, just like username for user",
- subject: "subject for task",
- description: "describes task",
- value: "how many score it gives to player for completing task",
- answer: "answer for this task",
- completed: "does task was completed?"
- }
- },
- get_all: {
- path: "api/tasks",
- method: "get"
- },
- update: {
- path: "api/update_task",
- method: "put",
- params: {
- id: "id of task you are trying to change",
- subject: "new subject for task (optional)",
- description: "new describes task (optional)",
- value: "new task's value (optional)",
- answer: "new answer for this task (optional)",
- completed: "new completed status (optional)"
- }
- },
- delete_task: {
- path: "api/delete_task",
- method: "delete",
- params: {
- id: "task id",
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement