alquran/api-client

AlQuran.cloud REST API 客户端

v1.3 2022-06-06 09:07 UTC

This package is auto-updated.

Last update: 2024-09-22 11:28:14 UTC


README

CircleCI

AlQuran Cloud API 客户端 (PHP)

这是一个使用 alquran.cloud 的 REST API 来获取《古兰经》的经文、章节、卷或整个《古兰经》的 PHP API 客户端...

安装

API 客户端是一个 composer 包。要使用它,您需要运行以下命令

composer require alquran/api-client

用法

实例化客户端

$t = new \AlQuranCloud\ApiClient\Client();

获取经文

要获取单个经文,请使用

$t->ayah(765); // This will return Ayah 765
$t->ayah(765, 'en.pickthall'); // This will return Ayah 765 with Marmaduke Pickthall's English translation
$t->ayah('2:255'); // This will return Surah 2, Ayah 255 (which is Ayat Al Kursi)

获取章节

要获取章节,请使用

$t->surah(36); // This will return Surah Yaseen
$t->surah(36, 'en.asad'); // This will return Surah Yaseen with Muhammad Asad's English translation

获取卷

要获取卷,请使用

$t->juz(30); // This will return Juz 30 (there are only 30!)

获取版本、搜索等...

请参阅完整的文档在 docs/index.html(克隆存储库并在浏览器中打开文件)。

作者和贡献者

Meezaan-ud-Din Abdu Dhil-Jalali Wal-Ikram (@meezaan)。

支持或联系

有关支持,请访问 http://alquran.cloud/apihttp://alquran.cloud/contact