150 lines
5.1 KiB
Java
150 lines
5.1 KiB
Java
package org.gcube.social_networking.rest;
|
|
|
|
import com.webcohesion.enunciate.metadata.rs.RequestHeader;
|
|
import com.webcohesion.enunciate.metadata.rs.RequestHeaders;
|
|
import com.webcohesion.enunciate.metadata.rs.ResourceGroup;
|
|
import com.webcohesion.enunciate.metadata.rs.ResourceLabel;
|
|
import org.gcube.social_networking.socialnetworking.model.shared.InviteStatus;
|
|
import org.gcube.social_networking.socialnetworking.model.shared.NotificationChannelType;
|
|
import org.gcube.social_networking.socialnetworking.model.shared.NotificationType;
|
|
import org.gcube.social_networking.socialnetworking.model.shared.Post;
|
|
|
|
import javax.ws.rs.*;
|
|
import java.util.Map;
|
|
|
|
@Path("entities")
|
|
@ResourceGroup("Users & Apps APIs")
|
|
@ResourceLabel("Users & Apps APIs")
|
|
@RequestHeaders({
|
|
@RequestHeader( name = "Authorization", description = "Bearer token, see <a href=\"https://dev.d4science.org/how-to-access-resources\">https://dev.d4science.org/how-to-access-resources</a>")
|
|
})
|
|
public class Users {
|
|
|
|
@GET
|
|
@Path("users/{id}/posts")
|
|
@Produces({"application/json;charset=UTF-8", "application/vnd.api+json"})
|
|
public void getAllPostsByUser(@PathParam("id") String userid) {
|
|
|
|
}
|
|
|
|
@GET
|
|
@Path("apps/{id}/posts")
|
|
@Produces({"application/json;charset=UTF-8", "application/vnd.api+json"})
|
|
public void getAllPostsByApp(@PathParam("id") String appid) {
|
|
|
|
}
|
|
|
|
@GET
|
|
@Path("users/{id}/posts/comments")
|
|
@Produces({"application/json;charset=UTF-8", "application/vnd.api+json"})
|
|
public void getRecentCommentedPostsByUserAndDate(@PathParam("id") String userid, @QueryParam("time") long timeInMillis) {
|
|
|
|
}
|
|
|
|
@GET
|
|
@Path("users/{id}/posts")
|
|
@Produces({"application/json;charset=UTF-8", "application/vnd.api+json"})
|
|
public void getRecentPostsByUser(@PathParam("id") String userid, @QueryParam("limit") int limit) {
|
|
|
|
}
|
|
|
|
@GET
|
|
@Path("users/{id}/posts")
|
|
@Produces({"application/json;charset=UTF-8", "application/vnd.api+json"})
|
|
public void getRecentPostsByUser(@PathParam("id") String userid, @QueryParam("time") long timeInMillis) {
|
|
|
|
}
|
|
|
|
@PUT
|
|
@Path("users/{id}/notifications")
|
|
@Produces({"application/json;charset=UTF-8", "application/vnd.api+json"})
|
|
public void setAllNotificationReadByUser(@PathParam("id") String userid) {
|
|
|
|
}
|
|
|
|
@GET
|
|
@Path("users/{id}/notifications")
|
|
@Produces({"application/json;charset=UTF-8", "application/vnd.api+json"})
|
|
public void getUnreadNotificationsByUser(@PathParam("id") String userid) {
|
|
|
|
}
|
|
|
|
@GET
|
|
@Path("users/{id}/notificationchannels")
|
|
@Produces({"application/json;charset=UTF-8", "application/vnd.api+json"})
|
|
public void getUserNotificationChannels(@PathParam("id") String userid, @QueryParam("type") NotificationType notificationType) {
|
|
|
|
}
|
|
|
|
@PUT
|
|
@Path("users/{id}/notificationpreferences")
|
|
@Produces({"application/json;charset=UTF-8", "application/vnd.api+json"})
|
|
@Consumes({"application/json;charset=UTF-8", "application/vnd.api+json"})
|
|
public void setUserNotificationPreferences(@PathParam("id") String userid, Map<NotificationType, NotificationChannelType[]> enabledChannels) {
|
|
|
|
}
|
|
|
|
@GET
|
|
@Path("users/{id}/notificationpreferences")
|
|
@Produces({"application/json;charset=UTF-8", "application/vnd.api+json"})
|
|
public void getUserNotificationPreferences(@PathParam("id") String userid) {
|
|
|
|
}
|
|
|
|
@GET
|
|
@Path("users/{id}/comments")
|
|
@Produces({"application/json;charset=UTF-8", "application/vnd.api+json"})
|
|
public void getRecentCommentsByUserAndDate(@PathParam("id") String userid, @QueryParam("time") long timeInMillis) {
|
|
|
|
}
|
|
|
|
@GET
|
|
@Path("users/{id}/likes")
|
|
@Produces({"application/json;charset=UTF-8", "application/vnd.api+json"})
|
|
public void getAllLikedPostIdsByUser(@PathParam("id") String userid) {
|
|
|
|
}
|
|
|
|
@GET
|
|
@Path("users/{id}/likes")
|
|
@Produces({"application/json;charset=UTF-8", "application/vnd.api+json"})
|
|
public void getAllLikedPostsByUser(@PathParam("id") String userid, @QueryParam("limit") int limit) {
|
|
|
|
}
|
|
|
|
@GET
|
|
@Path("users/{id}/posts/likes")
|
|
@Produces({"application/json;charset=UTF-8", "application/vnd.api+json"})
|
|
public void getRecentLikedPostsByUserAndDate(@PathParam("id") String userid, @QueryParam("time") long timeInMillis) {
|
|
|
|
}
|
|
|
|
@GET
|
|
@Path("users/{id}/notifications")
|
|
@Produces({"application/json;charset=UTF-8", "application/vnd.api+json"})
|
|
public void getAllNotificationByUser(@PathParam("id") String userid, @QueryParam("limit") int limit) {
|
|
|
|
}
|
|
|
|
@GET
|
|
@Path("users/{id}/notifications")
|
|
@Produces({"application/json;charset=UTF-8", "application/vnd.api+json"})
|
|
public void getRangeNotificationsByUser(@PathParam("id") String userid, @QueryParam("limit") int limit, @QueryParam("from") int from) {
|
|
|
|
}
|
|
|
|
@GET
|
|
@Path("users/{id}/notifications/unread")
|
|
@Produces({"application/json;charset=UTF-8", "application/vnd.api+json"})
|
|
public void checkUnreadNotifications(@PathParam("id") String userid) {
|
|
|
|
}
|
|
|
|
@GET
|
|
@Path("users/{id}/notifications/unread/messages")
|
|
@Produces({"application/json;charset=UTF-8", "application/vnd.api+json"})
|
|
public void checkUnreadMessagesNotifications(@PathParam("id") String userid) {
|
|
|
|
}
|
|
}
|