{"id":16100636,"url":"https://github.com/0x61nas/alquran-cloud-api","last_synced_at":"2025-03-16T08:32:27.483Z","repository":{"id":41383607,"uuid":"509210033","full_name":"0x61nas/alquran-cloud-api","owner":"0x61nas","description":"A simple, fast and ergonomic java wrapper for alquran-cloud api","archived":false,"fork":false,"pushed_at":"2025-03-01T02:26:29.000Z","size":3747,"stargazers_count":17,"open_issues_count":14,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-01T03:22:27.123Z","etag":null,"topics":["alquran-cloud-api","hacktoberfest","java","quran-api","quran-api-java","quran-translation"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0x61nas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-30T19:34:17.000Z","updated_at":"2024-12-16T16:06:34.000Z","dependencies_parsed_at":"2024-08-19T16:59:44.535Z","dependency_job_id":"7d4e5508-87ee-4bb8-a00f-b530c5f3ff7e","html_url":"https://github.com/0x61nas/alquran-cloud-api","commit_stats":null,"previous_names":["0x61nas/alquran-cloud-api"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x61nas%2Falquran-cloud-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x61nas%2Falquran-cloud-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x61nas%2Falquran-cloud-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x61nas%2Falquran-cloud-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0x61nas","download_url":"https://codeload.github.com/0x61nas/alquran-cloud-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243806071,"owners_count":20350775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alquran-cloud-api","hacktoberfest","java","quran-api","quran-api-java","quran-translation"],"created_at":"2024-10-09T18:47:31.442Z","updated_at":"2025-03-16T08:32:26.836Z","avatar_url":"https://github.com/0x61nas.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A simple java wrapper library for [alquran-cloud api](https://alquran.cloud/api) 🤍\n\n[![JitPack badge](https://jitpack.io/v/anas-elgarhy/alquran-cloud-api.svg)](https://jitpack.io/#anas-elgarhy/alquran-cloud-api)\n[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=anas-elgarhy_alquran-cloud-api\u0026metric=ncloc)](https://sonarcloud.io/summary/new_code?id=anas-elgarhy_alquran-cloud-api)\n[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=anas-elgarhy_alquran-cloud-api\u0026metric=code_smells)](https://sonarcloud.io/summary/new_code?id=anas-elgarhy_alquran-cloud-api)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=anas-elgarhy_alquran-cloud-api\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=anas-elgarhy_alquran-cloud-api)\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=anas-elgarhy_alquran-cloud-api\u0026metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=anas-elgarhy_alquran-cloud-api)\n[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=anas-elgarhy_alquran-cloud-api\u0026metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=anas-elgarhy_alquran-cloud-api)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=anas-elgarhy_alquran-cloud-api\u0026metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=anas-elgarhy_alquran-cloud-api)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=anas-elgarhy_alquran-cloud-api\u0026metric=bugs)](https://sonarcloud.io/summary/new_code?id=anas-elgarhy_alquran-cloud-api)\n\n## It is still under development. 🚧\n\n\n## How to add this library into your project\n\n### Maven\n\n**Step 1**. Add the JitPack repository to your build file\n\n```xml\n\n\u003crepositories\u003e\n\t\u003crepository\u003e\n\t\t\u003cid\u003ejitpack.io\u003c/id\u003e\n\t\t\u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n\t\u003c/repository\u003e\n\u003c/repositories\u003e\n```\n\n**Step 2**. Add the dependency\n\n```xml\n\u003cdependency\u003e\n\t\u003cgroupId\u003ecom.github.anas-elgarhy\u003c/groupId\u003e\n\t\u003cartifactId\u003ealquran-cloud-api\u003c/artifactId\u003e\n\t\u003cversion\u003e0.4.4\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n#### Gradle:\n\n**Step 1**. Add the JitPack repository to your build file\u003cbr\u003e\n*Add it in your root build.gradle at the end of repositories:*\n\n```gradle\nallprojects {\n    repositories {\n        ...\n        maven { url 'https://jitpack.io' }\n    }\n}\n```\n\n**Step 2**. Add the dependency\n\n```gradle\n\tdependencies {\n\t        implementation 'com.github.anas-elgarhy:alquran-cloud-api:0.4.4'\n\t}\n```\n\n## Usage\n\n```java\npublic class Example1 {\n    public static void main(String[] args) throws IOException {\n        Ayah ayah = Ayah.getAyah(1); // Get the first ayah in the quaran in arabic edition\n        System.out.println(ayah.getText());\n        System.out.println(\"***\");\n\n        System.out.println(\"----- آية عشوائية -----\");\n        Ayah randomAyah = Ayah.getRandomAyah(); // Get a random ayah in the quaran in arabic edition\n        Surah surah = randomAyah.getSurah(); // Get the surah of the random ayah\n        System.out.println(randomAyah.getText() + \" - من \" + surah.getName());\n        System.out.println(\"***\");\n\n        Surah surah2 = Surah.getSurah(1); // Get the first surah in the quaran in arabic edition\n        System.out.println(surah2.getName());\n        System.out.println(\"الآيات: \");\n        for (Ayah a : surah2.getAyahs()) {\n            System.out.println(a.getText() + \" (\" + a.getNumberInSurah() + \")\");\n        }\n    }\n}\n\n```\n![Example one output](./Screenshots/example_1_out_0.1.2-v1.png)\n\n```java\npublic class Example2 {\n    public static void main(String[] args) throws IOException {\n        Edition[] editions = Edition.getEditions(); // Get all available editions\n        System.out.println(\"The number of available editions: \" + editions.length);\n\n        System.out.println(\"Editions: \");\n\n        for (Edition edition : editions) {\n            System.out.println(edition.getName() + \" (\" + edition.getIdentifier() + \")\" +\n                    \" - Edition type: \" + edition.getFormat().toString());\n        }\n    }\n}\n```\n![Example two output](./Screenshots/example_2_out_0.1.2-v1.gif)\n\n```java\npublic class Example3 {\n    public static void main(String[] args) throws IOException {\n        // Get th all available editions in specific language\n        Edition[] editionsInEnglish = Edition.getEditions(\"en\");\n        System.out.println(\"The number of available editions in English: \" + editionsInEnglish.length);\n\n\n        // Get th all available editions in specific language and format (audio or text) and type (quran or translation, etc)\n        // null means all\n        Edition[] editionsInEnglishAudio = Edition.getEditions(EditionFormat.AUDIO, \"en\", null);\n        System.out.println(\"The number of available editions in English audio: \" + editionsInEnglishAudio.length);\n\n        Ayah ayah = Edition.getAyah(1, editionsInEnglishAudio[0]); // Get the first ayah in the quaran in specific edition\n        // Becose the audio editions also have the text editions insiw, and usually the text editions are arabic.\n        System.out.println(ayah.getText());\n        System.out.println(ayah.getAudioUrl()); // Get the audio url of the ayah in 192 kbps.\n        // Get the audio urls in other bitrates, returns same url if no other bitrates.\n        System.out.println(Arrays.toString(ayah.getSecondaryAudioUrls()));\n\n        Edition edition = editionsInEnglish[0];\n        System.out.println(edition.getName());\n        System.out.println(edition.getType());\n        System.out.println(edition.getFormat());\n\n        Ayah ayahFromEdition = Ayah.getAyah(1, edition); // Get the first ayah in the quaran in specific edition\n        System.out.println(ayahFromEdition.getText());\n\n        // Get the first surah in the quaran in specific edition\n        Surah fistSurah = Surah.getSurah(1, edition);\n        System.out.println(fistSurah.getName());\n\n        // Or you can use the Surah enum to get the surah:\n        Surah s = Surah.getSurah(Surahs.AL_ALAQ);\n        System.out.println(s.getName());\n    }\n}\n```\n![Example three output](./Screenshots/example_3_out_0.2.0-v1.png)\n\n## Requirements for development:\n- Maven\n- jdk 17\n- IntelliJ IDEA (not required but recommended)\n\n\n### Available in\n\n[![GitHub](https://img.shields.io/badge/GitHub-Main%20repo-brightgreen?style=for-the-badge\u0026logo=GitHub)](https://github.com/anas-elgarhy/alquran-cloud-api)\n[![GitLab](https://img.shields.io/badge/GitLab-Mirror%20repo-brightgreen?style=for-the-badge\u0026logo=GitLab)](https://gitlab.com/anas-elgarhy/alquran-cloud-api)\n[![BitBucket](https://img.shields.io/badge/BitBucket-Mirror%20repo-brightgreen?style=for-the-badge\u0026logo=BitBucket)](https://bitbucket.org/anas_elgarhy/alquran-cloud-api)\n[![Codeberg](https://img.shields.io/badge/Codeberg-Mirror%20repo-brightgreen?style=for-the-badge\u0026logo=Codeberg)](https://codeberg.org/anas-elgarhy/alquran-cloud-api)\n\n[![Quality gate](https://sonarcloud.io/api/project_badges/quality_gate?project=anas-elgarhy_alquran-cloud-api)](https://sonarcloud.io/summary/new_code?id=anas-elgarhy_alquran-cloud-api)\n\n[![SonarCloud](https://sonarcloud.io/images/project_badges/sonarcloud-black.svg)](https://sonarcloud.io/summary/new_code?id=anas-elgarhy_alquran-cloud-api)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0x61nas%2Falquran-cloud-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0x61nas%2Falquran-cloud-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0x61nas%2Falquran-cloud-api/lists"}