A RESTful OPEN API for the Wizarding World.
Access data about characters, creatures, schools, and houses through a simple JSON interface.
https://harry-potter-open-api-ff4c7a51ed23.herokuapp.com| Resource | Method | Endpoint | Description |
|---|---|---|---|
| Schools | GET |
/api/v1/schools |
List all wizarding schools |
| Houses | GET |
/api/v1/school_houses |
List all school houses |
| House Details | GET |
/api/v1/school_houses/:id |
Get a specific house by ID |
| Characters | GET |
/api/v1/people |
List all characters |
| Character Details | GET |
/api/v1/people/:id |
Get a specific character by ID |
| Students | GET |
/api/v1/people/students |
List only students |
| Creatures | GET |
/api/v1/creatures |
List all magical creatures |
| Creature Details | GET |
/api/v1/creatures/:id |
Get a specific creature by ID |
We welcome all contributions: bug fixes, data contributions, and magical recommendations!
1. Fork & Clone
First, fork the project to your personal account. Then clone it:
git clone [email protected]:yourAccount/harry_potter_open_api.git
cd harry_potter_open_api2. Dependencies & Database
Make sure you have the correct Ruby and Rails versions installed.
-
Configure Database:
Create aconfig/database.ymlfile with your local settings.
Use this guide for reference. -
Install Gems:
bundle install
-
Setup Database:
rails db:create rails db:migrate
3. Import Magical Data (Seeding)
Populate your local database using the custom Excel importer task:
bundle exec rake hp_data:buildNote: This parses the
data.xlsxfile and populates tables ensuring no duplicates.
4. Run the Server
rails sAccess the API at http://localhost:3000/api/v1/...
- Add Wizard Professions model
- Add Spells model
- Add Potions model
- Add filtering and pagination
Special thanks to these resources for keeping the magic alive:
- Harry Potter Wiki - For the lore and information.
- Wizards Unite Hub - For database resources.
- Szokekiss Marton - For the amazing creature illustrations.
This project is available as open source under the terms of the MIT License.