Skip to content

Latest commit

 

History

History
39 lines (32 loc) · 1.18 KB

File metadata and controls

39 lines (32 loc) · 1.18 KB

The Dhikr API

v0

Requirement:

  • Get commons dhikrs
  • Choose a dhikr to practice
  • Set reminder for a dhikr and get notification (local first). eg: you set a reminder for a dhikr to 10pm then each day at this time you get a notification that tell you to do your daily dhikr with dhikr detail.
  • Manage you own dhikrs
    HINT: share dhikrs accros all user. if a dhirk exist do not create it, if a reminder for a zikr is alredy set do ne set if. This will reduce amount of dhikr and reminder in the db as many users may use same dhirk and same reminders.

Basic Models:

Dhikr {
    id: int
    invocation: list<string> (item is a compute of invocation + his repeate_count)  
    subscribers:   list<user>
    benefice?: string
    remind_id?: int
    created_at: DateTime
}

Endpoints:

  • [GET] dhikrs
    Desc : return commons dhikrs with user that have subscribed to that dhikr Response : List<Dhirk>

  • [GET] dhikrs?id=dhikr_id
    Desc : return a dhikr
    Response : Dhirk

  • [POST] dhikrs/subscribe
    Desc : subscribe to practice a dhikr
    Request : {dhikr_id, reminder_at, user_token}

  • [POST] dhikrs/unsubscribe
    Desc : unsubscribe to a dhikr
    Request : {dhikr_id, user_token}