[Gametize Tech] Feature Knowledge: Time Date "Calendar" Meta for Content
FeaturedScopes:
-
Able to tag challenge/information card with the following information/meta:
-
Scenario 1: Date (All day)
-
Scenario 2: Date to Date (All day)
-
Scenario 3: Date and time
-
Scenario 4: Date & time to Date & time
-
Important: to use SQL timestamps as they can be converted to Unix Timestamp using e.g.
UNIX_TIMESTAMP(createdAt)
-
-
Consider pairing table
-
Option 1: id, challengeId, startAt, endAt, etc. → we explicitly name what each time meta column is for and only allow one row per Challenge
-
challengeId
,startTime
,endTime
(Optional)
-
-
Option 2: id, challengeId, timeMeta → reference ID in code to know what it should be used for e.g. calendar meta, start date, end date so there can be multiple rows per Challenge
-
challengeId
,time
,type
(Start time or end time or xxxx)
-
-
-
Able to accommodate timezone (Admin/Player will see the “right” value based on their timezone)
-
From functional perspective:
-
Should not alter the challenge/information card behaviour
-
-
CMS:
-
Simple tagging of the above information
-
-
API:
-
Return the above information if available (i.e. challenge object)
-
Topic challenges API
-
Able to filter by month, year (or combi)
-
Able to define start and end
-
-
Project challenges API
-
Able to filter by month, year (or combi)
-
Able to define start and end
-
-
User bookmarks
-
Able to filter by month, year (or combi)
-
Able to define start and end
-
-
Implementation
API (Challenge Meta Time Object returned if meta time is set for the challenge)
Topic Challenges API
api2/topics/ID/challenges.json
Project Challenges API
api2/projects/ID/challenges.json
Bookmarks API
api2/users/ID/bookmarks.json
Params: project_id (required)
API (Input params added, filter, start and end) Works for all the above APIs
-
Filter =
calendar
will retrieve all challenges with meta time objects-
API will return the usual results if Filter is not included
-
-
Start and End takes in the following date format (yyyy-MM-dd HH:mm:ss)
-
Either one can be included
-
i.e
-
if include
start
only, challenges with meta time object where the start time is >=start
will be returned -
if include
end
only, challenges with meta time object where the start time is <=end
will be returned -
if both is included, challenges with meta time object where start time >=
start
and start time <=end
will be returned.
-
-
-
If start or end is included, filter will be auto set to
calendar
-
Since challenges without meta time object will not be returned anyway.
-
-
Challenge Meta Time Objects will be filtered to return only those within range of the start/end filter.
-
In the case of one challenge having multiple challenge meta time objects
-
-
Note:
The article's technical specifications and details are subject to potential changes based on our discretion. It is important to note that the information presented in the article might have become outdated or lost its relevance in the present context.
If you are interested to learn more about this, please drop an email to support@gametize.com with your queries regarding the article!
Please sign in to leave a comment.
Comments
0 comments