smwcentral.net-jsonapi

0.0.5 • Public • Published

smwcentral.net-jsonapi

JSON API for smwcentral.net

Examples

Listing

Parse the listing pages on smwcentral.net

Optional: Filter by name

Code

const { list } = require('smwcentral.net-jsonapi')
const opts = {
  page: 1, // optional
  name: 'luigi' // optional
}
 
list(opts, console.log)

Output

{
  pages: { current: 1, total: 3 },
  data: [
    {
      title: 'Luigi and the Final Year',
      uri: 'https://www.smwcentral.net/?p=section&a=details&id=15714',
      demo: true,
      featured: false,
      length: 18,
      difficulty: 'Easy',
      authors: [Object],
      rating: 4.5,
      size: 426629,
      download: 'https://dl.smwcentral.net/15714/Luigi%20and%20the%20Final%20Year(Demo).zip',
      date: '2017-06-23T23:17:41Z',
      id: 15714
    },
    ...
  ]
}

Game

Parse a game page on smwcentral.net

Optional: Filter by name

Code

const { game } = require('smwcentral.net-jsonapi')
const gameId = 15695
 
game(gameId, console.log)

Output

{
  data: {
    title: 'Super Ryu World',
    uri: 'https://www.smwcentral.net/?p=section&a=details&id=15695',
    demo: false,
    featured: false,
    length: 16,
    difficulty: 'Kaizo: Light',
    authors: [Object],
    rating: 4.4,
    size: 166738,
    download: 'https://dl.smwcentral.net/15695/Super%20Ryu%20World.zip',
    date: '2017-06-21T17:40:04Z',
    id: 15695
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i smwcentral.net-jsonapi

Weekly Downloads

1

Version

0.0.5

License

ISC

Last publish

Collaborators