0.1.0 • Published 2 years ago

@vitaliim89/swapiwrapper v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Swapi Wrapper

it's Swapi wrapper library(https://swapi.dev).

Features

  • get all people list
  • get people details model by url coming from people model
  • get Planets list ...

Installation

yarn add swapi

Usage

  import { Swapi } from 'swapi';

  const swapi = new Swapi();
  let result = await swapi.getAllPeople();
  setPeople(result.data?.results || []);

Models

Will add more further.

People

  name: string,
  height: string,
  mass: string,
  hair_color: string,
  skin_color: string,
  eye_color: string,
  birth_year: string,
  gender: string,
  homeworld: string,
  films: string[],
  species: string[],
  vehicles: string[],
  starships: string[],
  created: string,
  edited: string,
  url: string,

License

MIT