Skip to content

CarlosLeonCode/Harry-Potter-Open-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

45 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
hp-open-api

railsVersion rubyVersion

GitHub last commit GitHub Release Date

โšก Harry Potter Open API

A RESTful OPEN API for the Wizarding World.
Access data about characters, creatures, schools, and houses through a simple JSON interface.

View Documentation โ€ข Report Bug โ€ข Request Feature


๐Ÿ“œ Documentation

Base URL

https://harry-potter-open-api-ff4c7a51ed23.herokuapp.com

Interactive Reference

  • Browse the API in Scalar at /docs.
  • The OpenAPI source served by the app is available at /openapi.yaml.
  • The checked-in OpenAPI file is now the documentation source of truth, alongside config/routes.rb.
  • Student routes are intentionally excluded from the current docs because the nested route is marked broken in config/routes.rb and there is no matching StudentsController implementation in app/controllers/api/v1.

๐Ÿง™โ€โ™‚๏ธ Contributing & Local Setup

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 git@github.com:yourAccount/harry_potter_open_api.git
cd harry_potter_open_api
2. Dependencies & Database

Make sure you have the correct Ruby and Rails versions installed.

  1. Configure Database:
    Create a config/database.yml file with your local settings.
    Use this guide for reference.

  2. Install Gems:

    bundle install
  3. 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:build

Note: This parses the data.xlsx file and populates tables ensuring no duplicates.

4. Run the Server
rails s

Access the API at http://localhost:3000/api/v1/...

Docs are available locally at http://localhost:3000/docs.


๐Ÿ”ฎ Roadmap / TO DO

  • Add Wizard Professions model
  • Add Spells model
  • Add Potions model
  • Add filtering and pagination

๐Ÿ‘ Credits

Special thanks to these resources for keeping the magic alive:


๐Ÿ“ƒ License

This project is available as open source under the terms of the MIT License.

โ˜• Support My Work

If this project bring you value, you can support me here:

โ˜• Support on Ko-fi

About

Explore a RESTful API filled with your favorite Harry Potter characters perfect for creating enchanting projects. ๐Ÿง™โ€โ™‚๏ธโšก Built for developers and fans alike, this open-source API allows you to fetch character data, integrate it into your apps, and contribute to its growth.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors