Skip to content

Latest commit

 

History

History
298 lines (208 loc) · 9.17 KB

README.md

File metadata and controls

298 lines (208 loc) · 9.17 KB

ThroneAPI fullLogoSideTxtRBGB

ThroneAPI is a FastAPI-based API for retrieving information about the Throne wishlist. It provides endpoints to fetch various details such as raw wishlist data, user information, collections, items, previous gifts, and more.

Getting Started

You can find ThroneAPI on Docker Hub for easy deployment. Follow the instructions below to get started.

Deploy with Docker

docker run -p 8000:8000 lordlumineer/throne-api

Access the API at localhost:8000/docs for interactive documentation.


Table of Contents

1. Features (Endpoints)

  • Raw Data Endpoints:

    • /rawData/Gifted: Get raw gifted data for a Throne user.
    • /rawData/Wishlist: Get raw wishlist data for a Throne user.
  • Cleaned Data Endpoint:

    • /getCleaned: Get cleaned and organized data for a Throne user, combining gifted and wishlist information.
  • User Information Endpoints:

    • /user/Info: Get general information about a Throne user.
    • /user/Socials: Get social media information of a Throne user.
    • /user/Categories: Get categories associated with a Throne user.
    • /user/Interests: Get interests of a Throne user.
  • Collections Endpoints:

    • /collections: Get collections associated with a Throne user.
    • /collections/Detailed: Get detailed information about collections.
    • /collections/Collection: Get details about a specific collection.
    • /Collections/Items: Get items associated with a specific collection.
  • Items Endpoints:

    • /items: Get items associated with a Throne user.
    • /items/Detailed: Get detailed information about items.
    • /items/Item: Get details about a specific item.
  • Previous Gifts Endpoints:

    • /previousGifts: Get previous gifts associated with a Throne user.
    • /previousGifts/Detailed: Get detailed information about previous gifts.
    • /previousGifts/Gift: Get details about a specific previous gift.
    • /previousGifts/latest: Get information about the latest previous gift.
    • /previousGifts/total: Get the total number of previous gifts.
  • Gifters Endpoints:

    • /gifters/latest: Get information about the latest gifter.
    • /gifters/last20: Get the last 20 gifters.
    • /gifters/all: Get information about all gifters.
    • /gifters/leaderboard: Get the gifter leaderboard for a specific time period.
  • Testing Endpoint:

    • /version: Get the current version of the API.
    • /test: Test endpoint for checking the functionality, providing an option for currency conversion.
    • /ping/throne: Get information about the ping to the Throne servers.

2. How to Use

2.1. Deploying

  1. With docker compose

    • Use the provided Docker Compose configuration to deploy ThroneAPI.

      version: "3"
      services:
        throneapi:
          image: lordlumineer/throne-api:latest
          ports:
            - 8000:8000
    • Run the following command:

      docker-compose up -d
  2. With docker

    • Pull the Docker image and run the container.

      docker pull lordlumineer/throne-api:latest
      docker run -d -p 8000:8000 lordlumineer/throne-api:latest

2.2. Running Locally

  1. Clone the repository

    git clone https://github.com/LordLumineer/ThroneAPI.git
    cd ThroneAPI

2.2.1. With Docker (compose)

  1. Build the image

    docker-compose build
  2. Run the container

    docker-compose up -d

2.2.2. With Docker (manual)

  1. Build the image

    docker build -t throne-api .
  2. Run the container

    docker run -d -p 8000:8000 throne-api

2.2.3. With Uvicorn (python)

  1. Install dependencies

    pip install -r requirements.txt
  2. Run the server

    uvicorn main:app

2.3. Development

  1. Clone the repository

    git clone https://github.com/LordLumineer/ThroneAPI.git
    cd ThroneAPI
  2. Install dependencies

    pip install -r requirements.txt
  3. Run the server

    uvicorn main:app --reload

2.4. Changing the Port

2.3.1. With Docker (compose)

  1. Change the port in the docker-compose.yml file

    version: "3"
    services:
      throneapi:
        image: lordlumineer/throne-api:latest
        ports:
          - <PORT>:8000 # Change this to the desired port
  2. Run the container

    docker-compose up -d

2.3.2. With Docker (manual)

  1. Build the image

    docker build -t throne-api .
  2. Run the container with the --port flag

    docker run -d -p <PORT>:8000 throne-api

2.3.2. With Uvicorn

  1. Run the server with the --port flag

    uvicorn main:app --port <PORT>

2.5. Testing

  1. Run the server (see 2.2.3. With Uvicorn)

    • Note: You might want to add the --reload flag to the command to enable hot reloading.
  2. Open the Swagger UI at localhost:8000/docs.

3. Logos

fullLogoBW

fullLogoWB

fullLogoRBGB

fullLogoRBGW

fullLogoTxtBW

fullLogoTxtWB

fullLogoTxtRBGB

fullLogoTxtRBGW

fullLogoSideTxtBW

fullLogoSideTxtWB

fullLogoSideTxtRBGB

fullLogoSideTxtRBGW

4. Issues

If you encounter any issues, discrepancies, or have suggestions for improvement, please feel free to open an issue on the GitHub repository. Before opening a new issue, please check if a similar issue already exists.

When reporting issues, consider providing the following details:

  • A clear and descriptive title for the issue.
  • Steps to reproduce the problem.
  • Details about your environment (e.g., operating system, Python version).
  • Screenshots, if applicable.
  • Any error messages or stack traces.
  • Your feedback is valuable in enhancing the functionality and reliability of the API. Thank you for your contribution!

5. Disclaimer

This project is not affiliated with Throne in any way. It is an unofficial API for Throne.

Note: This API is developed by a single enthusiast, and while efforts have been made to ensure its functionality and reliability, it is important to note that I am not a professional. There may be better or more efficient ways to implement certain features. Users are encouraged to provide feedback, suggestions, and open issues if they encounter any issues or have recommendations for improvements.

Please use this API responsibly, and be aware that it will not cover all edge cases or scenarios. Your understanding and collaboration are appreciated.

6. License

This project is licensed under the MIT License - see the LICENSE.md file for details.

MIT License

Copyright (c) 2023 LordLumineer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.