-
Notifications
You must be signed in to change notification settings - Fork 0
Planets
Gio85 edited this page Feb 27, 2021
·
5 revisions
In order to fetch the data, the following methods can be used;
-
getSchema()
which will return the resource schema -
read()
which will return the single resource -
list()
which will return the resources list -
getWookiee()
which will return.. Wookiee!!
Examples:
// Get the instance of the client
const client = ApiClient.getInstance()
const planets = await client.planets.list({ search: 'Tatooine' })
const planets = await client.planets.list({ page: 3 })
const planetsSchema = await client.planets.getSchema()
const singlePlanet = await client.planets.read('1')
const planetWookie = await client.planets.getWookiee('1')
May the force be with you.. ✌️