@xsor/awqat-salah-client
v1.2.1
Published
A typescript and javascript client library for Awqat Salah Rest API Service
Downloads
101
Maintainers
Readme
Awqat Salah Client
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
- Install the package
npm install @xsor/awqat-salah-client
- 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