{"id":22120530,"url":"https://github.com/islamic-network/alquran-apidotnet-client","last_synced_at":"2025-07-25T12:33:45.036Z","repository":{"id":41102973,"uuid":"501400153","full_name":"islamic-network/alquran-apidotnet-client","owner":"islamic-network","description":"An AlQuran DotNet API Client","archived":false,"fork":false,"pushed_at":"2022-06-28T13:46:47.000Z","size":56,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-04-29T21:55:24.304Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/alquran/","language":"C#","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/islamic-network.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-08T20:25:12.000Z","updated_at":"2023-04-27T16:02:03.000Z","dependencies_parsed_at":"2022-09-09T05:40:12.567Z","dependency_job_id":null,"html_url":"https://github.com/islamic-network/alquran-apidotnet-client","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/islamic-network%2Falquran-apidotnet-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/islamic-network%2Falquran-apidotnet-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/islamic-network%2Falquran-apidotnet-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/islamic-network%2Falquran-apidotnet-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/islamic-network","download_url":"https://codeload.github.com/islamic-network/alquran-apidotnet-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227576615,"owners_count":17788546,"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":[],"created_at":"2024-12-01T14:27:21.069Z","updated_at":"2024-12-01T14:27:21.868Z","avatar_url":"https://github.com/islamic-network.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"* بِسْمِ اللَّـهِ الرَّحْمَـٰنِ الرَّحِيمِ\n* Contents :TOC_3:\n\n  - [[#alquran][Alquran]]\n  - [[#demo][Demo]]\n  - [[#usage][Usage]]\n    - [[#edition][~Edition~]]\n    - [[#quran][~Quran~]]\n    - [[#juz][~Juz~]]\n    - [[#surah][~Surah~]]\n    - [[#ayah][~Ayah~]]\n    - [[#search][~Search~]]\n    - [[#manzil][~Manzil~]]\n    - [[#ruku][~Ruku~]]\n    - [[#page][~Page~]]\n    - [[#hizb][~Hizb~]]\n    - [[#sajda][~Sajda~]]\n  - [[#improve-documentation][Improve Documentation]]\n  - [[#refactor-classes-to-be-non-static-to-facilitate-net-management][Refactor Classes to Be non-static, to facilitate .NET management]]\n  - [[#add-unit-testing-class][Add Unit Testing Class]]\n  - [[#note-about-meta][Note About ~Meta~]]\n\n** Alquran\n.NET lightweight Quran library using the alquran.cloud v1 APIs.\n- Dependencies:\n  - [[https://www.nuget.org/packages/RestSharp/][RestSharp]] (\u003e= 107.3.0)\n  - [[https://www.nuget.org/packages/RestSharp.Serializers.NewtonsoftJson/][RestSharp.Serializers.NewtonsoftJson]] (\u003e= 107.3.0)\nThis release was built using .NET 6\n** Demo\n#+begin_src csharp\nusing alquran;\nvar e1 = AlQuranV1.Quran(); //getting all of Quran\nvar e2 = AlQuranV1.Quran(\"en.asad \"); //getting Muhammad Asad's edition of the Holy Quran\nvar e3 = AlQuranV1.Quran(\"ar.alafasy \"); // getting Mishary Alafasy's recitation of the Quran\n#+end_src\n** Usage\n*** ~Edition~\nAll calls of this methods give you an IEnumerable object of editions describing the filte\neditions. From this object, you need to use the identifier to get data from other endpoints\nin this API. For any of the endpoints that require an edition identifier, if you do not\nspecify one, 'quran-uthmani' is used and returns the Arabic text of the Holy Quran.\n#+begin_src csharp\nIEnumerable\u003cEdition\u003e? Editions(string format, string lang, string type)\n#+end_src\n\n**** Parameters\n+ ~format~: specify a format. 'text' or 'audio.\n+ ~lang~:  a 2 digit language code. Example: 'en', 'fr', etc.\n+ ~type~: a valid type. Example - 'versebyverse', 'translation' etc.\n**** Cases\nLists all editions for a given language:\n#+begin_src csharp\nIEnumerable\u003cEdition\u003e? Editions(string lang)\n#+end_src\nLists all editions for a given format:\n#+begin_src csharp\nIEnumerable\u003cEdition\u003e? Editions(string format)\n#+end_src\nLists all editions for a given type:\n#+begin_src csharp\nIEnumerable\u003cEdition\u003e? Editions(string type)\n#+end_src\n**** Required Parameters\nNone\n**** Default Values\nReturns a list of all available editions\n**** Example\n#+begin_src csharp\nvar e = AlQuranV1.Editions(\"audio\", \"fr\", \"versebyverse\") // Lists all audio editions in french of the versebyverse type\n#+end_src\n**** Return Type\nThis methods always returns an ~IEnumerable\u003cedition\u003e~\n*** ~Quran~\nReturns a complete Quran edition in the audio or text format\n#+begin_src csharp\nQuran? Quran(string edition)\n#+end_src\n**** Parameters\n+ ~edition~: an edition identifier. Example: en.asad for Muhammad Asad's english translation\n**** Cases\n#+begin_src csharp\nQuran? Quran()\n#+end_src\nReturns the text of the Holy Quran in the quran-uthmani edition.\n#+begin_src csharp\nQuran? Quran(string edition)\n#+end_src\nReturns a complete Quran edition.\n**** Default Values\nReturns the text of the Holy Quran in the quran-uthmani edition.\n**** Required Parameters\nNone\n**** Example\n#+begin_src csharp\nvar e1 = AlQuranV1.Quran(); // Returns Muhammad Asad's translation of the Holy Quran\nvar e2 = AlQuranV1.Quran(\"en.asad \"); // Returns the text of the Holy Quran\nvar e3 = AlQuranV1.Quran(\"ar.alafasy \"); // Returns Mishary Alafasy's recitation of the Quran\n#+end_src\n**** Return Type\nAn object of type ~Quran~\n*** ~Juz~\nThe Quran has 30 Juz. You can get the text for each Juz using the method below.\n#+begin_src csharp\nJuz? Juz(int juz, string edition, int offset, int limit)\n#+end_src\n**** Parameters\n+ ~juz~: number of juz.\n+ ~edition~: an edition identifier. Example: en.asad for Muhammad Asad's english translation.\n+ ~offset~:  offset ayahs in a juz by the given number.\n+ ~limit~: number of ayahs that the response will be limited to.\n\n**** Cases\n#+begin_src csharp\nJuz? Juz(int juz, string edition)\n#+end_src\nReturns an object of ~juz~ from edition ~edition~ of the Holy Quran\n#+begin_src csharp\nJuz? Juz(int juz, string edition, int offset, int limit)\n#+end_src\n**** Required Parameters\n+ ~juz~: number of juz\n**** Example\n#+begin_src csharp\nvar e1 = AlQuranV1.Juz(30, \"en.asad\");\nvar e2 = AlQuranV1.Juz(30, \"quran-uthmani\");\nvar e3 = AlQuranV1.Juz(1, \"quran-uthmani\", 3, 10);\n#+end_src\n**** Return Values\nAn object of type ~Juz~\n*** ~Surah~\nGet a single Surah in one object or in a list with its other ports in other editions of the\nHoly Quran.\n#+begin_src csharp\nobject? Surah(int surah, string edition, int offset, int limit)\n#+end_src\n**** Parameters\n+ ~surah~: number of surah\n+ ~edition~: an edition identifier. Example: en.asad for Muhammad Asad's english translation.\n+ ~offset~:  offset ayahs in a juz by the given number.\n+ ~limit~: number of ayahs that the response will be limited to.\n\n**** Cases\n#+begin_src csharp\nobject? Surah(int surah , string edition , int offset , int limit )\n#+end_src\n\nReturns an object (castable to ~Surah~ object) of the Surah with number ~surah~, edition\n~edition~ and offset ~offset~ to the limit ~limit~.\n\n#+begin_src csharp\nobject? Surah(int surah)\n#+end_src\n\nReturns an object (castable to ~Surah~ object) of Surah with number ~surah~ and edition\n~quran-simple~. It will return an object castable to ~IEnumerable\u003cSurah\u003e~ if ~edition~ is\nmore than 1 edition.\n\n#+begin_src csharp\nobject? Surah()\n#+end_src\n\nReturns an object (castable to ~IEnumerable\u003cSurah\u003e~ object) of all Surahs of the holy Quran\n\n**** Default Value\nReturns an object (castable to ~IEnumerable\u003cSurah\u003e~ object) of all Surahs of the holy Quran\n\n**** Required Parameters\nNone\n\n**** Example\n#+begin_src csharp\nvar e1 = AlQuranV1.Surah() as IEnumerable\u003cSurah\u003e; // all Surahs of Quran\nvar e2 = AlQuranV1.Surah(114, \"ar.alafasy\") as Surah; // Returns Mishary Alafasy's recitation of Surat An-Naas\nvar e3 = AlQuranV1.Surah(3, offset: 4, limit: 7) as Surah; // - Returns verses 2-4 of Surah Al-Fatiha\nvar e4 = AlQuranV1.Surah(114, \"quran-uthmani,en.asad,en.pickthall\") as IEnumerable\u003cSurah\u003e; //  Returns Surat An-Naas from 3 editions: Simple Quran, Muhammad Asad and Marmaduke Pickthall\n#+end_src\n**** Return Value\n~object?~\n\n**** Note\nSince the ~Surah~ API may return a single Surah, as in example ~e2~ as well it might\nreturns a list of Surahs, as in examples e1, e4, it return an object type which can be\nsafely casted to whichever type.\n\n*** ~Ayah~\nGet a single Ayah in one object or in a list with its other ports in other editions of the\nHoly Quran.\n#+begin_src csharp\nobject? Ayah(int ayah, string edition = \"\")\nobject? Ayah(int surah, int ayah, string edition = \"\")\n#+end_src\n**** Parameters\n+ ~ayah~: number of ayah\n+ ~surah~: number of surah\n+ ~edition~: an edition identifier. Example: en.asad for Muhammad Asad's english translation.\n+ ~offset~:  offset ayahs in a juz by the given number.\n+ ~limit~: number of ayahs that the response will be limited to.\n\n**** Cases\n#+begin_src csharp\nAyah(int ayah, string edition = \"\")\n#+end_src\n\nReturns an object (castable to ~Ayah~ object) of the Ayah with number ~ayah~, edition\n~edition~.\n\n#+begin_src csharp\nAyah(int ayah)\n#+end_src\n\nReturns an object (castable to ~ayah~ object) of ayah with number ~ayah~ and edition ~quran-simple~\n\n#+begin_src csharp\nobject? Ayah(int surah, int ayah, string edition = \"\")\n#+end_src\n\nReturns an object (castable to ~IEnumerable\u003cSurah\u003e~ object) of all Surahs of the holy Quran\n**** Required Parameters\n+ ~ayah~: number of ayah\n+ ~surah~: number of surah\n**** Example\n#+begin_src csharp\nvar e1 = AlQuranV1.Ayah(262) as Ayah; // Returns Muhammad Asad's translation Ayat Al Kursi\nvar e2 = AlQuranV1.Ayah(2, 255) as Ayah; // Returns Muhammad Asad's translation Ayat Al Kursi\nvar e3 = AlQuranV1.Ayah(262, \"ar.alafasy\") as Ayah; // Returns Mishary Alafasy's recitation of the Ayat Al Kursi\nvar e4 = AlQuranV1.Ayah(262, \"quran-uthmani,en.asad,en.pickthall\") as IEnumerable\u003cAyah\u003e; // Returns Ayat Al Kursi from 3 editions: Simple Quran, Muhammad Asad and Maramduke Pickthall\n#+end_src\n**** Return Value\n~object?~\n**** Note\nSince the ~ayah~ API may return a single Surah, as in example ~e2~ as well it might\nreturns a list of Ayahs, as in examples e1, e4, it return an object type which can be\nsafely casted to whichever type.\n*** ~Search~\nSearch the Holy Quran. Please note that only text editions of the Quran are searchable.\n#+begin_src csharp\nSearchResult? Search(string keyword, string editionOrLanguage, int surah)\n#+end_src\n**** Parameters\n+ ~keyword~ the keyword to seach for\n+ ~surah~ number of surah\n+ ~editionOrLanguage~ an edition identifier. Example: en.asad for Muhammad Asad's english translation. or an language identifier. Example: en for english, ar for Arabic\n\n**** Cases\n#+begin_src csharp\nSearchResult? Search(string keyword, string editionOrLanguage, int surah)\n#+end_src\nReturns and object of ~SearchResult~ with results of searching in edition[or, editions of\nthe language] ~editionOrLanguage~, only in Surah with number ~surah~\n\n#+begin_src csharp\nSearchResult? Search(string keyword, string editionOrLanguage)\n#+end_src\nReturns and object of ~SearchResult~ with results of searching in edition[or, editions of\nthe language] ~editionOrLanguage~\n\n**** Required Parameters\n+ ~keyword~: the keyword to seach for\n+ ~editionOrLanguage~: an edition identifier. Example: en.asad for Muhammad Asad's english translation. or an language identifier. Example: en for english, ar for Arabic\n\n**** Example\n#+begin_src csharp\nvar e1 = AlQuranV1.Search(\"Abraham\", \"en\"); //  Returns all ayahs that contain the word 'Abraham' in all the english editions\nvar e2 = AlQuranV1.Search(\"Abraham\", \"en.pickthall\"); // Returns all ayahs that contain the word 'Abraham' in Maramduke Pickthall's English translation\nvar e3 = AlQuranV1.Search(\"Abraham\", \"en.pickthall\", 37); // Returns all ayahs that contain the word 'Abraham' Surat As-Saafaat in Maramduke Pickthall's English translation\n#+end_src\n\n**** Return Value\n~SearchResult?~\n\n*** ~Manzil~\nThe Quran has 7 Manzils (for those who want to read / recite it over one week). You can get\nthe text for each Manzil using this method.\n#+begin_src csharp\nManzil? Manzil(int manzil, string edition, int offset = -99, int limit = -99)\n#+end_src\n**** Parameters\n+ ~manzil~: number of manzil.\n+ ~edition~: an edition identifier. Example: en.asad for Muhammad Asad's english translation.\n+ ~offset~:  offset ayahs in a juz by the given number.\n+ ~limit~: number of ayahs that the response will be limited to.\n**** Cases\n#+begin_src csharp\nManzil? Manzil(int manzil, string edition)\n#+end_src\nReturns an object of ~manzil~ from edition ~edition~ of the Holy Quran\n#+begin_src csharp\nManzil? Manzil(int manzil, string edition, int offset, int limit)\n#+end_src\n**** Required Parameters\n+ ~manzil~: number of manzil\n**** Example\n#+begin_src csharp\nvar e1 = AlQuranV1.Manzil(7, \"en.asad \"); // Returns manzil 7 from Muhammad Asad's translation of the Holy Quran\nvar e2 = AlQuranV1.Manzil(7, \"quran-uthmani\"); // Returns the text of Manzil 7 of the Holy Quran\nvar e3 = AlQuranV1.Manzil(7, \"quran-uthmani\", 3, 10); // Returns the the ayahs 4-13 from Manzil 7\n#+end_src\n**** Return Values\nAn object of type ~manzil~\n*** ~Ruku~\nThe Quran has 556 Rukus. You can get the text for each Ruku using the method below.\n#+begin_src csharp\nRuku? Ruku(int ruku, string edition, int offset = -99, int limit = -99)\n#+end_src\n**** Parameters\n+ ~ruku~: number of ruku.\n+ ~edition~: an edition identifier. Example: en.asad for Muhammad Asad's english translation.\n+ ~offset~:  offset ayahs in a juz by the given number.\n+ ~limit~: number of ayahs that the response will be limited to.\n**** Cases\n#+begin_src csharp\nRuku? Ruku(int ruku, string edition)\n#+end_src\nReturns an object of ~Ruku~ from edition ~edition~ of the Holy Quran\n#+begin_src csharp\nRuku? Ruku(int manzil, string edition, int offset, int limit)\n#+end_src\n**** Required Parameters\n+ ~ruku~: number of manzil\n**** Example\n#+begin_src csharp\nvar e1 = AlQuranV1.Ruku(7, \"en.asad\"); // Returns ruku 7 from Muhammad Asad's translation of the Holy Quran\nvar e2 = AlQuranV1.Ruku(7, \"quran-uthmani\"); // Returns the text of ruku 7 of the Holy Quran\nvar e3 = AlQuranV1.Ruku(7, \"quran-uthmani\", 3, 3); // Returns the the ayahs 4-6 from ruku 7\n#+end_src\n**** Return Values\nAn object of type ~Ruku~\n\n*** ~Page~\nThe Quran is traditionally printed / written on 604 pages. You can get the text for each\npage using the method below.\n#+begin_src csharp\nPage? Page(int page, string edition, int offset = -99, int limit = -99)\n#+end_src\n**** Parameters\n+ ~page~: number of page.\n+ ~edition~: an edition identifier. Example: en.asad for Muhammad Asad's english translation.\n+ ~offset~:  offset ayahs in a juz by the given number.\n+ ~limit~: number of ayahs that the response will be limited to.\n**** Cases\n#+begin_src csharp\nPage? Page(int page, string edition)\n#+end_src\nReturns an object of ~Page~ from edition ~edition~ of the Holy Quran\n#+begin_src csharp\nPage? Page(int page, string edition, int offset, int limit)\n#+end_src\n\n**** Required Parameters\n+ ~page~: number of page\n**** Example\n#+begin_src csharp\nvar e1 = AlQuranV1.Page(1, \"en.asad \"); // Returns page 1 from Muhammad Asad's translation of the Holy Quran\nvar e2 = AlQuranV1.Page(1, \"quran-uthmani\"); // Returns the text of page 1 of the Holy Quran\nvar e3 = AlQuranV1.Page(1, \"quran-uthmani\", 2, 2); // Returns the the ayahs 3-4 from page 1\n#+end_src\n**** Return Values\nAn object of type ~Page~\n\n\n\n*** ~Hizb~\nThe Quran comprises 240 Hizb Quarters. One Hizb is half a Juz.\n#+begin_src csharp\nHizb? Hizb(int hizb, string edition, int offset = -99, int limit = -99)\n#+end_src\n**** Parameters\n+ ~hizb~: number of hizb.\n+ ~edition~: an edition identifier. Example: en.asad for Muhammad Asad's english translation.\n+ ~offset~:  offset ayahs in a juz by the given number.\n+ ~limit~: number of ayahs that the response will be limited to.\n**** Cases\n#+begin_src csharp\nHizb? Hizb(int hizb, string edition)\n#+end_src\nReturns an object of ~Hizb~ from edition ~edition~ of the Holy Quran\n#+begin_src csharp\nHizb? Ruku(int hizv, string edition, int offset, int limit)\n#+end_src\n\n**** Required Parameters\n+ ~hizb~: number of hizb\n**** Example\n#+begin_src csharp\nvar e1 = AlQuranV1.Hizb(7, \"en.asad \"); // Returns hizb quarter 1 from Muhammad Asad's translation of the Holy Quran\nvar e2 = AlQuranV1.Hizb(7, \"quran-uthmani\"); // Returns the text of hizb quarater 1 of the Holy Quran\nvar e3 = AlQuranV1.Hizb(7, \"quran-uthmani\", 2, 2); // Returns the the ayahs 3-4 from hizb Quarter 1\n#+end_src\n**** Return Values\nAn object of type ~Hizb~\n\n*** ~Sajda~\nDepending on the madhab, there can be 14, 15 or 16 sajdas. This API has 15.\n#+begin_src csharp\n(IEnumerable\u003cAyah\u003e, Edition) Sajda(string edition)\n#+end_src\n**** Parameters\n+ ~edition~: an edition identifier. Example: en.asad for Muhammad Asad's english translation.\n**** Cases\n#+begin_src csharp\n(IEnumerable\u003cAyah\u003e, Edition) Sajda(string edition)\n#+end_src\nReturns a tuple of ~IEnumerable\u003cAyah\u003e~ and ~Edition~ contains Sajdas of the edition and\nmetadata about the edition, respectively.\n#+begin_src csharp\n(IEnumerable\u003cAyah\u003e, Edition) Sajda()\n#+end_src\nReturns a tuple of ~IEnumerable\u003cAyah\u003e~ and ~Edition~ contains Sajdas of the edition and\nmetadata about the quran-simple edition.\n**** Required Parameters\nNone.\n**** Example\n#+begin_src csharp\nvar e1 = AlQuranV1.Sajda(\"en.asad \"); // Returns the text of sajda ayahs of the Holy Quran\n#+end_src\n**** Return Values\nAn object of type ~(IEnumerable\u003cAyah\u003e, Edition)~\n\n** TODO Improve Documentation\n** TODO Refactor Classes to Be non-static, to facilitate .NET management\n** TODO Add Unit Testing Class\n** Note About ~Meta~\nI did not implement an interface for the meta API (~http://api.alquran.cloud/v1/meta~), and\nI'm not sure of adding 'yet', because of: 1. It seems useless since all the metadata can be\nconcatenated throw the AlquranV1 methods, using an extention method for example. 2. It is\ntoo complex type to bind.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fislamic-network%2Falquran-apidotnet-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fislamic-network%2Falquran-apidotnet-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fislamic-network%2Falquran-apidotnet-client/lists"}