This repository has been archived by the owner on May 13, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Defelo edited this page Apr 7, 2019
·
3 revisions
- name is the username of the player.
- country is the country of the player.
- description is the description in the user profile which can be changed.
- hacks is the number of hacks the player performed in total.
- cluster is the id of the cluster of the user or null if the user is not in a cluster.
-
Use Endpoint 'create' and the following dict format to create a user profile.
input:
{ "name": "SomeUser123", "country": "Germany" }
returns:
{ "success": true }
Or if the user already has a profile:
{ "error": "profile already exists for this user", "origin": "user" }
-
Use Endpoint 'get' and the following dict format to get the profile of a user.
input:
{}
returns:
{ "num_hacks": 0, "description": "", "registered": 1554647624246, "user_uuid": "12961f02-2469-4777-9ce4-3eae82359a8e", "country": "Germany", "cluster_id": null, "name": "SomeUser123" }
-
Use Endpoint 'description' and the following dict format to update the profile description.
input:
{ "description": "Hello World!" }
returns:
{ "success": true }
-
Use Endpoint 'hacks' and the following dict format to update the number of hacks of the user.
input:
{ "hacks": 1337 }
returns:
{ "success": true }
-
Use Endpoint 'cluster' and the following dict format to update the cluster of the user.
input:
{ "cluster": 42 }
returns:
{ "success": true }
-
If the user does not exist:
returns:
{ "error": "invalid user_uuid", "origin": "user" }