Skip to content

rubenvanerk/toplogger-api-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

TopLogger API docs

Documentation for the undocumented TopLogger API.

Endpoint: https://api.toplogger.nu/v1

Authentication

Some endpoints can return extra data that is only accessible to the authenticated user. To authenticate, you need to send two headers with your request: X-USER-EMAIL and X-USER-TOKEN. These are the email and token of the user you want to authenticate as. You can find your token by logging in the TopLogger site and inspecting the headers of an authenticated request.

You can also get a token by posting to users/sign_in. The body should be a JSON object with the following format:

{
  "user": {
    "email": "[email protected]",
    "password": "correct-horse-battery-staple"
  }
}

JSON params

Some endpoints accept JSON params. These are sent as a GET parameter named json_params. The following options are available (not all are available for all endpoints):

{
  "filters": {
    "used": true,
    "user": {
      "uid": "7163205870"
    },
    "climb": {
      "gym_id": 1337,
      "deleted": false,
      "live": true
    }
  },
  "includes": [
    {
      "gym": [
        "holds",
        "walls",
        "setters"
      ]
    },
    "setters"
  ]
}

User

GET users/{user}
Get a user's information. Returns extra data if authenticated as the user.

Example

Path parameters

user int required
The user to get stats for.

Query parameters

json_params json requires authentication
Example:

{
  "includes": [
    {
      "gym": [
        "holds",
        "walls",
        "setters"
      ]
    },
    "setters"
  ]
}

User stats

GET users/{user}/stats
Returns the stats for a user. Included stats are 60d grade & top ten ascends.

Example

Path parameters

user int required
The user to get stats for.

Query parameters

gym_id int
The gym to get stats for. Optional but can be very slow without it.

climbs_type string
The type of climbs to get stats for.
Options: boulders, routes

Strength history

GET users/{user}/strength_history
Returns the strength history for a user.

Example

Path parameters

user int required
The user to get stats for.

Query parameters

climb_type string
The type of climbs to get stats for.
Options: boulders, routes

offset int
Unknown.

New & old

GET users/{gym}/new_old
Returns new and old climbs for a gym.

Example

Path parameters

gym int required
The gym to get new/old climbs for.

Query parameters

climbs_type string
The type of climbs to get stats for.
Options: boulders, routes

Ranked gym users

GET gyms/{gym}/ranked_gym_users
Returns the ranked gym users for a gym.

Example

Path parameters

gym int required
The gym to get ranked gym users for.

Query parameters

climbs_type string required
The type of climbs to get stats for.
Options: boulders, routes

ranking_type string required
The type of ranking to get.
Options: grade, count

items_per_page int
The number of items per page.

Opinions

GET opinions
Returns user opinions (ratings).

Example

Query parameters

json_params json
Example: {"filters":{"used":true,"user":{"uid":"7163205870"},"climb":{"gym_id":8,"deleted":false,"live":true}}}

Ascends

GET ascends Returns ascends.

Example

Query parameters

json_params json partially required
Example:

{
  "filters": {
    "used": true,
    "user": {
      "uid": "7163205870" // required
    },
    "climb": {
      "gym_id": 8,
      "deleted": false,
      "live": true
    }
  }
}

serialize_checks boolean
Adds a checks field to each ascend. 2 checks is a flash, 1 check is a redpoint. Settings this to false does not seem to have any effect.

Climbs

GET gyms/{gym}/climbs
Returns climbs for a gym.

Example

Path parameters

gym int required
The gym to get climbs for.

Query parameters

json_params json
Example:

{
  "filters": {
    "deleted": false,
    "live": true
  }
}

Groups

GET groups
Returns climb groups (circuits).

Example

Query parameters

json_params json
Example:

{
  "filters": {
    "gym_id": 8,
    "score_system": "none",
    "live": true
  },
  "includes": [
    "climb_groups"
  ]
}

Climb stats

GET gyms/{gym}/climbs/{climb}/stats
Returns stats for a climb: community grades, opinions and toppers.

Example

Path parameters

gym int required
The gym to get climbs for.

climb int required
The climb to get stats for.

About

Documenting the undocumented TopLogger API

Resources

License

Stars

Watchers

Forks