Giter Site home page Giter Site logo

fedeperin / harry-potter-api-english Goto Github PK

View Code? Open in Web Editor NEW
18.0 4.0 0.0 213 KB

A Harry Potter rest API that brings information about spells, characters, books and information itself.

Home Page: https://harry-potter-api-en.onrender.com/

JavaScript 100.00%
harry-potter api rest rest-api harry-potter-api potter-api heroku-deployment json-server nodejs api-of-harry-potter harry-potter-series json-api json-api-response javascript node

harry-potter-api-english's Introduction

Harry Potter API

Important

PotterAPI is a new version of this API, available en multiple languages and actualized. I recommend using that one instead of this one.

A Harry Potter Rest API that returns information about spells, characters, books and information itself. I used node.js with the only package json-server for creating it. This Harry Potter API is hosted at Render

For installing the dependencies, execute by terminal with node js installed npm install json-server

How to use

Here is a JavaScript example of fetching the entire API. Just change tha value of the const urlToFetch for changing the URL being fetched. urlToFetch value can be changed by an enpoint of this (or another) API for feching different APIs

const urlToFetch = "https://harry-potter-api-en.onrender.com/db"

fetch(urlToFetch)
	.then((res) => res.json())
	.then((data) => {
		// It brings all data at the API and it shows it at the console
		console.log(data)
	})
	.catch((e) => console.log(e));

Or visit the main page of this API (that comes by default with json-server): https://harry-potter-api-en.onrender.com/

Endpoints


To access an specific element at the API, just secify the ID number of that element at the end of the route

Examples:


GitHub Repository of the Spanish version of this same API: https://github.com/fedeperin/harry-potter-api/

harry-potter-api-english's People

Contributors

fedeperin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.