Request Header:
- ExorLive-Client: MyClientName
Get all tags for all plan templates available for the current user.
version | Should be 4 |
Return value | An json list with tag objects. |
Http method |
GET |
Url |
api4/client/plantemplate/getalltags/{version} |
Signature |
HttpResponseMessage GetAllTags(string version) |
Get all plan templates or a subset of plan templates that matches the query.
The query is free text search and will search both tags and title of the template.
version | Should be 4 |
query | Optional text to search for. |
Return value | A list of plan templates |
Http method |
GET |
Url |
api4/client/plantemplate/getplantemplates/{version} |
Signature |
HttpResponseMessage GetPlanTemplates(string version, [FromUri] string query="") { |
Get all plan templates or a subset of plan templates that matches the given tags.
version | Should be 4 |
tagquery | One or more tags separated by space |
Return value | A list of plan templates |
Http method |
GET |
Url |
api4/client/plantemplate/getplantemplatesbytag/{version} |
Signature |
HttpResponseMessage GetPlanTemplatesByTag(string version, [FromUri] string[] tags) { |
Apply a plan template to a given user based on a selected pattern.
{
"UserId":1115968,
"PlanTemplateId":"1234",
"AppyToStartDate":"2018-05-14",
"DistributionType":"AsIs",
"RepeatNum":1,
"WeekPattern":null,
"Explicit":null
}
version | Should be 4 |
input | Details about what Plan Template to distribute to whom and in what pattern. |
Return value | Nothing. |
Http method |
POST |
Url |
api4/client/plantemplate/apply/{version} |
Signature |
HttpResponseMessage Apply(string version, PlanTemplateApplyInput input) |
Name | Type | Description |
---|---|---|
PlanTemplateId
|
int
|
|
UserId
|
int
|
|
AppyToStartDate
|
DateTime
|
|
DistributionType
|
string
|
"AsIs": distribute the activities exactly as they are in the plan template, relative to the start date. "WeekPattern": distribute the activities on the weekdays specified in the pattern. Optionally specify the time of day for each day. "Explicit": You have full control. Specify the date and time for each activity. |
RepeatNum
|
int
|
How many times to repeat the plan, if weekPattern is used. |
WeekPattern
|
TimePattern
|
[Optional] If DistributionType is "WeekPattern", specify the details here. Sample input"WeekPattern": |
Explicit
|
ExplicitPattern
|
[Optional] If DistributionType is "Explicit", specify the details here. Sample input"Explicit": |
Name | Type | Description |
---|---|---|
Id
|
int
|
|
Guid
|
string
|
00000000-0000-0000-0000-000000000000 |
Title
|
string
|
|
Description
|
string
|
|
RelativeStartDate
|
int
|
|
Time
|
string
|
|
DurationMs
|
int
|
Convert to a readable value i.e. hours, minutes, seconds when displayed. |
Intensity
|
int
|
Default is 60. Low: 0-24. Medium: 25-74. High: 75-100. |
WorkoutId
|
int
|
Id=0 means that this is a free session. |
FreeSessionId
|
int
|
|
ImageId
|
int
|
The ID may be a positive or negative number. To get a URL for this image use: /media_{ID}@{WIDTH}.{HEIGHT}.media (The image is scaled to fit within the given rectangle). Example: https://exorlive.com/media_283@100.100.media A value of 0 means no image. |
Level
|
decimal
|
Easy: 1-2 Medium: 3-4 Hard: 5-6 This is a decimal because it is the average of the level of the individual exercises in the activity. |
Name | Type | Description |
---|---|---|
Id
|
int
|
|
Guid
|
string
|
00000000-0000-0000-0000-000000000000 |
Title
|
string
|
|
Description
|
string
|
|
ImageId
|
int
|
The ID may be a positive or negative number. To get a URL for this image use: /media_{ID}@{WIDTH}.{HEIGHT}.media (The image is scaled to fit within the given rectangle). Example: https://exorlive.com/media_283@100.100.media A value of 0 means no image. |
Culture
|
string
|
E.g: en-US, da-DK, nb-NO, sv-SE |
Weeks
|
int
|
|
Sessions
|
int
|
|
Days
|
int
|
|
TagList
|
List<string>
|
|
Level
|
double
|
Easy: 1-2 Medium: 3-4 Hard: 5-6 This is a decimal because it is the average of the level of the individual exercises in the plan. |
Activities
|
List<PlanActivity>
|
|