A Go wrapper for the Studio Ghibli API https://ghibliapi.herokuapp.com
package main
import (
"fmt"
"github.com/rchristiani/totoro" //import package
)
func main() {
people, err := totoro.GetPeople()
if err != nil {
fmt.Println(err)
return
}
fmt.Println(people)
}The the totoro package contains methods for all endpoints.
The documentation can be found here.
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Director string `json:"director"`
Producer string `json:"producer"`
ReleaseDate string `json:"release_date"`
RtScore string `json:"rt_score"`
People []string `json:"people"`
Species []string `json:"species"`
Locations []string `json:"locations"`
Vehicles []string `json:"vehicles"`
URL string `json:"url"`Returns a slice of Film, you can pass a query that can be used to set the limit param.
films, err := totoro.GetFilms(map[string]string{
"limit":"10",
})Returns a single Film by id.
The documentation can be found here.
ID string `json:"id"`
Name string `json:"name"`
Gender string `json:"gender"`
Age string `json:"age"`
EyeColor string `json:"eye_color"`
HairColor string `json:"hair_color"`
Films []string `json:"films"`
Species string `json:"species"`
URL string `json:"url"`Returns a slice of People, you can pass a query that can be used to set the limit param.
films, err := totoro.GetPeople(map[string]string{
"limit":"10",
})Returns a single People by id.
The documentation can be found here.
ID string `json:"id"`
Name string `json:"name"`
Climate string `json:"climate"`
Terrain string `json:"terrain"`
SurfaceWater string `json:"surface_water"`
Residents []string `json:"residents"`
Films []string `json:"films"`
URL []string `json:"url"`Returns a slice of Location, you can pass a query that can be used to set the limit param.
films, err := totoro.GetLocations(map[string]string{
"limit":"10",
})Returns a single Location by id.
The documentation can be found here.
ID string `json:"id"`
Name string `json:"name"`
Classification string `json:"classification"`
EyeColor string `json:"eye_color"`
HairColor string `json:"hair_color"`
People []string `json:"people"`
Films []string `json:"films"`
URL string `json:"url"`Returns a slice of Species, you can pass a query that can be used to set the limit param.
films, err := totoro.GetSpecies(map[string]string{
"limit":"10",
})Returns a single Species by id.
The documentation can be found here.
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
VehicleClass string `json:"vehicle_class"`
Length string `json:"length"`
Pilot string `json:"pilot"`
Films string `json:"films"`
URL string `json:"url"`Returns a slice of Vehicles, you can pass a query that can be used to set the limit param.
films, err := totoro.GetVehicles(map[string]string{
"limit":"10",
})Returns a single Vehicles by id.