Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/faressoft/azhan-jo
Display azhan times in Amman
https://github.com/faressoft/azhan-jo
Last synced: 3 months ago
JSON representation
Display azhan times in Amman
- Host: GitHub
- URL: https://github.com/faressoft/azhan-jo
- Owner: faressoft
- License: mit
- Created: 2016-03-01T10:12:56.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-06-17T07:05:04.000Z (over 6 years ago)
- Last Synced: 2024-10-14T06:27:33.376Z (3 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-jordan - Azhan Jo - Get azhan times in Amman. (NodeJS / Gists)
README
# Azhan Jo
Get azhan times in Amman
# Install Globally
To be able to get azhan's times in your cli you have to install the package globally
`npm install azhan-jo -g`
To fetch and print prayer times you can use one of the commands
`azhan` or `adan` or `adhan`
# Usage
Install the package to your project
`npm install azhan-jo`
Sample Code
```js
var azhan = require('azhan-jo');azhan.getPrayerTimes().then(function(results) {
console.log(results);
}).catch(function(error) {
console.log(error);
});
```
# Methods### getTitles()
Return an array of prayer titles
['fajr', 'sunrise', 'dhuhr', 'asr', 'maghrib', 'isha']```js
console.log(azhan.getTitles());
```### getPrayerTimes()
Fetch, parse, and return an object of prayer times through `Promise` object.```js
azhan.getPrayerTimes().then(function(results) {
console.log(results);
}).catch(function(error) {
console.log(error);
});
```### getPrayerTime(title)
Fetch, parse, and return an the time for a specefic prayer by its title through `Promise` object.```js
azhan.getPrayerTime('fajr').then(function(result) {
console.log(result);
}).catch(function(error) {
console.log(error);
});
```# License
This project is under the MIT license, so feel free to use it.