[Gametize Tech] API: Project Validation and Search
FeaturedGeneral Note
For API 1.0, project validation end-point works differently from the end-point in API 2.0.
-
In API 1.0, if a project is private, the end-point will return an error code.
-
In API 2.0, if a project is private, it will return a success with basic project information. This was a request made by the product team to facilitate simple information viewing to user and inform them that this project is available but is private (Previously, a non-authorised page may be displayed and it confused some users).
GET /api2/projects/[ID/Alias]/validate.json
Validate project ID or alias in the platform.
Inputs:
-
[ID/Alias]
(Required) -
session_key
(Optional)
GET /api2/packages.json
Retrieve all projects in the platform. It will only return public projects.
Inputs:
-
session_key
(Optional) -
keywords
(Optional)
Implementation Note
In Gametize App 1.0, the search logic makes use of the validation API in tandem of project search API.
Pseudocode
-
User enter search text
-
User triggers search
-
App calls
/api2/projects/[ID/Alias]/validate.json
API -
If project is public
private: false
OR project is private but user has joinedprojectJoined: true
-
Enter project “home” page directly
-
-
Else
-
App calls
/api2/packages.json?keywords=[Search Text]
API -
Return project lists page
-
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