Skip to content

wajeht/close-powerlifting

Repository files navigation

🏋🏻 Close Powerlifting

Node.js CI License: MIT Open Source Love svg1

an intuitive api for open-powerlifting database

📚 Technologies

  • Node with Express for API
  • Vitest for unit testing, barely
  • JsDom for scraping
  • MongoDB because we only need to keep track of API keys
  • Redis to cache some of the larger scraping data
  • Tailwind for rapid styling
  • EJS HTML template for server-side rendering
  • and of course Typescript for everything ❤️

👨‍💻 Getting started

📃 API endpoints

We have a few resources available for API calls. Resources with larger amounts of data are usually cached in memory and paginated for the first call. Pagination is included by default. You can pass in ?cache=false at the end of a URL to get the latest/recent data.

  • /api/federations
  • /api/meets
  • /api/rankings
  • /api/records
  • /api/status
  • /api/users

All end-points are available via https://close-powerlifting.jaw.dev/docs/api/.

Example call/response

$ curl https://close-powerlifting.jaw.dev/api/rankings
$ curl https://close-powerlifting.jaw.dev/api/rankings?per_page=100&current_page=1&cahe=false
{
  "status": "success",
  "request_url": "/api/rankings",
  "message": "The resource was returned successfully!",
  "cache": true,
  "data": [
    {
      "id": 0,
      "rank": 1,
      "full_name": "waj het",
      "username": "wajeht",
      "user_profile": "/api/users/wajeht"
      // ...
    },
    {
      // ...
    }
  ],
  "pagination": {
    "items": 415567,
    "pages": 4155,
    "per_page": 100,
    "current_page": 1,
    "last_page": 4155,
    "first_page": 1,
    "from": 0,
    "to": 100
  }
}

For more of API documentation, visit https://close-powerlifting.jaw.dev and request for x-api-keys.

© License

Distributed under the MIT license © wajeht. See LICENSE for more information.