danieltanfh95 / btapi

baka tsuki api clean up
http://btapi-shadowys.rhcloud.com/
8 stars 5 forks source link

Baka Tsuki API

Join the chat at https://gitter.im/Shadowys/btapi Build Status Dependency Status

This is the new API for Baka Tsuki, based on the original mediawiki API. This project is born out of :heart: for Baka Tsuki and also the #$%@#@ when trying to get any information out of the Baka Tsuki pages. There are just too many parsers but none of them can handle all the nearly random ways BT projects can be formatted. It is currently hosted on Heroku here but you can also host it yourself through NodeJS. Edit: The application is hosted on OpenShift now! Say no more to dynos sleeping!

The API for the following has stabilised:

To do:

Tests

Run npm test.

Test coverage is still quite low as of now (45% of utils.js only) but I'll be adding more tests before I introduce any new features.

Technologies

This API uses NodeJS, ExpressJS for the backend, CheerioJS for quick and forgiving parsing and tranversing HTML, and Nodemon during development to reload code. For full list of modules used, look at package.json.

Development

Clone the repo, or download the zip. Run npm run devstart to start a simple server. npm start is for production use only. (Note: might use forever in the future.) Currently the main bulk of the logic lies in api.js. Note that you may need some proficiency in jQuery to use Cheerio.

The API is now being used in an iOS app for Baka Tsuki (still in development). I am in the process of asking for permission to be hosted on Baka Tsuki itself.

Contributing

Issues or features requests are welcome!

Version History

  1. 2015/10/1 : Version 1.0 is released.

Bitdeli Badge