@xsor/awqat-salah-client
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

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

Package Sidebar

Install

npm i @xsor/awqat-salah-client

Weekly Downloads

6

Version

1.2.1

License

MIT

Unpacked Size

72.1 kB

Total Files

9

Last publish

Collaborators

  • xsor