Example Code
fetch('https://fakegundamwikiapi.onrender.com/api/mobile-suits/1', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_TOKEN_HERE',
'Content-Type': 'application/json'
}
})
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('Error:', err));
Resources
Fake Gundam Wiki API comes with a set of resources:
Auth
| Method | Route | Description |
|---|---|---|
| POST | /auth/login | Log in to the application |
| POST | /auth/refreshToken | Refresh the token |
Affiliations
| Method | Route | Description |
|---|---|---|
| GET | /affiliations | Get all affiliations |
| GET | /affiliations/:id | Get an affiliation by id |
| POST | /affiliations | Create a new affiliation |
| PUT | /affiliations/:id | Update an affiliation by id |
| DELETE | /affiliations/:id | Delete an affiliation by id |
Characters
| Method | Route | Description |
|---|---|---|
| GET | /characters | Get all characters |
| GET | /characters/:id | Get a character by id |
| POST | /characters | Create a new character |
| PUT | /characters/:id | Update a character by id |
| DELETE | /characters/:id | Delete a character by id |
Manufacturers
| Method | Route | Description |
|---|---|---|
| GET | /manufacturers | Get all manufacturers |
| GET | /manufacturers/:id | Get a manufacturer by id |
| POST | /manufacturers | Create a new manufacturer |
| PUT | /manufacturers/:id | Update a manufacturer by id |
| DELETE | /manufacturers/:id | Delete a manufacturer by id |
Mobile Suits
| Method | Route | Description |
|---|---|---|
| GET | /mobile-suits | Get all mobile suits |
| GET | /mobile-suits/:id | Get a mobile suits by id |
| POST | /mobile-suits | Create a new mobile suits |
| PUT | /mobile-suits/:id | Update a mobile suits by id |
| DELETE | /mobile-suits/:id | Delete a mobile suits by id |
Roles
| Method | Route | Description |
|---|---|---|
| GET | /roles | Get all roles |
| GET | /roles/:id | Get a role by id |
| POST | /roles | Create a new roles |
| PUT | /roles/:id | Update a role by id |
| DELETE | /roles/:id | Delete a role by id |
Series
| Method | Route | Description |
|---|---|---|
| GET | /series | Get all series |
| GET | /series/:id | Get a serie by id |
| POST | /series | Create a new serie |
| PUT | /series/:id | Update a serie by id |
| DELETE | /series/:id | Delete a serie by id |
Universes
| Method | Route | Description |
|---|---|---|
| GET | /universes | Get all universes |
| GET | /universes/:id | Get a universe by id |
| POST | /universes | Create a new universe |
| PUT | /universes/:id | Update a universe by id |
| DELETE | /universes/:id | Delete a universe by id |
Users
| Method | Route | Description |
|---|---|---|
| GET | /users | Get all users |
| GET | /users/:id | Get a users by id |
| POST | /users | Create a new user |
| PUT | /users/:id | Update a user by id |
| DELETE | /users/:id | Delete a user by id |