Skip to content

nicolasrouanne/got-jsonapi

Repository files navigation

GOT JSON:API

An example {JSON:API} for Game of Thrones ⚔️ based on Rails and fast_jsonapi by Netflix

Usage

Check out the project and run

$ rails db:setup # create database and seed it
$ rails server # launch your API

Query your api on localhost:3000, for instance http://localhost:3000/houses ☕️

Routes & Models

This demo is based on 2 models only:

  • Houses (e.g. House Stark 🐺)
  • Characters (e.g. Jon Snow ❄️)

There is a 1..n relationship between House and Characters.

Tutorial

This project was made for a Tech Talk 🍺 to demonstrate the power of JSON:API. To follow along using a progressive path, use the branches:

  1. 1-data-relationships: API answering basic object w/ attributes & relationships
  2. 2-includes: adds Compound documents (included)
  3. 3-paginaton: adds pagination, links and `meta``
  4. 4-sparse-fieldsets: adds Sparse Fieldsets

About

A JSON:API example on Game of Thrones based on Rails

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published