A simple java wrapper library for alquran-cloud api 🤍☕

Overview

A simple java wrapper library for alquran-cloud api 🤍

JitPack badge Lines of Code Code Smells Quality Gate Status Reliability Rating Duplicated Lines (%) Vulnerabilities Bugs

It is still under development. 🚧

How to add this library into your project

Maven

Step 1. Add the JitPack repository to your build file

<repositories>
	<repository>
		<id>jitpack.io</id>
		<url>https://jitpack.io</url>
	</repository>
</repositories>

Step 2. Add the dependency

<dependency>
	<groupId>com.github.anas-elgarhy</groupId>
	<artifactId>alquran-cloud-api</artifactId>
	<version>0.4.0-v1</version>
</dependency>

Gradle:

Step 1. Add the JitPack repository to your build file
Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Step 2. Add the dependency

	dependencies {
	        implementation 'com.github.anas-elgarhy:alquran-cloud-api:0.4.0-v1'
	}

Usage

public class Example1 {
    public static void main(String[] args) throws IOException {
        Ayah ayah = Ayah.getAyah(1); // Get the first ayah in the quaran in arabic edition
        System.out.println(ayah.getText());
        System.out.println("***");

        System.out.println("----- آية عشوائية -----");
        Ayah randomAyah = Ayah.getRandomAyah(); // Get a random ayah in the quaran in arabic edition
        Surah surah = randomAyah.getSurah(); // Get the surah of the random ayah
        System.out.println(randomAyah.getText() + " - من " + surah.getName());
        System.out.println("***");

        Surah surah2 = Surah.getSurah(1); // Get the first surah in the quaran in arabic edition
        System.out.println(surah2.getName());
        System.out.println("الآيات: ");
        for (Ayah a : surah2.getAyahs()) {
            System.out.println(a.getText() + " (" + a.getNumberInSurah() + ")");
        }
    }
}

Example one output

public class Example2 {
    public static void main(String[] args) throws IOException {
        Edition[] editions = Edition.getEditions(); // Get all available editions
        System.out.println("The number of available editions: " + editions.length);

        System.out.println("Editions: ");

        for (Edition edition : editions) {
            System.out.println(edition.getName() + " (" + edition.getIdentifier() + ")" +
                    " - Edition type: " + edition.getFormat().toString());
        }
    }
}

Example two output

public class Example3 {
    public static void main(String[] args) throws IOException {
        // Get th all available editions in specific language
        Edition[] editionsInEnglish = Edition.getEditions("en");
        System.out.println("The number of available editions in English: " + editionsInEnglish.length);


        // Get th all available editions in specific language and format (audio or text) and type (quran or translation, etc)
        // null means all
        Edition[] editionsInEnglishAudio = Edition.getEditions(EditionFormat.AUDIO, "en", null);
        System.out.println("The number of available editions in English audio: " + editionsInEnglishAudio.length);

        Ayah ayah = Edition.getAyah(1, editionsInEnglishAudio[0]); // Get the first ayah in the quaran in specific edition
        // Becose the audio editions also have the text editions insiw, and usually the text editions are arabic.
        System.out.println(ayah.getText());
        System.out.println(ayah.getAudioUrl()); // Get the audio url of the ayah in 192 kbps.
        // Get the audio urls in other bitrates, returns same url if no other bitrates.
        System.out.println(Arrays.toString(ayah.getSecondaryAudioUrls()));

        Edition edition = editionsInEnglish[0];
        System.out.println(edition.getName());
        System.out.println(edition.getType());
        System.out.println(edition.getFormat());

        Ayah ayahFromEdition = Ayah.getAyah(1, edition); // Get the first ayah in the quaran in specific edition
        System.out.println(ayahFromEdition.getText());

        // Get the first surah in the quaran in specific edition
        Surah fistSurah = Surah.getSurah(1, edition);
        System.out.println(fistSurah.getName());

        // Or you can use the Surah enum to get the surah:
        Surah s = Surah.getSurah(Surahs.AL_ALAQ);
        System.out.println(s.getName());
    }
}

Example three output

Requirements for development:

  • Maven
  • jdk 17
  • IntelliJ IDEA (not required but recommended)

Available in

GitHub GitLab BitBucket Codeberg

Quality gate

SonarCloud

Comments
  • Bump jackson-databind from 2.13.3 to 2.13.4.1

    Bump jackson-databind from 2.13.3 to 2.13.4.1

    Bumps jackson-databind from 2.13.3 to 2.13.4.1.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Merge master

    Merge master

    • Create the first test
    • Add junit 🥰
    • Create the unit tests for Edition class 🥰
    • Create the unit tests for the Ayah class 🥰
    • Create the unit tests for the Surah class 🥰
    • Create the unut tests for the QuranCollection class 🥰
    opened by anas-elgarhy 1
  • Create the unit tests 🥰

    Create the unit tests 🥰

    • Create the first test
    • Add junit 🥰
    • Create the unit tests for Edition class 🥰
    • Create the unit tests for the Ayah class 🥰
    • Create the unit tests for the Surah class 🥰
    • Create the unut tests for the QuranCollection class 🥰
    opened by anas-elgarhy 1
  • [ImgBot] Optimize images

    [ImgBot] Optimize images

    Beep boop. Your images are optimized!

    Your image file size has been reduced by 21% 🎉

    Details

    | File | Before | After | Percent reduction | |:--|:--|:--|:--| | /Screenshots/example_1_out_0.1.2-v1.png | 35.45kb | 26.44kb | 25.43% | | /Screenshots/example_2_out_0.1.2-v1.gif | 1,900.68kb | 1,500.00kb | 21.08% | | /Screenshots/example_3_out_0.2.0-v1.png | 29.59kb | 23.86kb | 19.35% | | | | | | | Total : | 1,965.72kb | 1,550.30kb | 21.13% |


    📝 docs | :octocat: repo | 🙋🏾 issues | 🏪 marketplace

    ~Imgbot - Part of Optimole family

    opened by imgbot[bot] 1
  • [Snyk] Security upgrade com.fasterxml.jackson.core:jackson-databind from 2.13.4.1 to 2.13.4.2

    [Snyk] Security upgrade com.fasterxml.jackson.core:jackson-databind from 2.13.4.1 to 2.13.4.2

    Snyk has created this PR to fix one or more vulnerable packages in the `maven` dependencies of this project.

    Changes included in this PR

    • Changes to the following files to upgrade the vulnerable dependencies to a fixed version:
      • pom.xml

    Vulnerabilities that will be fixed

    With an upgrade:

    Severity | Priority Score (*) | Issue | Upgrade | Breaking Change | Exploit Maturity :-------------------------:|-------------------------|:-------------------------|:-------------------------|:-------------------------|:------------------------- medium severity | 616/1000
    Why? Proof of Concept exploit, Has a fix available, CVSS 5.9 | Denial of Service (DoS)
    SNYK-JAVA-COMFASTERXMLJACKSONCORE-3038426 | com.fasterxml.jackson.core:jackson-databind:
    2.13.4.1 -> 2.13.4.2
    | No | Proof of Concept

    (*) Note that the real score may have changed since the PR was raised.

    Check the changes in this PR to ensure they won't cause issues with your project.


    Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

    For more information: 🧐 View latest project report

    🛠 Adjust project settings

    📚 Read more about Snyk's upgrade and patch logic


    Learn how to fix vulnerabilities with free interactive lessons:

    🦉 Denial of Service (DoS)

    size/XS bug fix 
    opened by snyk-bot 1
Releases(0.4.0-v1)
  • 0.4.0-v1(Jul 27, 2022)

    What's Changed

    • Improve the public api by @anas-elgarhy in https://github.com/anas-elgarhy/alquran-cloud-api/pull/4
    • Create the unit tests 🥰 by @anas-elgarhy in https://github.com/anas-elgarhy/alquran-cloud-api/pull/5
    • Merge master by @anas-elgarhy in https://github.com/anas-elgarhy/alquran-cloud-api/pull/6
    • Add more functions and improve the code by @anas-elgarhy in https://github.com/anas-elgarhy/alquran-cloud-api/pull/7
    • update the examples by @anas-elgarhy in https://github.com/anas-elgarhy/alquran-cloud-api/pull/8

    Full Changelog: https://github.com/anas-elgarhy/alquran-cloud-api/compare/0.3.0-v1...0.4.0-v1

    Source code(tar.gz)
    Source code(zip)
  • 0.3.0-v1(Jul 24, 2022)

  • 0.2.2-v1(Jul 24, 2022)

  • 0.2.1-v1(Jul 5, 2022)

    • remove the cache system
    • fix some of code smiles
    • fix reliabilty issues.

    What's Changed

    • [ImgBot] Optimize images by @imgbot in https://github.com/anas-elgarhy/alquran-cloud-api/pull/2
    • Fix bugs and remove the cach system by @anas-elgarhy in https://github.com/anas-elgarhy/alquran-cloud-api/pull/3

    New Contributors

    • @imgbot made their first contribution in https://github.com/anas-elgarhy/alquran-cloud-api/pull/2

    Full Changelog: https://github.com/anas-elgarhy/alquran-cloud-api/compare/0.2.0-v1...0.2.1-v1

    Source code(tar.gz)
    Source code(zip)
    alquran-cloud-api-0.2.1-v1.jar(26.36 KB)
    alquran-cloud-api-with-dependencies.jar(1.89 MB)
  • 0.2.0-v1(Jul 2, 2022)

  • 0.1.3-v1(Jul 1, 2022)

    • Fix the main get editons function
    • Add get all editions languages function
    • Add methods to get random editon
    • Improve the java docs

    Full Changelog: https://github.com/anas-elgarhy/alquran-cloud-api/compare/0.1.2-v1...0.1.3-v1

    Source code(tar.gz)
    Source code(zip)
  • 0.1.2-v1(Jul 1, 2022)

  • 0.1.1-v1(Jul 1, 2022)

  • 0.1.0-v1(Jul 1, 2022)

  • 0.0.1-v1(Jul 1, 2022)

Owner
Anas Elgarhy
A computer is the person who understands me better than anyone else
Anas Elgarhy
循序渐进,学习Spring Boot、Spring Boot & Shiro、Spring Batch、Spring Cloud、Spring Cloud Alibaba、Spring Security & Spring Security OAuth2,博客Spring系列源码:https://mrbird.cc

Spring 系列教程 该仓库为个人博客https://mrbird.cc中Spring系列源码,包含Spring Boot、Spring Boot & Shiro、Spring Cloud,Spring Boot & Spring Security & Spring Security OAuth2

mrbird 24.8k Jan 6, 2023
一个涵盖六个专栏:Spring Boot 2.X、Spring Cloud、Spring Cloud Alibaba、Dubbo、分布式消息队列、分布式事务的仓库。希望胖友小手一抖,右上角来个 Star,感恩 1024

友情提示:因为提供了 50000+ 行示例代码,所以艿艿默认注释了所有 Maven Module。 胖友可以根据自己的需要,修改 pom.xml 即可。 一个涵盖六个主流技术栈的正经仓库: 《Spring Boot 专栏》 《Spring Cloud Alibaba 专栏》 《Spring Clou

芋道源码 15.7k Dec 31, 2022
一套涵盖大部分核心组件使用的Spring Cloud教程,包括Spring Cloud Alibaba及分布式事务Seata,基于Spring Cloud Greenwich及SpringBoot 2.1.7。22篇文章,篇篇精华,32个Demo,涵盖大部分应用场景。

springcloud-learning 简介 一套涵盖大部分核心组件使用的Spring Cloud教程,包括Spring Cloud Alibaba及分布式事务Seata,基于Spring Cloud Greenwich及SpringBoot 2.1.7。22篇文章,篇篇精华,32个Demo,涵盖

macro 5.6k Dec 30, 2022
Demo microservice architecture with Spring ,Spring Cloud Gateway , Spring Cloud config server , Eureuka , keycloak and Docker.

spring-microservice Demo microservice architecture with Spring ,Spring Cloud Gateway , Spring Cloud config server , Eureuka , keycloak and Docker. Arc

null 4 Sep 13, 2022
A spring cloud infrastructure provides various of commonly used cloud components and auto-configurations for high project consistency

A spring cloud infrastructure provides various of commonly used cloud components and auto-configurations for high project consistency.

Project-Hephaestus 2 Feb 8, 2022
A high availability shopping(ecommerce) system using SpringBoot, Spring Cloud, Eureka Server, Spring Cloud Gateway, resillience4j, Kafka, Redis and MySQL.

High-availability-shopping-system A high availability shopping(ecommerce) system using SpringBoot, Spring Cloud, Eureka Server, Spring Cloud Gateway,

LeiH 1 Oct 26, 2022
Python wrapper around the BoofCV Computer Vision Library

PyBoof is Python wrapper for the computer vision library BoofCV. Since this is a Java library you will need to have java and javac installed. The form

Peter Abeles 44 Dec 30, 2022
React native wrapper for Jitsi Meet SDK Library that rely on the native view (Activity / ViewController)

react-native-jitsi-meet-sdk React native wrapper for Jitsi Meet SDK Library. This Library implements the Jitsi SDK with a native activity on the Andro

null 7 May 2, 2022
React Native wrapper around Indy SDK Java and Objective-C wrappers.

React Native Indy SDK React Native Indy SDK wrapper. Installation with npm: $ npm install indy-sdk-react-native --save with Yarn: $ yarn add indy-sdk-

Hyperledger 21 Dec 5, 2022
Java wrapper for Agones client SDK.

agones4j How to Use (Developers) Code final class Server { public static void main( final String[] args ) { final var sdk = new tr.com.in

Infumia LTD 6 Dec 15, 2022
Spring boot microservice example with Eureka Server + Eureka Client + Spring Cloud API Gateway + OAuth2.0 + Circuit Breaker + Resilience4J + FeignClient + RestTemplate

Spring boot microservice example Spring boot microservice example with Eureka Server + Eureka Client + Spring Cloud API Gateway + OAuth2.0 + Circuit B

Subhash Lamba 47 Dec 29, 2022
Sample Spring-Cloud-Api-Gateway Project of Spring Boot

Sample-Spring-Cloud-Api-Gateway Sample Spring-Cloud-Api-Gateway Project of Spring Boot Proejct Stack Spring Webflux Spring Cloud Gateway Spring Data R

Seokhyun 2 Jan 17, 2022
Lottie wrapper for React Native.

Lottie for React Native, iOS, and Android Lottie component for React Native (iOS and Android) Lottie is a mobile library for Android and iOS that pars

Lottie - React Native 15.6k Jan 7, 2023
The ANT HAL Service functions as a JNI wrapper for the ANT HAL.

Android ANT HAL Service v.4.0.0 - 25 Aug 2014 The ANT HAL Service functions as a JNI wrapper for the ANT HAL. The ANT Hal Service provides the messagi

Project Kaleidoscope 0 Jun 11, 2022
React wrapper for android and ios

Deepvue Aadhaar Offline e-KYC React Native SDK This is a wrapper over Android and iOS SDK for react native. Aadhaar Paperless Offline eKYC is a secure

null 2 May 10, 2022
Inspired by Freedom Wrapper, re-imagined with Tor

Inspired by The Freedom Wrapper The Freedom Wrapper Project is an Open Source and Free Android source code project. The project has moved to an organi

Hunter Burningham 4 Jun 29, 2022
☁ Tencent Cloud IM Server SDK in Java | 腾讯云 IM 服务端 SDK Java 版

Tencent Cloud IM Server SDK in Java The Tencent Cloud IM Server SDK for Java enables Java developers to easily work with Tencent Cloud IM. Requirement

Doocs 64 Dec 23, 2022
ActiveJ is an alternative Java platform built from the ground up. ActiveJ redefines web, high load, and cloud programming in Java, featuring ultimate performance and scalability!

Introduction ActiveJ is a full-featured modern Java platform, created from the ground up as an alternative to Spring/Micronauts/Netty/Jetty. It is des

ActiveJ LLC 579 Jan 7, 2023
Alibaba Cloud Dedicated KMS Transfer SDK for Java can help Java developers to migrate from the KMS keys to the Dedicated KMS keys.

Alibaba Cloud Dedicated KMS Transfer SDK for Java Alibaba Cloud Dedicated KMS Transfer SDK for Java can help Java developers to migrate from the KMS k

Alibaba Cloud 3 May 12, 2022