Parameters:
- offset: int
- limit: int
- name: string (optional)
Returns: Page of User JSON objects.
Returns: User JSON object with the specified ID or a 404 error with an explanatory message.
Parameters:
- offset: int
- limit: int
Returns: Page of Media JSON objects that belong to the user with the specified ID.
Entity: IdToken JSON
Returns: The logged-in/newly registered User JSON object or fails if the token is invalid with a 400 status code.
Headers: Authorization with an IdToken Entity: ImageRequest JSON Description: Inserts a new medium associated with the user.
Returns: MediumId of the inserted image.
Headers: Authorization with an IdToken Entity: UserRequest JSON Description: Updates your profile.
Returns: Just a 200 status code if everything went smoothly or an explanatory error message
if there were errors along the way.
Headers: Authorization with an IdToken Entity: MediumId Description: Updates your profile picture with the medium whose ID you specify in the entity.
Returns: Just a 200 status code if everything went smoothly or an explanatory error message
if there were errors along the way.
Parameters:
- offset: int
- limit: int
- userId: long (optional)
Returns: Page of Post JSON objects or conditionally, posts of a user with the specified ID.
Returns: Post JSON object with the specified ID if one exists, 404 status with a message otherwise.
Parameters:
- offset: int
- limit: int
Returns: Page of Comment JSON objects associated with a post with the specified ID, 404 status code with an explanatory message if a post with the ID doesn't exist.
Returns: Comment JSON object with the specified ID if one exists, 404 status with a message otherwise.
Headers: Authorization with an IdToken Entity: PostRequest JSON Description: Inserts the sent post and assigns it to the user.
Returns: PostId of the inserted post.
Headers: Authorization with an IdToken Entity: CommentRequest JSON Description: Inserts the sent comment and assigns it to the user.
Returns: CommentId of the inserted comment.
Headers: Authorization with an IdToken Description: Increases the like count of a post with the specified id.
Returns: Just a 200 status code if everything went smoothly, 422 if the user has already liked that post.
Headers: Authorization with an IdToken Description: Decreases the like count of a post with the specified id.
Returns: Just a 200 status code if everything went smoothly, 422 if the user hasn't already liked that post.
Headers: Authorization with an IdToken Entity: PostRequest JSON Description: Updates the given post.
Returns: Just a 200 status code if everything went smoothly.
Headers: Authorization with an IdToken Entity: CommentRequest JSON Description: Updates the given comment.
Returns: Just a 200 status code if everything went smoothly.
Headers: Authorization with an IdToken Entity: FriendRequestRequest JSON Description: Sends a friend request to the specified user.
Returns: FriendRequestId of the newly sent request or an error with an explanatory message otherwise.
Headers: Authorization with an IdToken Parameters:
- offset: int
- limit: int
Returns: Page of accepted FriendRequest JSON objects of the logged in user.
Headers: Authorization with an IdToken Parameters:
- offset: int
- limit: int
Returns: Page of pending FriendRequest JSON objects sent to the logged in user.
Headers: Authorization with an IdToken Parameters:
- offset: int
- limit: int
Returns: Page of pending FriendRequest JSON objects sent by the logged in.
Headers: Authorization with an IdToken Description: Accepts an incoming friend request.
Returns: Just a 200 status code if everything went smoothly.
Headers: Authorization with an IdToken Description: Rejects an incoming friend request.
Returns: Just a 200 status code if everything went smoothly.
Headers: Authorization with an IdToken Parameters:
- offset: int
- limit: int
Returns: Page of Post JSON objects by user's friends and himself.
Headers: Authorization with an IdToken Parameters:
- offset: int
- limit: int
Returns: Page of Media JSON objects by user's friends and himself.
Execute flyway.sh (you may want to add execute rights to the file first with
chmod +x flyway.sh).
The script accepts these optional parameters:
-n <username> - database username (postgres by default),
-p <password> - database password (postgres by default),
-u <URL> - JDBC database url jdbc:postgresql://localhost:5432/rubduk by default),
-d <name> - JDBC database name on default url jdbc:postgresql://localhost:5432/<name> by default),
-c - run flywayClean instead of flywayMigrate.