@quranjs/api 1.8.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,41 +1,81 @@
1
- ![Quranjs Api Header](https://github.com/quran/api-js/raw/master/media/repo-header.png)
2
- A library for fetching quran data from the [quran.com API][qdc-api]. This library also works on both Node.js and the browser.
1
+ # @quranjs/api
3
2
 
4
- [Checkout Docs][docs]
5
-
6
- [![Build Status][build-badge]][build]
7
- [![MIT License][license-badge]][license]
8
3
  [![NPM Version][npm-badge]][npm]
9
- [![Minziped Size][size-badge]][npm]
4
+ [![MIT License][license-badge]][license]
5
+ [![Build Status][build-badge]][build]
10
6
  [![NPM Monthly downloads][downloads-badge]][npm]
11
7
 
12
- ## Installation
8
+ A JavaScript/TypeScript library for fetching **authentic, scholarly verified Quran data** from the [Quran.com API](https://api-docs.quran.foundation/docs/category/content-apis).
9
+
10
+ Unlike other sources, this SDK connects you directly to the **[Quran Foundation](https://quran.foundation)**—ensuring a **trusted, highly scrutinized source** of reliable content, including properly licensed translations, tafsir, and supplementary materials.
13
11
 
14
- using npm:
12
+ Works seamlessly in both Node.js and browser environments.
15
13
 
16
- ```ssh
14
+ **Built by the [Quran Foundation](https://quran.foundation) — the team behind [Quran.com](https://quran.com)**
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ # npm
17
20
  npm install @quranjs/api
21
+
22
+ # yarn
23
+ yarn add @quranjs/api
24
+
25
+ # pnpm
26
+ pnpm add @quranjs/api
18
27
  ```
19
28
 
20
- using yarn:
29
+ ## Quick Start
21
30
 
22
- ```ssh
23
- yarn add @quranjs/api
31
+ ```typescript
32
+ import { quran } from '@quranjs/api';
33
+
34
+ // Get all chapters
35
+ const chapters = await quran.v4.chapters.findAll();
36
+
37
+ // Get a specific chapter
38
+ const surah = await quran.v4.chapters.findById(1);
39
+
40
+ // Get verses of a chapter
41
+ const verses = await quran.v4.verses.findByChapter(1);
42
+
43
+ // Search the Quran
44
+ const results = await quran.v4.search.search('mercy');
24
45
  ```
25
46
 
26
- ## Getting Started
47
+ ## Documentation
48
+
49
+ For complete documentation, guides, and API reference, visit:
50
+
51
+ 📚 **[SDK Documentation](https://api-docs.quran.foundation/docs/sdk/javascript)**
52
+
53
+ ## Features
27
54
 
28
- you can visit the [docs][docs] for more details.
55
+ - 🚀 Full TypeScript support
56
+ - 🌐 Works in Node.js and browsers
57
+ - ✅ Scholarly verified data
58
+ - 📖 Access chapters, verses, juzs, and more
59
+ - 🔍 Full-text search
60
+ - 🎧 Audio recitations
61
+ - 🌍 Multiple verified translations and languages
62
+
63
+ ## Links
64
+
65
+ - [Quran Foundation](https://quran.foundation) — Our mission to make the Quran accessible to everyone
66
+ - [API Documentation](https://api-docs.quran.foundation) — Full API reference
67
+ - [GitHub Repository](https://github.com/quran/api-js) — Source code and issues
68
+
69
+ ## License
70
+
71
+ MIT © [Quran Foundation](https://quran.foundation)
29
72
 
30
73
  <!-- Links -->
31
74
 
32
- [qdc-api]: https://api-docs.quran.com/docs/quran.com_versioned/4.0.0/quran-com-api
33
- [docs]: https://quranjs.com/
75
+ [npm]: https://www.npmjs.com/package/@quranjs/api
76
+ [npm-badge]: https://img.shields.io/npm/v/@quranjs/api
77
+ [license-badge]: https://img.shields.io/npm/l/@quranjs/api
78
+ [license]: https://github.com/quran/api-js/blob/main/LICENSE
34
79
  [build-badge]: https://github.com/quran/api-js/workflows/CI/badge.svg
35
80
  [build]: https://github.com/quran/api-js/actions?query=workflow%3ACI
36
- [license-badge]: https://badgen.net/github/license/quranjs/api
37
- [license]: https://github.com/quran/api-js/blob/master/LICENSE
38
- [npm]: https://www.npmjs.com/package/@quranjs/api
39
- [npm-badge]: https://badgen.net/npm/v/@quranjs/api
40
- [downloads-badge]: https://img.shields.io/npm/dm/@quranjs/api.svg
41
- [size-badge]: https://badgen.net/packagephobia/publish/@quranjs/api
81
+ [downloads-badge]: https://img.shields.io/npm/dm/@quranjs/api