Skip to content

Dasewasia10/IdolyPride-API

Repository files navigation

IdolyPride API

This is a Flask-based API for managing card and idol data for the Idoly Pride project. The API provides endpoints to retrieve, add, update, and delete card and idol information.

NOTICE : Data Card is still on search and collection missions. Please be patient

Disclaimer

Please note that all data provided by this API is subject to copyright by QualiArts and not by Dasewasia10, the owner of this repository. The API is solely intended for educational and non-commercial purposes.

Getting Started

To get started with the API, follow the instructions below.

Prerequisites

  • Python 3.x
  • Flask

Installation

  1. Clone the repository:

    git clone https://github.com/Dasewasia10/IdolyPride-API.git

Note: It's recommended to use venv as environment. See venv for more details.

  1. Install the required dependencies:

    pip install -r requirements.txt

Usage

  1. Use cd to go to folder where API function located

    cd api
  2. Start the Flask server:

    python main.py
  3. The API will be accessible at http://localhost:5000.

Endpoints

Card

API data still on searching mission. Please be patient.

  • GET /api/card: Get all cards.
  • GET /api/card/<int:id>: Get a card by id.
  • GET /api/card/<string:_id>: Get a card by _id.
  • POST /api/card: Add a new card.
  • PUT /api/card/<int:id>: Update a card by id.
  • DELETE /api/card/<int:id>: Delete a card by id.

idol

  • GET /api/idol: Get all idols.
  • GET /api/idol/<int:id>: Get an idol by id. Example: GET /api/card/1
    {
      "id": 1,
      "name": "Sakura Kawasaki",
      ...
    }
  • GET /api/idol/<string:_id>: Get an idol by _id.
  • GET /api/idol/name/<name>: Get an idol by name (case-insensitive).
  • GET /api/idol/group/<group>: Get idols by group (case-insensitive).
  • POST /api/idol: Add a new idol.
  • PUT /api/idol/<int:id>: Update an idol by id.
  • DELETE /api/idol/<int:id>: Delete an idol by id.

API Status

  • GET /api/: Check the status of the API.

Examples

Here are some examples of how to use the API endpoints:

  • Get all cards:

    GET /api/card
  • Get a card by id:

    GET /api/card/1

    Response:

    {
      "id": 1,
      "name": "Sakura Kawasaki",
      ...
    }
  • Get a card by _id.

    GET /api/card/ID01
  • Add a new card:

    POST /api/card
    
    Body:
    {
      "id": 3,
      "name": "Card Name",
      ...
    }
  • Update a card by id:

    PUT /api/card/1
    
    Body:
    {
      "name": "Updated Card Name",
      ...
    }
  • Delete a card by id:

    DELETE /api/card/1

This a same go with idol.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request. Feel free to contact me.

License

This project is licensed under the MIT License.

Acknowledgements

Special thanks to Idoly Pride for providing the data used in this API.


About

API for Idoly Pride game information, such as card, idol, etc.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors