- METHOD:
GET - id - unique identifier for this meditation
- id
- title
- audio_url
- narrator - "male" or "female"
- musics - an array of possible
musicobjects for this meditation:- title
- credit - the musician's name
- url - audio file for the music track
- frames - an array of
frameobjects, which represent still images or video files that make up the meditation:- id
- seconds - the number of seconds into the meditation when this frame should be shown
- type - "video" or "image"
- frame - url for the video or image file
- METHOD:
GET - external_id - the user identifier used in the We Meditate app or other client application. The server has it's own internal user ID, which you don't need to worry about.
- time - an encoded datetime string with timezone information. This should be the local time of the user, this is used to determine what meditations to return.
If any section has disabled=true then it should appear greyed out, and not be selectable.
- An array of sections, each section is a hash with the following structure
- header
- type -
featured,action, orlist - disabled -
trueorfalse - cards - an array of `card`` objects:
- title
- subtitle
- image_url
- link_type -
apporweb - link - Will be an http url if
link_type=webor a page name iflink_type=app - meditation_id (optional) - the meditation id if
link=PlayerPage - duration (optional) - the meditation duration in minutes if
link=PlayerPage - countdown (optional) - a UTC time. This is used when the card is linking to an event which either starts or ends at the countdown time.
- METHOD:
POST - external_id - the user identifier used in the We Meditate app or other client application. The server has it's own internal user ID, which you don't need to worry about.
- events - an array of
eventobjects:- type - one of
save,unsave,meditation,seen,unlock,path- A
saveorunsaveevent will add/remove a meditation from the user's list of saved meditations. This list is displayed at the bottom of their homepage feed. - A
meditationevent tracks when a user watches a meditation. If possible you should also provide theprogressandratingto give us more information that recommendations could be based on in the future. - A
seenevent lets us know what parts of the app the user has already seen, you should provide theflagfield to tell us which part to mark as "seen" - An
unlockevent tells the server to unlock a new category of meditations for the user. Most important for the moment is that after the user watches the "First Meditation" you must unlock therealisationflag to enable all other meditations. - A
pathevent tracks progress on the path. This helps us know whether to tell the user to "start" or "continue" on the path. It also can be used to suggest silent meditations or in-person meditations when they are further on the path. - There is no way to "unsee" or "lock" things which have been "seen" or "unlocked"
- A
- meditation_id - required if type=
save,unsave, ormeditation - flag - which flag to set
- if type=
seen, this should be one ofrealisation,path,music,introspect,map - if type=
unlock, this should be one ofrealisation,footsoak,lectures
- if type=
- progress
- if type=
meditation, an integer from 0 - 100, indicating what percentage of the meditation was watched - if type=
path, the number of path modules that the user has completed
- if type=
- rating - if type=
meditation
- type - one of
- status - an http status code
- message - details about any error
- data - user data:
- external_id
- seen - flags of things the user has seen
- unlocked - flags of things the user has unlocked
- path_progress - current path progress level
- path_progressed_at - the last time the user progressed on the path
Here is the current logic for what appears on the homepage feed. There will always be a single "Featured" section, 1 or more "Action" sections, and 1 or more "Category" sections.
- The first meditation if that has not already been completed. If this is chosen, then all other sections will be marked as disabled and there will be no other feature sections.
- Live meditation if a live meditation is starting in the next hour. The tailored meditation will also be shown below.
- Tailored meditation based on the time of day.
- Start Path if the path has not been started
- Continue Path if the user has started the path, but not progressed in 3+ days.
- Music page if the user has completed 10 - 19 path lessons.
- Atlas page (on wemeditate.com for now) if the user has completed 20+ path lessons.
- Quick meditations a random set of meditations which are in the 5 - 10 minute window. Shown on weekday mornings only.
- Meditations for morning/afternoon/evening 3 random meditations related to the time day (not shown on weekday mornings)
- Recommended meditations (currently disabled) if the database has tracked 20+ meditation views for the user.
- Music-focused meditations if it is a weekend (music-focused meditations can also appear in other categories)