Welcome to the OnePieceAPI project! This project provides a set of APIs related to the popular anime and manga series "One Piece".
The OnePieceAPI project aims to provide a convenient way to access information about characters, fruits, and more (in the future) from the One Piece Universe. It is built using Node.js, Express.js, and MongoDB.
- Retrieve information about characters and fruits.
- Explore details about each character, including their role, origins, bounty, affiliation and more.
To get started with the OnePieceAPI, you can use the following endpoints.
Get information about all characters.
Endpoint | Description |
---|---|
/characters |
Retrieve a list of all characters. |
/characters/name/:name |
Search a character by name. |
/characters/role/:role |
Retrieve a list of all characters with the selected role. |
/characters/currentaffiliation/:affiliation |
Retrieve a list of all characters with the selected current affiliation. |
/characters/previousaffiliation/:affiliation |
Retrieve a list of all characters with the selected previous affiliation. |
/characters/origin/:origin |
Retrieve a list of all characters with the selected origin. |
/characters/provenance/:provenance |
Retrieve a list of all characters with the selected provenance. |
/characters/fruit/:fruit |
Search for the character with the selected Devil Fruit. |
Get informations about a single character.
Endpoint | Description |
---|---|
/singlecharacters/:name/role |
Retrieve the role of a specific character. |
/singlecharacters/:name/fruit |
Retrieve the Devil Fruit of a specific character. |
/singlecharacters/:name/currentaffiliation |
Retrieve the current affiliation of a specific character. |
/singlecharacters/:name/previousaffiliation |
Retrieve the previous affiliation of a specific character. |
/singlecharacters/:name/origin |
Retrieve the origin of a specific character. |
/singlecharacters/:name/provenance |
Retrieve the provenance of a specific character. |
/singlecharacters/:name/currentbounty |
Retrieve the current bounty of a specific character. |
/singlecharacters/:name/previousbounty |
Retrieve the previous bounty of a specific character. |
Get informations about Devil Fruits.
Endpoint | Description |
---|---|
/fruits |
Retrieve a list of all Devil Fruits. |
/fruits/:name |
Get detailed information about a specific Devil Fruit. |
/fruits/:name/type |
Get the type of a specific Devil Fruit. |
/fruits/:name/name-owner |
Get the name owner of a specific Devil Fruit. |
/fruits/:name/owner |
Get detailed information about the owner of a specific Devil Fruit. |
/fruits/type/:type |
Get a list of Devil Fruits by type. |
You can get started with the OnePieceAPI in two ways: by cloning the repository and setting it up yourself, or by directly using the deployed version.
-
Clone the Repository: Clone this repository to your local machine using the following command:
git clone https://github.com/g4lius/OnePieceAPI.git
-
Navigate to the Project Directory: Navigate to the project directory:
cd OnePieceAPI
-
Install Dependencies: Install the required dependencies using npm:
npm install
-
Configure MongoDB Connection: Configure your MongoDB connection in the
.env
file. -
Run the Server: Run the server using the command:
npm start
You can directly make API requests to the deployed version of OnePieceAPI without setting up anything. Simply use the following base URL for making requests:
https://onepieceapi-f910ec92e358.herokuapp.com/
You can start making requests to the available endpoints by appending the desired paths to the base URL. You can use Postman, a browser, or whichever method you prefer.
Contributions to the OnePieceAPI project are welcome! If you find any issues or would like to add new features, feel free to open a pull request.
This project is licensed under the MIT License.