1.1.9 • Published 4 years ago

foxifyjs v1.1.9

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

Any contribution is welcomed. Table of contents:

Installation

npm install --save foxifyjs

Usage

const foxify = require('foxifyjs')

Methods

anime

anime.get()

Get information about a particular anime

ParameterTypeDescription
idintid of anime to get
const foxify = require('foxifyjs')
const { anime } = foxify

const id = 20
anime.get(id)
  .then(data => console.log(data))
  .catch(err => console.log(err))

Returns an object with a data property(object) indexed by malID, with a single Anime model

anime.getAll()

Get information about all anime, (optionally filtered by a type)

ParameterOptionalTypeDescription
limitYesintegerLimits the amount of search results returned
const foxify = require('foxifyjs')
const { anime } = foxify

anime.getAll()
  .then(data => console.log(data))
  .catch(err => console.log(err))

Returns an object with a data property(object) indexed by malID, containing all the Anime model from Anifox

anime.getAllType()

Get information about all anime, (optionally filtered by a type)

ParameterOptionalTypeDescription
typeNostringThe type, must be either TV, ONAs, OVAs, Specials or Movies
limitYesintegerLimits the amount of search results returned
const foxify = require('foxifyjs')
const { anime } = foxify

anime.getAll('TV')
  .then(data => console.log(data))
  .catch(err => console.log(err))

Returns an object with a data property(object) indexed by malID, containing all the Anime model from Anifox filtered by type

anime.getAiring()

Get the current airing anime

const foxify = require('foxifyjs')
const { anime } = foxify

anime.getAiring()
  .then(data => console.log(data))
  .catch(err => console.log(err))

Returns an object with a data property(object) indexed by malID, containing all the Anime model that are currently airing

anime.search()

Get anime by a search query

ParameterTypeDescription
querystringstring of an anime to search for
const foxify = require('foxifyjs')
const { anime } = foxify

anime.search('Naruto')
  .then(data => console.log(data))
  .catch(err => console.log(err))

Returns an object with a data property(object) indexed by malID, containing all the Anime model that match the query

season

season.get()

Get a list of anime for a given season, type is optional and can be ommitted but will return every anime for that season (not filtered by Ovas, Movies etc)

ParameterOptionalTypeDescription
yearNonumberThe year
seasonNostringThe season, must be either spring, summer, fall or winter
typeYesstringThe type, must be either TV, ONAs, OVAs, Specials or Movies
const foxify = require('foxifyjs')
const { season } = foxify

const season = 'winter'
const year = '2016'
const type = 'TV'

season.get(season, year, type)
  .then(data => console.log(data))
  .catch(err => console.log(err))

Returns an object with a data property(object) indexed by malID, containing all the Anime model the given season

season.getCurrent()

Get a list of anime for the current season

const foxify = require('foxifyjs')
const { season } = foxify

season.getCurrent()
  .then(data => console.log(data))
  .catch(err => console.log(err))

Returns an object with a data property(object) indexed by malID, containing all the Anime model the current season

episode

episode.get()

Get a list of episode(s) for a given anime, if no episodeNumber is provided, will return all episodes

ParameterOptionalTypeDescription
idNointid of anime to get
episodeNumberYesstringepisode number to search for
const foxify = require('foxifyjs')
const { episode } = foxify

const id = 20
const episodeNumber = '125'

episode.get(id, episodeNumber)
  .then(data => console.log(data))
  .catch(err => console.log(err))

Returns an object with a data property array containing a list of Episode model for the provided anime

Data models

Anime data model

Licensor/Producer/fromType/Genres/Synopsis may not always exist

PropertyTypeDescription
malIDintid for the anime
titlestringtitle of the anime
typestringtype of anime (TV, OVA etc)
pictureurl167x242 image for the anime
synopsisstringdescription about the anime
licensorstringlicensor for the anime
linkstringlink to the MAL page for this anime
genresarraylist of genres the anime is
producersarraylist of producers for the anime
fromTypestringsource material type
nbEpintnumber of episodes the anime has
releaseDateintrelease date (stored as a unix timestamp)

Episode data model

Resolution may not always exist

PropertyTypeDescription
malIDintid for the anime
epNumberstringepisode number
categorystringtype of episode (raw or english translated) 1_2 == english, 1_4 == raw
resolutionstringresolution (either as a value e.g. 1080p or 1920x1080)
airedintunix timestamp for the airing date
linkurlurl to the nyaa page
torrenttorrent file urlepisode number
magnetmagnet urlepisode number

License

This project is licensed under the MIT License - see the LICENSE.md file for details

1.1.9

4 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago