This route allows Retrieving zikrs, Adding, Editing, or Deleting.
api.athkarok.tech/v1/zikr/?group_id={}
GET
Group ID Keys :
Sabah: 1,
Masaa: 2,
Noom: 3,
Estekaz: 4,
Massjed: 5,
Slaah: 6,
Specify a particular group to retrieve a list of all the zikrs from.
code : 200
{
"zikrs":
[
{
"id": 1,
"group_id": 1,
"text": "بسمِ اللهِ الذي لا يضرُّ مع اسمِه شيءٌ في الأرضِ ولا في السماءِ وهو السميعُ العليمُ.",
"dalel": "ما من عبدٍ يقولُ في صباحِ كلِّ يومٍ ومساءِ كلِّ ليلةٍ بسمِ اللهِ الذي لا يضرُّ مع اسمِه شيءٌ في الأرضِ ولا في السماءِ وهو السميعُ العليمُ ثلاثَ مراتٍ فيضرُّه شيٌء <br> الراوي : عثمان بن عفان | المحدث : الألباني | المصدر : صحيح ابن ماجه | الصفحة أو الرقم : 3134 | خلاصة حكم المحدث : صحيح | انظر شرح الحديث رقم 36007",
"dalel_link": "https://dorar.net/h/3328f09a7cab765ca29211488aa9d4a6",
"repeat_times": 3,
"weak": 0
},
]
}
The next routes enforce having an ADMIN
role to access.
We can check that from a valid token provided in the header.
If a normal user tried to access them, will get the following response.
code : 403
{
"error": "NOT ALLOWED TO ACCESS THIS RESOURCE."
}
api.athkarok.tech/v1/zikr
POST
{
"group_id": "Number must be a valid group id.",
"text": "String contains zikr text.",
"repeat_times": "Number",
"dalel": "String contains zikr dalel.",
"dalel_link": "String contains zikr dalel link",
"weak": "0 or 1 : for false and true"
}
ex:
{
"group_id": 1,
"text": "zikr text.",
"repeat_times": 3,
"dalel": "zikr dalel.",
"dalel_link": "zikr dalel link.",
"weak": 0
}
code : 200
{
"success": "Zikr added successfully."
}
In case of any missing of required data fields, and If any invalid input was provided, the error will show where exactly.
code : 400
{
"error": "Missing Or Invaild Input."
}
To edit the entire data about a specific zikr.
Must provide zikr id with the data fields.
api.athkarok.tech/v1/zikr
PUT
{
"id": 1,
"group_id": 5,
"text": "new zikr text.",
"repeat_times": 3,
"dalel": "new zikr dalel.",
"dalel_link": "new zikr dalel link.",
"weak": 0
}
To edit some data about a specific zikr.
Must provide zikr id and the fields you want to edit.
api.athkarok.tech/v1/zikr
PATCH
{
"id": 1,
"text": "new zikr text."
}
code : 200
{
"message": "zikr updated."
}
In case of any missing of required data fields, and If any invalid input was provided, the error will show where exactly.
code : 400
{
"error": "Missing Or Invaild Input."
}
Provide zikr id to delete.
{
"id": 1
}
code : 200
{
"message": "zikr removed."
}
In case of missing or invalid zikr id, the error will show it.
code : 400
{
"error": "Invaild Input."
}