Interface TagApi


  • @Path("/_matrix/client/r0/user")
    @Consumes("application/json")
    @Produces("application/json")
    public interface TagApi
    Users can add tags to rooms. Tags are short strings used to label rooms, e.g. "work", "family". A room may have multiple tags. Tags are only visible to the user that set them but are shared across all their devices.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  TagApi.Tag
      TagInfo special names.
    • Method Summary

      Modifier and Type Method Description
      void addTag​(String userId, String roomId, String tag, TagInfo tagData, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse, javax.ws.rs.core.SecurityContext securityContext)
      Add a tag to the room.
      void deleteTag​(String userId, String roomId, String tag, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse, javax.ws.rs.core.SecurityContext securityContext)
      Remove a tag from the room.
      void showTags​(String userId, String roomId, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse, javax.ws.rs.core.SecurityContext securityContext)
      List the tags set by a user on a room.
    • Method Detail

      • showTags

        @GET
        @Path("/{userId}/rooms/{roomId}/tags")
        void showTags​(@PathParam("userId")
                      String userId,
                      @PathParam("roomId")
                      String roomId,
                      @Context
                      javax.ws.rs.core.UriInfo uriInfo,
                      @Context
                      javax.ws.rs.core.HttpHeaders httpHeaders,
                      @Suspended
                      javax.ws.rs.container.AsyncResponse asyncResponse,
                      @Context
                      javax.ws.rs.core.SecurityContext securityContext)
        List the tags set by a user on a room.
        Requires auth: Yes.
        Return: Tags.

        Status code 200: The list of tags for the user for the room.

        Parameters:
        userId - Required. The id of the user to get tags for. The access token must be authorized to make requests for this user id.
        roomId - Required. The id of the room to get tags for.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
        securityContext - Security context.
      • addTag

        @PUT
        @Path("/{userId}/rooms/{roomId}/tags/{tag}")
        void addTag​(@PathParam("userId")
                    String userId,
                    @PathParam("roomId")
                    String roomId,
                    @PathParam("tag")
                    String tag,
                    TagInfo tagData,
                    @Context
                    javax.ws.rs.core.UriInfo uriInfo,
                    @Context
                    javax.ws.rs.core.HttpHeaders httpHeaders,
                    @Suspended
                    javax.ws.rs.container.AsyncResponse asyncResponse,
                    @Context
                    javax.ws.rs.core.SecurityContext securityContext)
        Add a tag to the room.
        Requires auth: Yes.
        Return: EmptyResponse.

        Status code 200: The tag was successfully added.

        Parameters:
        userId - Required. The id of the user to add a tag for. The access token must be authorized to make requests for this user id.
        roomId - Required. The id of the room to add a tag to.
        tag - Required. The tag to add.
        tagData - tag data.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
        securityContext - Security context.
      • deleteTag

        @DELETE
        @Path("/{userId}/rooms/{roomId}/tags/{tag}")
        void deleteTag​(@PathParam("userId")
                       String userId,
                       @PathParam("roomId")
                       String roomId,
                       @PathParam("tag")
                       String tag,
                       @Context
                       javax.ws.rs.core.UriInfo uriInfo,
                       @Context
                       javax.ws.rs.core.HttpHeaders httpHeaders,
                       @Suspended
                       javax.ws.rs.container.AsyncResponse asyncResponse,
                       @Context
                       javax.ws.rs.core.SecurityContext securityContext)
        Remove a tag from the room.
        Requires auth: Yes.
        Return: EmptyResponse.

        Status code 200: The tag was successfully removed.

        Parameters:
        userId - Required. The id of the user to remove a tag for. The access token must be authorized to make requests for this user id.
        roomId - Required. The id of the room to remove a tag from.
        tag - Required. The tag to remove.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
        securityContext - Security context.