Giter VIP home page Giter VIP logo

howlongtobeat's Introduction

Howlongtobeat API

Latest Build Status npm version codecov

About & Credits

How long to beat provides information and data about games and how long it will take to finish them.

This library is a simple wrapper api to fetch data from How long to beat (search and detail). It is an awesome website and a great service, also heavily living from community data. Please check the website and support if you like what they are doing.

Usage

Install the dependency

npm install howlongtobeat --save

Use in code

Add imports (javascript)

let hltb = require('howlongtobeat');
let hltbService = new hltb.HowLongToBeatService();

Add imports (typescript)

import { HowLongToBeatService, HowLongToBeatEntry } from 'howlongtobeat';

let hltbService = new HowLongToBeatService();

Searching for a game

hltbService.search('Nioh').then(result => console.log(result));

search() will return a Promise with an Array<HowLongToBeatEntry>

Getting details for a game

hltbService.detail('36936').then(result => console.log(result)).catch(e => console.error(e));

search() will return a Promise with an HowLongToBeatEntry. If the id is not known, an error is thrown, you should catch the Promise anyway.

Known issues

Errors

DeprecationWarning: sys is deprecated. Use util instead.

This seems to come from either soupselect or unirest. Will look into it and at least open an issue.

Missing features

  • Currently only "Main Story" and "Completionist" times are parsed and set
  • Error and Exception handling is almost not present, must be improved

License

WTFPL

howlongtobeat's People

Contributors

ckatzorke avatar

Watchers

Gaurav Gupta avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.