Skip to content

API Documentation

Can edited this page Dec 28, 2023 · 14 revisions

Link to the API : Swagger

This documentation provides an overview of various controllers, including Tag, Review, Group, Forum, Vote, Profile, Post, Image, Game, Comment, Auth, User and Achievement. Each controller serves a specific purpose in managing different aspects and features of our application. This documentation offers insights into how to interact with these controllers effectively. Below documentation explains the functionality of each endpoint to facilitate seamless integration with our application via additionally providing example responses of each endpoint. (Required request body types or request parameters can be examined through Swagger documentation. There are some enum fields which the posible values are listed in endpoint explanations below)

Table of contents

1. API Endpoint Explanations (Use Cases)

User Controller

/get-all (GET)

This endpoint allows any user, including guests, to retrieve a list of all users. Users can apply filters to narrow down the list based on specific criteria. The available filters include username, email, role, and account status (active or inactive). It is useful for users who want to find other users for interaction, like sending friend requests, or for admins who need to manage user accounts.

/delete (DELETE)

This endpoint is designated for removing a user account. It is primarily used by admins to delete accounts that violate terms of service or by users who wish to deactivate their own account. To delete an account, the specific user ID must be provided. This action is irreversible, so it's important that the user confirms their intention before the account is permanently deleted.

/change-role (PUT)

This endpoint is specifically for admins to change the role of a user. Roles include 'BASIC' or 'ADMIN'. This function is crucial for managing user permissions and access within the system. To change a user's role, the admin must provide the user's ID and the new role they should be assigned. This endpoint ensures that only authorized personnel can alter user roles, maintaining the security and integrity of the user management system.

Tag Controller

/create (POST)

Admins can add neccessary tags using this endpoint. The color field need to be in hexadecimal format with "#" in front. The tagType can be one of the following:

ART_STYLE, GENRE, DURATION, OTHER, MONETIZATION, PLATFORM, DEVELOPER, PLAYER_TYPE, POST, PRODUCTION, GROUP

/update (POST)

If there is a need to change something in the tag admins can use this endpoint. The usage is same with create endpoint except admin should add the id of the tag in the id parameter.

/delete (DELETE)

If the admin wants to remove a tag, this endpoint can be utilized. The id of the tag should be given in the id parameter.

/get (GET)

If any user (including guests) wants to get the information about a tag, this endpoint can be used. The id of the tag will be given as parameter.

/get-all (GET)

If any user (including guests) wants to get the information about all tags at the same time, this endpoint can be used. The user can filter using name, color and tagType which should exactly match the tags. If the isDeleted field is set to true, the deleted tags will also be returned.

Review Controller

/create (POST)

All registered users can add their reviews to specific games using this endpoint. Rating field should be a float between 0 and 5, gameId should exactly match the id of the game the user wants to review.

/update (POST)

If any user wants to update their reviews they can use this enpoint. Usage is same but there is no need to give gameId, id of the review should be given as parameter instead.

/delete (DELETE)

If a user wants to remove their review, or an admin finds the review inappropriate, they can use this endpoint to remove the review. The review id should be given as a parameter.

/get (GET)

If any user (including guests) wants to get the information about a review, this endpoint can be used. The id of the review will be given as parameter.

/get-all (GET)

If any user (including guests) wants to get the information about all reviews for a game at the same time, this endpoint can be used. The user can filter using gameId, and reviewer id which should exactly match the review fields. If the withDeleted field is set to true, the deleted reviews will also be returned. The user needs to specify sorting criteria and direction which can be the following:

sortBy: OVERALL_VOTE, CREATION_DATE, VOTE_COUNT

sortDirection: ASCENDING, DESCENDING

Group Controller

/get-all (GET)

This endpoint allows any user, including guests, to view a list of groups. Users can filter groups based on specific criteria like game name, title, or other attributes. For example, a user looking for gaming groups can filter by related tags or group titles. No authentication is required to access this information, making it user-friendly for newcomers exploring the platform.

/get (GET)

Users can access detailed information about a specific group using this endpoint. They just need to provide the group's unique identifier. This feature is particularly useful for users who want to learn more about a group they are interested in joining or following.

/create (POST)

Registered users who want to create a new group can use this endpoint. They need to provide necessary details like group title, description, and membership policy. This feature empowers users to build their own communities within the platform.

/update (PUT)

Group moderators can update group information using this endpoint. This could include changing the group's title, description, or rules. This functionality is essential for maintaining an up-to-date and relevant group space.

/delete (DELETE)

Group moderators can delete their group using this endpoint. This is a critical feature for managing the lifecycle of a group, especially if the group is no longer active or relevant.

/add-tag (POST)

Group moderators can use this endpoint to add specific tags to their group. This could include tags related to the group’s theme, activities, or interests. Tags help in better categorizing the group and making it easier for like-minded users to find it.

/remove-tag (DELETE)

Group moderators can remove tags from their group using this endpoint. This is useful for keeping the group's focus and tags relevant and up-to-date.

/join (POST)

Registered users can join a public group by using this endpoint. This feature facilitates community building by allowing users to become part of groups that interest them.

/leave (POST)

Members of a group can leave the group using this endpoint. This functionality respects user choice, allowing them to exit groups whenever they wish.

/ban-user (PUT)

Group moderators can ban users from their group using this endpoint. This is an important feature for maintaining a healthy and respectful group environment.

/add-moderator (PUT)

Group moderators can appoint moderators to their group using this endpoint. Moderators play a crucial role in overseeing group activities and ensuring that group rules are followed.

/remove-moderator (PUT)

This endpoint allows the removal of a moderator from a group. It is essential for group moderators to manage their team of moderators effectively.

/unban-user (PUT)

Group moderators can unban previously banned users using this endpoint. This feature provides a second chance to users who have improved their behavior.

/apply (POST)

Users can apply to join private groups using this endpoint. This feature is crucial for groups that require screening or approval before adding new members.

/review-application (POST)

Group moderators can review applications from users who wish to join the group. This process helps maintain the quality and relevance of the group's membership.

/get-recommendations (GET)

This endpoint is is used to recommend different groups to users. If user is a guest, he/she will get recommended by most popular groups. If user is a signed in user, he will see recommended groups based on his followed games and groups that he is a member of.

/list-applications (GET)

Group moderators can view a list of all applications to their group using this endpoint. This feature is vital for managing new member applications efficiently.

Forum Controller

/ban-user (PUT)

This endpoint allows moderators to ban a user from a specific forum. To ban a user, an admin must provide the forum's identifier and the user's identifier. The admin must be logged in and authorized to perform this action, which is verified through the Authorization header in the request. This feature is particularly useful in managing community conduct, allowing admins to restrict access to users who violate forum rules or community standards.

/unban-user (PUT)

This endpoint is used by moderators to unban a previously banned user from a forum. Similar to the ban-user endpoint, the admin must supply both the forum's and the user's identifiers. This action requires the admin to be logged in and have appropriate authorization. Unbanning a user is a crucial feature for restoring access to users who have been banned, either mistakenly or after they have complied with community guidelines or served a suspension period.

Vote Controller

/create (POST)

If any registered user wants to give a vote on some post, comment, game or review; they can utilize this endpoint. They can also cancel or change their vote types by sending this request again as they can not vote on the same thing twice. (Downvoting two times will cancel the first downvote, downvoting and upvoting will change the downvote to upvote) They need to specify type of vote, id of the thing that is voted, and the choice of the user which can be the following:

voteType: GAME, COMMENT, REVIEW, POST

choice: DOWNVOTE, UPVOTE

/get (GET)

If any user (including guests) wants to get the information about a vote, this endpoint can be used. The id of the vote will be given as parameter.

/get-all (GET)

If any user (including guests) wants to get the information about all votes at the same time, this endpoint can be used. The user can filter using typeId, choice, votedBy and voteType which should exactly match the vote fields. If the withDeleted field is set to true, the deleted votes will also be returned.

Profile Controller

/get-activities (GET)

Registered users can view their recent activities on the platform using this endpoint. After logging in, a user can access their activity history, such as game reviews, votes or comments they have made. This feature provides a personalized experience, allowing users to easily track and revisit their contributions on the platform.

/get (GET)

This endpoint allows any user, including guests, to view a user's profile if it is set to public. The user's ID is required as a parameter. Only the owner of the profile and admins will have access to a private profile.

/edit (POST)

Registered users can update their profile information using this endpoint. This feature enables users to maintain up-to-date information, such as their name, profile picture, game store profile links and additional preferences. The changes are immediately reflected on the user's profile, ensuring that their public persona on the platform is current and reflects their desired image.

/add-game (POST)

Users can add games to their profile with this endpoint, showcasing their gaming interests and experiences. This function enhances the social aspect of the platform, allowing users to share their gaming preferences and find like-minded individuals or groups. It also assists in personalizing the user experience, as the platform can suggest content based on the games in a user's profile.

/remove-game (POST)

This endpoint allows users to remove games from their profile. It offers flexibility and control to the users over their profile content, ensuring that their interests are accurately represented. Removing a game might be relevant for users who no longer play or associate with that game, helping them keep their profile aligned with their current gaming interests.

Post Controller

/create (POST)

Requires authorization. Allows authenticated users to create a new post by providing the necessary information in the request body.

/get-post-list (GET)

Allows users (including guests) to retrieve a list of posts based on optional filters. Users can provide filter criteria in the request using the request body.

sortBy: OVERALL_VOTE, CREATION_DATE, VOTE_COUNT

sortDirection: ASCENDING, DESCENDING

/get-post-detail (GET)

Allows users (including guests) to retrieve detailed information about a post by providing its id.

/get-post-comments (GET)

Requires authorization. Allows authenticated users to retrieve comments for a specific post by providing its id.

/edit (POST)

Requires authorization. Allows authenticated users to edit an existing post by providing its id and the updated information in the request body.

/delete (DELETE)

Requires authorization. Allows authenticated users to delete a post by providing its id.

Image Controller

/api/{folder}/{fileName:.+} (GET)

Deprecated, don't use.

/api/image/upload (POST)

Enables users to upload an image to the server by providing the folder as a request parameter and the image file as a multipart file in the request body. (should be in binary) Returns a string containing the path where the uploaded image is stored, formatted as "folder/fileName".

Game Controller

/update (PUT)

Allows user to edit (update) fields of games such as name, icon, etc.

/promote (POST)

This endpoint is used to promote/unpromote games. When this endpoint is called with the desired gameId, it will toggle the promotion field of the game which is a boolean (isPromoted). So basically one can call this endpoint in order to change the promotion status of the game.

/get-game-list (POST)

Deprecated don't use.

/get-game-list (GET)

Enables users (including guests) to get a list of games based on specific filter criteria. Users can provide filter parameters in the parameter object.

/game-by-name (GET)

Allows users to retrieve detailed information about a game by providing its name.

/add-tag (POST)

Requires authorization and admin privileges. Allows admins to add tags to a game.

/get-recommendations (GET)

This endpoint returns the recommended games. Game recommendation logic is mainly works around similarity score among games. For each game that user follows, some similarity score is generated (using tags of the games) between that game and all other games that user does not follow and this endpoint returns the most similar (highest similarity score) games based on user's followed games. (Genre and production tags have higher effects on similarity score.)

/remove-tag (DELETE)

Requires authorization and admin privileges. Enables admins to remove tags from a game.

/get-all-tags (GET)

Allows users (including guests) to retrieve all tags associated with a specific game. Users need to provide the gameId as a query parameter.

/get-game (GET)

Allows users (including guests) to retrieve detailed information about a game by providing its gameId as a query parameter.

/create (POST)

Requires authorization. Allows admins to create a new game by providing the necessary information in the request body. gameIcon should be the path of image in the server.

/delete (DELETE)

Allows user to delete (softly) games.

Comment Controller

/create (POST)

This endpoint allows registered and authenticated users to add comments to posts. When creating a comment, users need to provide the content of their comment and the ID of the post they are commenting on. This feature enhances user interaction and discussion on the platform.

/reply (POST)

Users who are registered and logged in can use this endpoint to reply to existing comments. To reply, users must provide the content of their reply and the ID of the comment they are responding to. This facilitates threaded conversations, allowing users to engage directly with each other's comments.

/edit (POST)

Registered users who wish to modify their existing comments can use this endpoint. To edit a comment, users need to provide the new content for their comment and the ID of the comment they want to edit. This feature gives users flexibility and control over their contributions, ensuring they can update or correct their comments as needed.

/delete (DELETE)

This endpoint allows users to delete their comments. To delete a comment, the user must be registered, logged in, and provide the ID of the comment they wish to remove. This feature is essential for users who want to manage their digital footprint or retract comments they no longer wish to share.

Auth Controller

/register (POST)

This endpoint allows users to create a new account. When making a registration request, users should provide their desired username, password, and email. The password must be at least 6 characters long and meet specific criteria, including the inclusion of at least one uppercase letter, one lowercase letter, and one digit. The provided email should be in a valid email format.

/change-password (POST)

Users can utilize this endpoint to change their account password. To do so, they need to provide their current password and the new password they wish to set. The new password must meet certain criteria, including being at least 6 characters long and containing at least one uppercase letter, one lowercase letter, and one digit.

/change-forgot-password (POST)

This endpoint is used by authenticated users who want to change their password using a reset code sent to their email. To change the password, users need to provide the new password they wish to set. The new password must meet specific criteria, including being at least 6 characters long and containing at least one uppercase letter, one lowercase letter, and one digit.

/login (POST)

To access their accounts, users can use this endpoint to log in. They should provide their email and password in the request body, and if the credentials match an existing account, they will receive an authentication token.

/forgot-password (POST)

Users can request a reset code for their forgotten password using this endpoint. They should provide their email address, and if it matches an existing account, a reset code will be sent to their email.

/verify-reset-code (POST)

This endpoint is used to verify a reset code and generate a JWT token for password reset. Users need to provide the reset code they received and their email address. If the code is valid and matches the provided email, a JWT token will be generated, allowing them to reset their password.

/me (POST)

Authenticated users can retrieve their own user information using this endpoint. To access this information, users need to include an Authorization header with a JWT token for authentication. This ensures that only authorized users can retrieve their user data.

Achievement Controller

/create (POST)

Requires authorization and admin privileges. Allows admins to create a new achievement by providing the necessary information in the request body. Icon should be the path of image in server. Type can be GAME or META.

/update (POST)

Requires authorization and admin privileges. Enables admins to update an existing achievement by providing its id and the updated information in the request body.

/delete (DELETE)

Requires authorization and admin privileges. Allows admins to delete an achievement by providing its id.

/delete-by-name (DELETE)

Requires authorization and admin privileges. Enables admins to delete an achievement by providing its achievementName and an optional gameName. If gameName is not provided it is assumed that the achievement is META achievement.

/get-game-achievements (GET)

Allows users (including guests) to retrieve a list of achievements associated with a specific game. Users need to provide the gameId as a query parameter.

/grant-achievement (POST)

Requires authorization and admin privileges. Enables admins to grant an achievement to a user by providing the necessary information in the request body.

Character Controller

/update (POST)

Allows users to edit (update) characters' fields such as name, icon , etc.

/create (POST)

Allows admins to create new characters. Enables admins to create character by providing information in the request body.

/get-game-characters (GET)

Allows users (including guests) to get the list of characters of provided game.

/delete (DELETE)

Allows admins to delete (softly) character.

Notification Controller

/get-notifications (GET)

Returns the list of notifications of the signed in user. Can be filtered by isRead field of notification model.

Home Controller

/home (GET)

Returns the list of posts specifically personalized for the signed in user. If user is signed in, posts are collected from the groups that user is a member of or groups that are created under the games that user follows. If user is a guest user, most popular posts are returned.

2. API Documentation (Example Responses)

Tag

Tag controller consist of basic CRUD (create, read, update, delete) endpoints enable user to observe existing tags, create, update or delete one.

  • Get all tags (api/tag/get-all) Returns all tags according to the filter (based on Tag object fields) provided.
[
  {
    "id": "string",
    "createdAt": "2023-12-01T10:18:31.851Z",
    "isDeleted": true,
    "name": "string",
    "tagType": "GROUP",
    "color": "string"
  }
]
  • Get tag (api/tag/get) Returns the specific tag (based on provided tagId).
{
  "id": "string",
  "createdAt": "2023-12-01T10:22:51.125Z",
  "isDeleted": true,
  "name": "string",
  "tagType": "GROUP",
  "color": "string"
}
  • Create tag (api/tag/create) Creates a tag.
{
  "id": "string",
  "createdAt": "2023-12-01T10:28:21.937Z",
  "isDeleted": true,
  "name": "string",
  "tagType": "GROUP",
  "color": "string"
}
  • Update tag (api/tag/update) Edits/Updates a tag.
{
  "id": "string",
  "createdAt": "2023-12-01T10:29:22.513Z",
  "isDeleted": true,
  "name": "string",
  "tagType": "GROUP",
  "color": "string"
}
  • Delete tag (api/tag/delete) Delets a tag (softly). Returns true if deleting operations is successful, throws an error otherwise.
true

Review

Review controller consist of basic CRUD (create, read, update, delete) endpoints enable user to observe existing reviews, create, update or delete one.

  • Get all review (api/review/get-all) Returns all review according to the filter (based on Review object fields) provided. Other platforms (FE/Mobile) can retrieve reviews of a game via using this enpoint.
[
  {
    "id": "string",
    "reviewDescription": "string",
    "rating": 0,
    "gameId": "string",
    "reviewedUser": "string",
    "requestedUserVote": "string",
    "overallVote": 0,
    "reportNum": 0,
    "createdAt": "2023-12-01T10:36:15.476Z"
  }
]
  • Get review (api/review/get) Returns the specific review (based on provided reviewId).
{
  "id": "string",
  "reviewDescription": "string",
  "rating": 0,
  "gameId": "string",
  "reviewedUser": "string",
  "requestedUserVote": "string",
  "overallVote": 0,
  "reportNum": 0,
  "createdAt": "2023-12-01T10:36:33.588Z"
}
  • Create review (api/review/create) Creates/adds a review.
{
  "id": "string",
  "createdAt": "2023-12-01T10:37:30.201Z",
  "isDeleted": true,
  "reviewDescription": "string",
  "rating": 0,
  "gameId": "string",
  "reviewedBy": "string",
  "overallVote": 0,
  "voteCount": 0,
  "reportNum": 0
}
  • Update review (api/review/update) Edits/Updates a review. (Returns true if update is successful, throws an error otherwise)
true
  • Delete review (api/review/delete) Delets a review (softly). Returns true if deleting operations is successful, throws an error otherwise.
true

Group

Review controller consist of basic CRUD (create, read, update, delete) endpoints enable user to observe existing reviews, create, update or delete one. Additionally, groups have different endpoints for group-specific functionalities such as (unban user, apply to group, etc.)

  • Update group (api/group/update) Updates information of a group
{
  "id": "string",
  "createdAt": "2023-12-01T12:07:10.381Z",
  "isDeleted": true,
  "title": "string",
  "description": "string",
  "membershipPolicy": "PUBLIC",
  "tags": [
    "string"
  ],
  "gameId": "string",
  "forumId": "string",
  "quota": 0,
  "moderators": [
    "string"
  ],
  "members": [
    "string"
  ],
  "bannedMembers": [
    "string"
  ],
  "avatarOnly": true
}
  • Unban user (api/group/unban-user) Unbans a user which is banned from the group, returns true if operation is succesful, throws error otherwise.
true
  • Remove moderator (api/group/remove-moderator) Remove the moderation rights of a user, returns true if operation is succesful, throws error otherwise.
true
  • Ban user (api/group/ban-user) Bans a user from the group, returns true if operation is succesful, throws error otherwise.
true
  • Add moderator (api/group/add-moderator) Add moderator to a group, returns true if operation is succesful, throws error otherwise.
true
  • Review application (api/group/review-application) Enable moderator to review an application of a user (specific to private groups). If application is accepted, return true. Returns false if application is rejected
true
  • Leave group (api/group/leave) Leave membership of a group, returns true if succesful, throws an error otherwise.
true
  • Join group (api/group/join) Join a group. Returns true if joining is succesful, throws error otherwise.
true
  • Create group (api/group/create) Create a group
{
  "id": "string",
  "createdAt": "2023-12-01T12:08:15.849Z",
  "isDeleted": true,
  "title": "string",
  "description": "string",
  "membershipPolicy": "PUBLIC",
  "tags": [
    "string"
  ],
  "gameId": "string",
  "forumId": "string",
  "quota": 0,
  "moderators": [
    "string"
  ],
  "members": [
    "string"
  ],
  "bannedMembers": [
    "string"
  ],
  "avatarOnly": true
}
  • Apply to group (api/group/apply) Apply to a private group (specific to private groups). Returns true if application is successful, throws error otherwise.
true
  • Add tag (api/group/add-tag) Add tag to a group
{
  "groupId": "string",
  "addedTag": {
    "id": "string",
    "createdAt": "2023-12-01T12:08:15.853Z",
    "isDeleted": true,
    "name": "string",
    "tagType": "GROUP",
    "color": "string"
  }
}
  • List aplications (api/group/list-applications) List application made to a group (specific to moderators)
[
  {
    "id": "string",
    "appliedAt": "2023-12-01T12:08:15.854Z",
    "applicant": {
      "id": "string",
      "createdAt": "2023-12-01T12:08:15.854Z",
      "isDeleted": true,
      "username": "string",
      "password": "string",
      "email": "string",
      "role": "BASIC",
      "isVerified": true,
      "verified": true
    },
    "group": {
      "id": "string",
      "createdAt": "2023-12-01T12:08:15.854Z",
      "isDeleted": true,
      "title": "string",
      "description": "string",
      "membershipPolicy": "PUBLIC",
      "tags": [
        "string"
      ],
      "gameId": "string",
      "forumId": "string",
      "quota": 0,
      "moderators": [
        "string"
      ],
      "members": [
        "string"
      ],
      "bannedMembers": [
        "string"
      ],
      "avatarOnly": true
    },
    "message": "string",
    "status": "PENDING"
  }
]
  • Get group (api/group/get) Get details of a group
{
  "id": "string",
  "title": "string",
  "description": "string",
  "membershipPolicy": "PUBLIC",
  "tags": [
    {
      "id": "string",
      "createdAt": "2023-12-01T12:08:15.856Z",
      "isDeleted": true,
      "name": "string",
      "tagType": "GROUP",
      "color": "string"
    }
  ],
  "gameId": "string",
  "forumId": "string",
  "quota": 0,
  "moderators": [
    {
      "id": "string",
      "username": "string",
      "photoUrl": "string"
    }
  ],
  "members": [
    {
      "id": "string",
      "username": "string",
      "photoUrl": "string"
    }
  ],
  "bannedMembers": [
    {
      "id": "string",
      "username": "string",
      "photoUrl": "string"
    }
  ],
  "avatarOnly": true,
  "createdAt": "2023-12-01T12:08:15.856Z",
  "userJoined": true
}
  • Get Recommended Groups (api/group/get-recommendations) Get list of recommended groups based on user's activity (followed games, group memberships)
[
  {
    "id": "string",
    "createdAt": "2023-12-28T14:55:01.477Z",
    "isDeleted": true,
    "title": "string",
    "description": "string",
    "membershipPolicy": "PUBLIC",
    "tags": [
      "string"
    ],
    "gameId": "string",
    "forumId": "string",
    "groupIcon": "string",
    "quota": 0,
    "moderators": [
      "string"
    ],
    "members": [
      "string"
    ],
    "bannedMembers": [
      "string"
    ],
    "avatarOnly": true
  }
]
  • Get all groups (api/group/get-all) Get list of groups (Optional : Filtering)
[
  {
    "id": "string",
    "title": "string",
    "description": "string",
    "membershipPolicy": "PUBLIC",
    "tags": [
      {
        "id": "string",
        "createdAt": "2023-12-01T12:08:15.859Z",
        "isDeleted": true,
        "name": "string",
        "tagType": "GROUP",
        "color": "string"
      }
    ],
    "gameId": "string",
    "forumId": "string",
    "quota": 0,
    "moderators": [
      "string"
    ],
    "members": [
      "string"
    ],
    "bannedMembers": [
      "string"
    ],
    "avatarOnly": true,
    "createdAt": "2023-12-01T12:08:15.859Z",
    "userJoined": true
  }
]
  • Remove tag (api/group/remove-tag) Remove tag of a group. Returns true if removing is successful, throws error otherwise.
true
  • Delete group (api/group/delete) Delete (softly) a group. Returns true if deletion is successful, throws error otherwise.
true

Forum

Forum controller consist of two endpoints which are basically implementation of forum specific functionalities. Since only groups and games have forums and these forums are created with the creation of groups and games concurrently, there aren't any create or get endpoints for forums since they can be accessed through games and groups referentially.

  • Unban user (api/forum/unban-user) Unbans user which is banned before from the forum. Returns true if unbanning is successful, throws error otherwise.
true
  • Ban user (api/forum/ban-user) Bans user from forum. Returns true if banning is successful, throws error otherwise.
true

Vote

Vote controller has total of three endpoints which are get all votes, get vote and create vote.

  • Create vote (api/vote/create) Adds vote of a user to a given object (Review, Post, ...). This endpoint handles duplicate vote or other cases relevant to voting by itself
{
  "id": "string",
  "createdAt": "2023-12-01T12:10:48.684Z",
  "isDeleted": true,
  "voteType": "GAME",
  "typeId": "string",
  "choice": "UPVOTE",
  "votedBy": "string"
}
  • Get vote (api/vote/get) Get detail of a vote
{
  "id": "string",
  "createdAt": "2023-12-01T12:10:59.740Z",
  "isDeleted": true,
  "voteType": "GAME",
  "typeId": "string",
  "choice": "UPVOTE",
  "votedBy": "string"
}
  • Get vote (api/vote/get-all) Get list of votes
[
  {
    "id": "string",
    "createdAt": "2023-12-01T12:11:10.443Z",
    "isDeleted": true,
    "voteType": "GAME",
    "typeId": "string",
    "choice": "UPVOTE",
    "votedBy": "string"
  }
]

Profile

Profile controller consist of different endpoints where user can update/edit his different features of his profile such as games on his profile, his username, etc. Needless to say, read endpoints are also implemented in order to retrieve profile information of a user (or users).

  • Remove game (api/profile/remove-game)
{
  "id": "string",
  "createdAt": "2023-12-01T12:11:29.679Z",
  "isDeleted": true,
  "userId": "string",
  "achievements": [
    "string"
  ],
  "reviewCount": 0,
  "voteCount": 0,
  "commentCount": 0,
  "postCount": 0,
  "isReviewedYet": true,
  "isVotedYet": true,
  "isCommentedYet": true,
  "isPostedYet": true,
  "isPrivate": true,
  "profilePhoto": "string",
  "games": [
    "string"
  ],
  "steamProfile": "string",
  "epicGamesProfile": "string",
  "xboxProfile": "string"
}
  • Edit/update profile (api/profile/edit)
{
  "username": "string",
  "isPrivate": true,
  "profilePhoto": "string",
  "steamProfile": "string",
  "epicGamesProfile": "string",
  "xboxProfile": "string"
}
  • Add game (api/profile/add-game)
{
  "id": "string",
  "createdAt": "2023-12-01T12:11:54.416Z",
  "isDeleted": true,
  "userId": "string",
  "achievements": [
    "string"
  ],
  "reviewCount": 0,
  "voteCount": 0,
  "commentCount": 0,
  "postCount": 0,
  "isReviewedYet": true,
  "isVotedYet": true,
  "isCommentedYet": true,
  "isPostedYet": true,
  "isPrivate": true,
  "profilePhoto": "string",
  "games": [
    "string"
  ],
  "steamProfile": "string",
  "epicGamesProfile": "string",
  "xboxProfile": "string"
}
  • Get profile (api/profile/get)
{
  "id": "string",
  "user": {
    "id": "string",
    "createdAt": "2023-12-01T12:12:17.875Z",
    "isDeleted": true,
    "username": "string",
    "password": "string",
    "email": "string",
    "role": "BASIC",
    "isVerified": true,
    "verified": true
  },
  "achievements": [
    {
      "id": "string",
      "createdAt": "2023-12-01T12:12:17.875Z",
      "isDeleted": true,
      "title": "string",
      "description": "string",
      "icon": "string",
      "type": "GAME",
      "game": "string"
    }
  ],
  "reviewCount": 0,
  "voteCount": 0,
  "commentCount": 0,
  "postCount": 0,
  "isReviewedYet": true,
  "isVotedYet": true,
  "isCommentedYet": true,
  "isPostedYet": true,
  "isPrivate": true,
  "profilePhoto": "string",
  "games": [
    {
      "id": "string",
      "gameName": "string",
      "gameDescription": "string",
      "gameIcon": "string",
      "overallRating": 0,
      "ratingCount": 0,
      "releaseDate": "2023-12-01T12:12:17.875Z",
      "forum": "string",
      "playerTypes": [
        {
          "id": "string",
          "createdAt": "2023-12-01T12:12:17.875Z",
          "isDeleted": true,
          "name": "string",
          "tagType": "GROUP",
          "color": "string"
        }
      ],
      "genre": [
        {
          "id": "string",
          "createdAt": "2023-12-01T12:12:17.875Z",
          "isDeleted": true,
          "name": "string",
          "tagType": "GROUP",
          "color": "string"
        }
      ],
      "production": {
        "id": "string",
        "createdAt": "2023-12-01T12:12:17.875Z",
        "isDeleted": true,
        "name": "string",
        "tagType": "GROUP",
        "color": "string"
      },
      "duration": {
        "id": "string",
        "createdAt": "2023-12-01T12:12:17.875Z",
        "isDeleted": true,
        "name": "string",
        "tagType": "GROUP",
        "color": "string"
      },
      "platforms": [
        {
          "id": "string",
          "createdAt": "2023-12-01T12:12:17.875Z",
          "isDeleted": true,
          "name": "string",
          "tagType": "GROUP",
          "color": "string"
        }
      ],
      "artStyles": [
        {
          "id": "string",
          "createdAt": "2023-12-01T12:12:17.875Z",
          "isDeleted": true,
          "name": "string",
          "tagType": "GROUP",
          "color": "string"
        }
      ],
      "developer": {
        "id": "string",
        "createdAt": "2023-12-01T12:12:17.875Z",
        "isDeleted": true,
        "name": "string",
        "tagType": "GROUP",
        "color": "string"
      },
      "otherTags": [
        {
          "id": "string",
          "createdAt": "2023-12-01T12:12:17.875Z",
          "isDeleted": true,
          "name": "string",
          "tagType": "GROUP",
          "color": "string"
        }
      ],
      "minSystemReq": "string",
      "createdAt": "2023-12-01T12:12:17.875Z",
      "isDeleted": true
    }
  ],
  "reviews": [
    {
      "id": "string",
      "createdAt": "2023-12-01T12:12:17.875Z",
      "isDeleted": true,
      "reviewDescription": "string",
      "rating": 0,
      "gameId": "string",
      "reviewedBy": "string",
      "overallVote": 0,
      "voteCount": 0,
      "reportNum": 0
    }
  ],
  "groups": [
    {
      "id": "string",
      "createdAt": "2023-12-01T12:12:17.875Z",
      "isDeleted": true,
      "title": "string",
      "description": "string",
      "membershipPolicy": "PUBLIC",
      "tags": [
        "string"
      ],
      "gameId": "string",
      "forumId": "string",
      "quota": 0,
      "moderators": [
        "string"
      ],
      "members": [
        "string"
      ],
      "bannedMembers": [
        "string"
      ],
      "avatarOnly": true
    }
  ],
  "steamProfile": "string",
  "epicGamesProfile": "string",
  "xboxProfile": "string"
}
  • Get activities (api/profile/get-activities)
[
  {
    "typeId": "string",
    "type": "REVIEW",
    "parentId": "string",
    "parentType": "string",
    "description": "string",
    "createdAt": "2023-12-01T12:12:32.147Z"
  }
]

Post

Post controller consist of basic CRUD endpoints as well as post-specific endpoints (e.g. get post comments).

  • Edit/update post (api/post/edit) Edit information of a post
{
  "id": "string",
  "createdAt": "2023-12-01T12:12:49.324Z",
  "isDeleted": true,
  "title": "string",
  "postContent": "string",
  "postImage": "string",
  "poster": "string",
  "forum": "string",
  "lastEditedAt": "2023-12-01T12:12:49.324Z",
  "tags": [
    "string"
  ],
  "inappropriate": true,
  "locked": true,
  "overallVote": 0,
  "voteCount": 0,
  "achievement": "string"
}
  • Add/create post (api/post/create) Create a post
{
  "id": "string",
  "createdAt": "2023-12-01T12:13:01.813Z",
  "isDeleted": true,
  "title": "string",
  "postContent": "string",
  "postImage": "string",
  "poster": "string",
  "forum": "string",
  "lastEditedAt": "2023-12-01T12:13:01.813Z",
  "tags": [
    "string"
  ],
  "inappropriate": true,
  "locked": true,
  "overallVote": 0,
  "voteCount": 0,
  "achievement": "string"
}
  • Get list of posts (api/post/get-post-list) Retrieve list of posts
[
  {
    "id": "string",
    "title": "string",
    "postContent": "string",
    "poster": {
      "id": "string",
      "createdAt": "2023-12-01T12:13:29.213Z",
      "isDeleted": true,
      "username": "string",
      "password": "string",
      "email": "string",
      "role": "BASIC",
      "isVerified": true,
      "verified": true
    },
    "userVote": "UPVOTE",
    "postImage": "string",
    "achievement": {
      "id": "string",
      "createdAt": "2023-12-01T12:13:29.213Z",
      "isDeleted": true,
      "title": "string",
      "description": "string",
      "icon": "string",
      "type": "GAME",
      "game": "string"
    },
    "lastEditedAt": "2023-12-01T12:13:29.213Z",
    "createdAt": "2023-12-01T12:13:29.213Z",
    "isEdited": true,
    "tags": [
      {
        "id": "string",
        "createdAt": "2023-12-01T12:13:29.213Z",
        "isDeleted": true,
        "name": "string",
        "tagType": "GROUP",
        "color": "string"
      }
    ],
    "inappropriate": true,
    "overallVote": 0,
    "voteCount": 0,
    "commentCount": 0
  }
]
  • Get post detail (api/post/get-post-detail) Retrieve detail of a post
{
  "title": "string",
  "postContent": "string",
  "postImage": "string",
  "poster": {
    "id": "string",
    "createdAt": "2023-12-01T12:13:44.950Z",
    "isDeleted": true,
    "username": "string",
    "password": "string",
    "email": "string",
    "role": "BASIC",
    "isVerified": true,
    "verified": true
  },
  "userVote": "UPVOTE",
  "forum": "string",
  "achievement": {
    "id": "string",
    "createdAt": "2023-12-01T12:13:44.950Z",
    "isDeleted": true,
    "title": "string",
    "description": "string",
    "icon": "string",
    "type": "GAME",
    "game": "string"
  },
  "lastEditedAt": "2023-12-01T12:13:44.950Z",
  "tags": [
    {
      "id": "string",
      "createdAt": "2023-12-01T12:13:44.950Z",
      "isDeleted": true,
      "name": "string",
      "tagType": "GROUP",
      "color": "string"
    }
  ],
  "inappropriate": true,
  "locked": true,
  "overallVote": 0,
  "voteCount": 0
}
  • Get comments of a post (api/post/get-post-detail) Retrieve list of comments under a post
[
  {
    "id": "string",
    "commentContent": "string",
    "commenter": {
      "id": "string",
      "createdAt": "2023-12-01T12:14:01.360Z",
      "isDeleted": true,
      "username": "string",
      "password": "string",
      "email": "string",
      "role": "BASIC",
      "isVerified": true,
      "verified": true
    },
    "post": "string",
    "lastEditedAt": "2023-12-01T12:14:01.360Z",
    "createdAt": "2023-12-01T12:14:01.360Z",
    "isEdited": true,
    "isDeleted": true,
    "overallVote": 0,
    "voteCount": 0,
    "replies": [
      {
        "id": "string",
        "commentContent": "string",
        "commenter": {
          "id": "string",
          "createdAt": "2023-12-01T12:14:01.360Z",
          "isDeleted": true,
          "username": "string",
          "password": "string",
          "email": "string",
          "role": "BASIC",
          "isVerified": true,
          "verified": true
        },
        "post": "string",
        "lastEditedAt": "2023-12-01T12:14:01.360Z",
        "createdAt": "2023-12-01T12:14:01.360Z",
        "isEdited": true,
        "isDeleted": true,
        "overallVote": 0,
        "voteCount": 0
      }
    ]
  }
]
  • Delete a post (api/post/delete) Delete (softly) a post
{
  "id": "string",
  "createdAt": "2023-12-01T12:14:15.492Z",
  "isDeleted": true,
  "title": "string",
  "postContent": "string",
  "postImage": "string",
  "poster": "string",
  "forum": "string",
  "lastEditedAt": "2023-12-01T12:14:15.492Z",
  "tags": [
    "string"
  ],
  "inappropriate": true,
  "locked": true,
  "overallVote": 0,
  "voteCount": 0,
  "achievement": "string"
}

Game

Game controller consist of basic CRUD endpoints as well as game-specific tag operations (e.g. add tag to a game).

  • Update (Edit) Game (api/game/update) Update fields of the provided game
{
  "gameName": "string",
  "gameDescription": "string",
  "gameIcon": "string",
  "releaseDate": "2023-12-28T14:56:02.776Z",
  "minSystemReq": "string"
}
  • Promote Game (api/game/promote) Change promotion status of the provided game (promoted to unpromoted or unpromoted to promoted)
{
  "id": "string",
  "createdAt": "2023-12-28T14:58:10.202Z",
  "isDeleted": true,
  "gameName": "string",
  "gameDescription": "string",
  "gameIcon": "string",
  "overallRating": 0,
  "ratingCount": 0,
  "releaseDate": "2023-12-28T14:58:10.202Z",
  "forum": "string",
  "playerTypes": [
    "string"
  ],
  "genre": [
    "string"
  ],
  "production": "string",
  "duration": "string",
  "platforms": [
    "string"
  ],
  "artStyles": [
    "string"
  ],
  "developer": "string",
  "otherTags": [
    "string"
  ],
  "minSystemReq": "string",
  "isPromoted": true,
  "allTags": [
    "string"
  ]
}
  • Get list of games (api/game/get-game-list) Retrieve list of games (Optional : Filtering)
[
  {
    "id": "string",
    "createdAt": "2023-12-01T12:14:31.959Z",
    "isDeleted": true,
    "gameName": "string",
    "gameDescription": "string",
    "gameIcon": "string",
    "overallRating": 0,
    "ratingCount": 0,
    "releaseDate": "2023-12-01T12:14:31.959Z",
    "forum": "string",
    "playerTypes": [
      "string"
    ],
    "genre": [
      "string"
    ],
    "production": "string",
    "duration": "string",
    "platforms": [
      "string"
    ],
    "artStyles": [
      "string"
    ],
    "developer": "string",
    "otherTags": [
      "string"
    ],
    "minSystemReq": "string",
    "allTags": [
      "string"
    ]
  }
]
  • Add/create game (api/game/create) Create a game with the provided game information
{
  "id": "string",
  "createdAt": "2023-12-01T12:14:47.646Z",
  "isDeleted": true,
  "gameName": "string",
  "gameDescription": "string",
  "gameIcon": "string",
  "overallRating": 0,
  "ratingCount": 0,
  "releaseDate": "2023-12-01T12:14:47.646Z",
  "forum": "string",
  "playerTypes": [
    "string"
  ],
  "genre": [
    "string"
  ],
  "production": "string",
  "duration": "string",
  "platforms": [
    "string"
  ],
  "artStyles": [
    "string"
  ],
  "developer": "string",
  "otherTags": [
    "string"
  ],
  "minSystemReq": "string",
  "allTags": [
    "string"
  ]
}
  • Add tag to a game (api/game/add-tag) Add tag to the provided game
{
  "gameId": "string",
  "addedTag": {
    "id": "string",
    "createdAt": "2023-12-01T12:15:19.361Z",
    "isDeleted": true,
    "name": "string",
    "tagType": "GROUP",
    "color": "string"
  }
}
  • Get recommended games (api/game/get-recommendations) Returns recommended games based on user's activity (followed games)
[
  {
    "id": "string",
    "createdAt": "2023-12-28T14:58:35.998Z",
    "isDeleted": true,
    "gameName": "string",
    "gameDescription": "string",
    "gameIcon": "string",
    "overallRating": 0,
    "ratingCount": 0,
    "releaseDate": "2023-12-28T14:58:35.998Z",
    "forum": "string",
    "playerTypes": [
      "string"
    ],
    "genre": [
      "string"
    ],
    "production": "string",
    "duration": "string",
    "platforms": [
      "string"
    ],
    "artStyles": [
      "string"
    ],
    "developer": "string",
    "otherTags": [
      "string"
    ],
    "minSystemReq": "string",
    "isPromoted": true,
    "allTags": [
      "string"
    ]
  }
]
  • Get game detail (api/game/get-game) Retrieve details of a game
{
  "id": "string",
  "gameName": "string",
  "gameDescription": "string",
  "gameIcon": "string",
  "overallRating": 0,
  "ratingCount": 0,
  "releaseDate": "2023-12-01T12:15:31.519Z",
  "forum": "string",
  "playerTypes": [
    {
      "id": "string",
      "createdAt": "2023-12-01T12:15:31.519Z",
      "isDeleted": true,
      "name": "string",
      "tagType": "GROUP",
      "color": "string"
    }
  ],
  "genre": [
    {
      "id": "string",
      "createdAt": "2023-12-01T12:15:31.519Z",
      "isDeleted": true,
      "name": "string",
      "tagType": "GROUP",
      "color": "string"
    }
  ],
  "production": {
    "id": "string",
    "createdAt": "2023-12-01T12:15:31.519Z",
    "isDeleted": true,
    "name": "string",
    "tagType": "GROUP",
    "color": "string"
  },
  "duration": {
    "id": "string",
    "createdAt": "2023-12-01T12:15:31.519Z",
    "isDeleted": true,
    "name": "string",
    "tagType": "GROUP",
    "color": "string"
  },
  "platforms": [
    {
      "id": "string",
      "createdAt": "2023-12-01T12:15:31.519Z",
      "isDeleted": true,
      "name": "string",
      "tagType": "GROUP",
      "color": "string"
    }
  ],
  "artStyles": [
    {
      "id": "string",
      "createdAt": "2023-12-01T12:15:31.519Z",
      "isDeleted": true,
      "name": "string",
      "tagType": "GROUP",
      "color": "string"
    }
  ],
  "developer": {
    "id": "string",
    "createdAt": "2023-12-01T12:15:31.519Z",
    "isDeleted": true,
    "name": "string",
    "tagType": "GROUP",
    "color": "string"
  },
  "otherTags": [
    {
      "id": "string",
      "createdAt": "2023-12-01T12:15:31.519Z",
      "isDeleted": true,
      "name": "string",
      "tagType": "GROUP",
      "color": "string"
    }
  ],
  "minSystemReq": "string",
  "createdAt": "2023-12-01T12:15:31.519Z",
  "isDeleted": true
}
  • Get tags of a game (api/game/get-all-tags) Retrieve tags of a game
{
  "playerTypes": [
    "string"
  ],
  "genre": [
    "string"
  ],
  "production": "string",
  "duration": "string",
  "platforms": [
    "string"
  ],
  "artStyles": [
    "string"
  ],
  "developer": "string",
  "otherTags": [
    "string"
  ]
}
  • Get game by name (api/game/get-by-name) Retrieve game detail by providing game name (instead of gameId)
{
  "id": "string",
  "gameName": "string",
  "gameDescription": "string",
  "gameIcon": "string",
  "overallRating": 0,
  "ratingCount": 0,
  "releaseDate": "2023-12-01T12:16:05.050Z",
  "forum": "string",
  "playerTypes": [
    {
      "id": "string",
      "createdAt": "2023-12-01T12:16:05.050Z",
      "isDeleted": true,
      "name": "string",
      "tagType": "GROUP",
      "color": "string"
    }
  ],
  "genre": [
    {
      "id": "string",
      "createdAt": "2023-12-01T12:16:05.050Z",
      "isDeleted": true,
      "name": "string",
      "tagType": "GROUP",
      "color": "string"
    }
  ],
  "production": {
    "id": "string",
    "createdAt": "2023-12-01T12:16:05.050Z",
    "isDeleted": true,
    "name": "string",
    "tagType": "GROUP",
    "color": "string"
  },
  "duration": {
    "id": "string",
    "createdAt": "2023-12-01T12:16:05.050Z",
    "isDeleted": true,
    "name": "string",
    "tagType": "GROUP",
    "color": "string"
  },
  "platforms": [
    {
      "id": "string",
      "createdAt": "2023-12-01T12:16:05.050Z",
      "isDeleted": true,
      "name": "string",
      "tagType": "GROUP",
      "color": "string"
    }
  ],
  "artStyles": [
    {
      "id": "string",
      "createdAt": "2023-12-01T12:16:05.050Z",
      "isDeleted": true,
      "name": "string",
      "tagType": "GROUP",
      "color": "string"
    }
  ],
  "developer": {
    "id": "string",
    "createdAt": "2023-12-01T12:16:05.050Z",
    "isDeleted": true,
    "name": "string",
    "tagType": "GROUP",
    "color": "string"
  },
  "otherTags": [
    {
      "id": "string",
      "createdAt": "2023-12-01T12:16:05.050Z",
      "isDeleted": true,
      "name": "string",
      "tagType": "GROUP",
      "color": "string"
    }
  ],
  "minSystemReq": "string",
  "createdAt": "2023-12-01T12:16:05.050Z",
  "isDeleted": true
}
  • Remove a tag from game (api/game/remove-tag) Remove a tag from the specified game. Returns true if removing is successful, throws error otherwise.
true
  • Delete game (api/game/delete) Deletes (softly) the provided game
true

Comment

Comment controller consist of basic CRUD endpoints as well as comment-specific endpoints (e.g. reply to a comment).

  • Reply to a comment (api/comment/reply) Add a reply to a comment
{
  "id": "string",
  "createdAt": "2023-12-01T12:17:04.752Z",
  "isDeleted": true,
  "commentContent": "string",
  "commenter": "string",
  "post": "string",
  "parentComment": "string",
  "lastEditedAt": "2023-12-01T12:17:04.752Z",
  "overallVote": 0,
  "voteCount": 0
}
  • Edit a comment (api/comment/edit)
{
  "id": "string",
  "createdAt": "2023-12-01T12:17:18.154Z",
  "isDeleted": true,
  "commentContent": "string",
  "commenter": "string",
  "post": "string",
  "parentComment": "string",
  "lastEditedAt": "2023-12-01T12:17:18.154Z",
  "overallVote": 0,
  "voteCount": 0
}
  • Create/add a comment (api/comment/create)
{
  "id": "string",
  "createdAt": "2023-12-01T12:17:29.327Z",
  "isDeleted": true,
  "commentContent": "string",
  "commenter": "string",
  "post": "string",
  "parentComment": "string",
  "lastEditedAt": "2023-12-01T12:17:29.327Z",
  "overallVote": 0,
  "voteCount": 0
}
  • Delete a comment (api/comment/delete) Delete (softly) a comment
{
  "id": "string",
  "createdAt": "2023-12-01T12:17:42.276Z",
  "isDeleted": true,
  "commentContent": "string",
  "commenter": "string",
  "post": "string",
  "parentComment": "string",
  "lastEditedAt": "2023-12-01T12:17:42.276Z",
  "overallVote": 0,
  "voteCount": 0
}

Authorization (Auth)

Auth controller consist of authorization related endpoints such as register, login, forgot password, etc.

  • Verification of reset code (api/auth/verify-reset-code) Verify the reset code provided by the user
"string"
  • Register user (api/auth/register) Endpoint that handles register operation
{
  "id": "string",
  "createdAt": "2023-12-01T12:18:11.940Z",
  "isDeleted": true,
  "username": "string",
  "password": "string",
  "email": "string",
  "role": "BASIC",
  "isVerified": true,
  "verified": true
}
  • Me endpoint (user authentication) (api/auth/me) Returns user information based on the retrieved token
{
  "username": "string",
  "id": "string",
  "email": "string",
  "role": "BASIC",
  "isVerified": true
}
  • Login user (api/auth/login) Endpoint that handles login operation
{
  "user": {
    "username": "string",
    "id": "string",
    "email": "string",
    "role": "BASIC",
    "isVerified": true
  },
  "token": "string"
}
  • Forgot password (api/auth/forgot-password) Endpoint that handles forgot password operation (including sending mail, etc.)
"string"
  • Change password (api/auth/change-password) Endpoint that handles change password operation (including old password matching). Returns true if change password request is sent, throws error otherwise.
true

Achievement

Achievement controller consist of achievement related CRUD endpoints as well as achievement-specific endpoints (e.g. grant achievement to a user)

  • Update achievement (api/achievemet/update) Edit information of an achievement
{
  "id": "string",
  "createdAt": "2023-12-01T12:19:21.019Z",
  "isDeleted": true,
  "title": "string",
  "description": "string",
  "icon": "string",
  "type": "GAME",
  "game": "string"
}
  • Grant achievement to a user (api/achievement/grant-achievement) Give permission to a user to grant the provided achievement (specific to admins)
[
  "string"
]
  • Create an achievement (api/achievement/create)
{
  "id": "string",
  "createdAt": "2023-12-01T12:19:47.552Z",
  "isDeleted": true,
  "title": "string",
  "description": "string",
  "icon": "string",
  "type": "GAME",
  "game": "string"
}
  • Get game (type) achievements (api/achievement/get-game-achievements) Get achievements of type "Game"
[
  {
    "id": "string",
    "createdAt": "2023-12-01T12:20:07.190Z",
    "isDeleted": true,
    "title": "string",
    "description": "string",
    "icon": "string",
    "type": "GAME",
    "game": "string"
  }
]
  • Delete achievement (api/achievement/delete) Delete (softly) an achievement
{
  "id": "string",
  "createdAt": "2023-12-01T12:20:18.638Z",
  "isDeleted": true,
  "title": "string",
  "description": "string",
  "icon": "string",
  "type": "GAME",
  "game": "string"
}
  • Delete achievement by name (api/achievement/delete-by-name) Delete (softly) an achievement with provided name (instead of achievementId)
{
  "id": "string",
  "createdAt": "2023-12-01T12:20:31.845Z",
  "isDeleted": true,
  "title": "string",
  "description": "string",
  "icon": "string",
  "type": "GAME",
  "game": "string"
}

Image

Image controller consists of single endpoint which is simply uploads the provided image to our server and returns the path of the image for further access

  • Update image (api/image/upload)
"string"

User

User controller consist of endpoints which are used inside other endpoints through API calls in backend. In other words, these endpoints are used by backend developers, basic users of our web application don't directly access these endpoints. (Note : Reader can think "Profile" entity to be an abstraction of our "User" entity. Profile enpoints are open to outside users whereas user endpoints are not.)

  • Change role of a user (api/user/change-role) Returns true if changing role is successful, throws error otherwise.
true
  • Get list of users (api/user/get-all)
[
  {
    "id": "string",
    "createdAt": "2023-12-01T12:22:08.649Z",
    "isDeleted": true,
    "username": "string",
    "password": "string",
    "email": "string",
    "role": "BASIC",
    "isVerified": true,
    "verified": true
  }
]
  • Delete a user (api/user/delete) Returns true if deletion is successful, throws error otherwise.
true

Character

Besides basic CRUD endpoints, character controller also contains a game specific endpoint where user can retrieve list of characters of a game.

  • Update (edit) character (api/character/update) Updates/edits fields of the provided character
{
  "name": "string",
  "icon": "string",
  "description": "string",
  "games": [
    "string"
  ],
  "type": "string",
  "gender": "string",
  "race": "string",
  "status": "string",
  "occupation": "string",
  "birthDate": "string",
  "voiceActor": "string",
  "height": "string",
  "age": "string",
  "customFields": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  }
}
  • Create character (api/character/create) Creates character based on the provided information in request body
{
  "name": "string",
  "icon": "string",
  "description": "string",
  "games": [
    "string"
  ],
  "type": "string",
  "gender": "string",
  "race": "string",
  "status": "string",
  "occupation": "string",
  "birthDate": "string",
  "voiceActor": "string",
  "height": "string",
  "age": "string",
  "customFields": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  }
}
  • Get characters of a game (api/character/get-game-characters) Returns characters associated with the provided game
[
  {
    "id": "string",
    "createdAt": "2023-12-28T20:46:51.117Z",
    "isDeleted": true,
    "name": "string",
    "icon": "string",
    "description": "string",
    "games": [
      "string"
    ],
    "type": "string",
    "gender": "string",
    "race": "string",
    "status": "string",
    "occupation": "string",
    "birthDate": "string",
    "voiceActor": "string",
    "height": "string",
    "age": "string",
    "customFields": {
      "additionalProp1": "string",
      "additionalProp2": "string",
      "additionalProp3": "string"
    }
  }
]
  • Delete a character (api/character/delete) Returns the provided character that is deleted. (isDeleted field is expected to be true on the returned data)
{
  "id": "string",
  "createdAt": "2023-12-28T20:47:40.944Z",
  "isDeleted": true,
  "name": "string",
  "icon": "string",
  "description": "string",
  "games": [
    "string"
  ],
  "type": "string",
  "gender": "string",
  "race": "string",
  "status": "string",
  "occupation": "string",
  "birthDate": "string",
  "voiceActor": "string",
  "height": "string",
  "age": "string",
  "customFields": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  }
}

Notification

Notification controller consist of single endpoint which is used to retrieve the notifications of the signed in user. Since notifications are generated internally (inside service methods itself) there is no need to implement additional update and create endpoints.

  • Get notifications (api/notification/get-notifications) Returns notifications of the signed in user, optionally can be filtered whether notifications are read or not. (uses signing information)
[
  {
    "id": "string",
    "createdAt": "2023-12-28T20:52:18.046Z",
    "isDeleted": true,
    "parent": "string",
    "parentType": "POST",
    "message": "string",
    "user": "string",
    "isRead": true
  }
]

Home

Home controller consists of single endpoints that returns a list of posts that is being presented to users at the homepage. If user is signed in, he/she will be greeted with personalized posts based on games that user follows or groups that user is a member of. If user is a guest, he/she will be greeted with most popular posts from different forums.

  • Get homepage posts (api/home) Returns list of posts that will be presented to user at homepage of the application. Posts can be filtered based on creation date, overall vote and vote count (creation date by default). (Sorting can be ascending and descending (by default) based on user's needs)
[
  {
    "id": "string",
    "title": "string",
    "postContent": "string",
    "postImage": "string",
    "poster": {
      "id": "string",
      "createdAt": "2023-12-28T20:55:15.296Z",
      "isDeleted": true,
      "username": "string",
      "password": "string",
      "email": "string",
      "role": "BASIC",
      "isVerified": true,
      "verified": true
    },
    "achievement": {
      "id": "string",
      "createdAt": "2023-12-28T20:55:15.296Z",
      "isDeleted": true,
      "title": "string",
      "description": "string",
      "icon": "string",
      "type": "GAME",
      "game": "string"
    },
    "character": {
      "id": "string",
      "createdAt": "2023-12-28T20:55:15.296Z",
      "isDeleted": true,
      "name": "string",
      "icon": "string",
      "description": "string",
      "games": [
        "string"
      ],
      "type": "string",
      "gender": "string",
      "race": "string",
      "status": "string",
      "occupation": "string",
      "birthDate": "string",
      "voiceActor": "string",
      "height": "string",
      "age": "string",
      "customFields": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      }
    },
    "userVote": "UPVOTE",
    "forum": "string",
    "type": "GAME",
    "typeId": "string",
    "typeName": "string",
    "lastEditedAt": "2023-12-28T20:55:15.296Z",
    "tags": [
      {
        "id": "string",
        "createdAt": "2023-12-28T20:55:15.296Z",
        "isDeleted": true,
        "name": "string",
        "tagType": "GROUP",
        "color": "string"
      }
    ],
    "inappropriate": true,
    "locked": true,
    "overallVote": 0,
    "voteCount": 0,
    "createdAt": "2023-12-28T20:55:15.296Z",
    "isDeleted": true,
    "isPromoted": true
  }
]


💻 Meeting Notes

Cmpe 352
Cmpe 451

📝 Requirements


🪧 Diagrams


📬 Deliverables

Cmpe 352
Cmpe 451

🎇 General Contributions

Cmpe 352 Contributions

Milestone 1
Final Milestone

Cmpe 451 Contributions

Milestone 1
Milestone 2
Final Milestone

📕 Mock Up


🕵️ User Scenario



📝 RAM


📚 Research


📑 Templates


📱 Practice App

API Documentation for Practice App
Clone this wiki locally