An API Rest from Game of thrones , you can get characters, houses and kingdoms. Made with NodeJs in framework Express.
You can interact with the API REST in the next link: https://westeros-api-production.up.railway.app
Funcionality 1: Get single/all kingdoms, characters, and houses.Funcionality 2: Create kingdoms, characters, and houses(protected with jwt).Funcionality 3: Delete kingdoms, characters, and houses(protected with jwt).Funcionality 3: Modify kingdoms, characters, and houses(protected with jwt).Funcionality 4: Create, modify and login with users(protected with jwt)..
The API will send all data unless you send mediaquerys. You can chain several queries in the same call. There is several mediaquerys working such as:
Global
| Key | Type | Description |
|---|---|---|
| Limit | Int | Number of objects you want for each page. |
| Offset | Int | Number of object you are pointing in |
There is a total of 6 characters sorted by id.
| Key | Type | Description |
|---|---|---|
| id | Int | The id of the character. |
| name | string | The name of the character. |
| title | string | The title of the character (Lord, Queen, Prince). |
| houseId | Int | The house where he/she belongs. |
You can access to the list of characters by using: https://westeros-api-production.up.railway.app/api/v1/characters endpoint.
You can access to a single character by using their id in the endpoint. /characters/1
You can access to a single character where you can see extra info from them.
You can create a character sending a POST using the /characters endpoint.
This is an schema of what you need to send in the petition.
| Key | Type | Description |
|---|---|---|
| name | string | The name of the character. |
| title | string | The title of the character (Lord, Queen, Prince). |
| houseId | Int | The house where he/she belongs. |
This is protected with a JWT, so you need to send a bearer token.
You can edit an existing character sendig a PATCH using their id in the /characters/id endpoint.
This is protected with a JWT, so you need to send a bearer token.
You can delete a character by sending a DELETE using their id in the /characters/id endpoint.
This is protected with a JWT, so you need to send a bearer token.
There is a few houses sorted by id.
| Key | Type | Description |
|---|---|---|
| id | Int | The id of the house. |
| name | string | The name of the house. |
| sigil | string | An url for this sigil. |
| words | string | Each of the noble houses of the Seven Kingdoms have their own official family words |
You can access to the list of houses by using: https://westeros-api-production.up.railway.app/api/v1/houses endpoint.
You can access to a single house by using their id in the endpoint. /houses/1
You can access to a single house where you can see extra info from them.
There is a few kingdoms sorted by id.
| Key | Type | Description |
|---|---|---|
| id | Int | The id of the kingdom. |
| name | string | The name of the kingdom. |
| ruler | string | Who currently governs. |
| capital | string | The seats of power. |
You can access to the list of kingdoms by using: https://westeros-api-production.up.railway.app/api/v1/kingdoms endpoint.
You can access to a single kingdom by using their id in the endpoint. /kingdom/1
You can access to a single kingdom where you can see extra info from them.
You can access with a POST in: https://westeros-api-production.up.railway.app/api/v1/auth/login endpoint with an username and password. In this access you can obtain a JWT to send petitions to the create, delete, patch and post endpoint of characters, houses and kingdoms.
There is two types of 'users'
| User | Description |
|---|---|
| admin | Permission to create and edit. |
| mad king | Permission to create, edit and delete ALL, try to burn them all 🔥. |
- Frontend page for login! 🔴
- Add more characters, houses and kingdoms! 🔴 (Feel free to ask for a mad king user to enrich the db).