1.1.0 • Published 4 months ago

@xsor/awqat-salah-client v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Awqat Salah Client

npm package downloads version coverage test build License

Description

A client library for Diyanet's Awqat Salah Rest API Service for fetching Islamic prayer times across different geographical locations. Instructions for obtaining a username and password required to authenticate with the API can be found

Contains the following modules:

  • a CommonJS (in dist/cjs folder)
  • ES Modules (in dist/esm folder)
  • bundled and minified UMD (in dist/umd folder)
  • TypeScript declaration files (in dist/types folder)

Usage

Node/Browser

  1. Install the package
npm install @xsor/awqat-salah-client
  1. Import and use the AwqatSalahApi function
import { AwqatSalahApi } from '@xsor/awqat-salah-client';

(async () => {
    const api = new AwqatSalahApi();

    await api.login('email', 'password');

    const dailyContent = await api.dailyContent();
    console.info(`Got daily content, day of year: ${dailyContent?.dayOfYear}`);

})();

Contributing

Feel free to make a pull request and file issues on the repository page!

Test

Test your code with Jest framework:

npm run test

Note: Uses husky and commitlint to automatically execute test and lint commit message before every commit.

Build

Build production (distribution) files in your dist folder:

npm run build
1.1.0

4 months ago

1.0.0

7 months ago