fazilet-api
Fazilet Calendar API client for node.js / browser.
Last updated a year ago by dbtek .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install fazilet-api 
SYNC missed versions from official npm registry.

fazilet-api v3

Fazilet Takvimi api client for Node and browser (with browserify). Written in ES6. Use it with latest Node.js versions later than 4.2.0.

Disclaimer

This library is currently not being published publicly on npm or anywhere. Please do not distribute this library out there publicly. Use it with responsibly. And let us know at bilgi@fazilet.com.tr, if there is a revelation.

Install

If you are reading this you probably got a tarball archive. So, to install run:

$ npm install [path_to_tarball]/fazilet-api.tgz

Getting Started

To start using api create an instance. All methods return ES6 promises.

Below tutorial is for Node. To use it with browser use require('fazilet-api/browser').

let FaziletApi = require('fazilet-api');
let fazilet = new FaziletApi({ apiKey: 'SECRET_API_KEY' });

// pray times of current date.
var regionId = 31; // Istanbul
fazilet.times(regionId, new Date())
  .then(times => console.log(times.sunrise))
  .catch(ex => console.error(ex));

// hadith of current date.
fazilet.hadith(new Date())
  .then(hadith => console.log(hadith.content))
  .catch(ex => console.error(ex));

// articles of current year.
var languageId = 1; // turkish
fazilet.yearlyArticles(2018, languageId)
  .then(articles => console.log(articles[0].content))
  .catch(ex => console.error(ex));

Documentation

Docs are generated with JsDoc 3 under docs directory.

Author

─░smail Demirbilek.

Current Tags

  • 3.0.2                                ...           latest (a year ago)

1 Versions

  • 3.0.2                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 1
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |