Interface ProfileApi


  • @Path("/_matrix/client/r0/profile")
    @Consumes("application/json")
    @Produces("application/json")
    public interface ProfileApi
    Profiles.
    • Method Summary

      Modifier and Type Method Description
      void profile​(String userId, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Get the combined profile information for this user.
      void setAvatarUrl​(String userId, AvatarUrl avatarUrl, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse, javax.ws.rs.core.SecurityContext securityContext)
      This API sets the given user's avatar URL.
      void setDisplayName​(String userId, DisplayName displayName, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse, javax.ws.rs.core.SecurityContext securityContext)
      This API sets the given user's display name.
      void showAvatarUrl​(String userId, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Get the user's avatar URL.
      void showDisplayName​(String userId, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Get the user's display name.
    • Method Detail

      • setDisplayName

        @PUT
        @Path("/{userId}/displayname")
        void setDisplayName​(@PathParam("userId")
                            String userId,
                            DisplayName displayName,
                            @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)
        This API sets the given user's display name. You must have permission to set this user's display name, e.g. you need to have their access_token.
        Rate-limited: Yes.
        Requires auth: Yes.
        Return: EmptyResponse.

        Status code 200: The display name was set.

        Status code 429: This request was rate-limited.

        Parameters:
        userId - Required. The user whose display name to set.
        displayName - JSON body request.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
        securityContext - Security context.
      • showDisplayName

        @GET
        @Path("/{userId}/displayname")
        void showDisplayName​(@PathParam("userId")
                             String userId,
                             @Context
                             javax.ws.rs.core.UriInfo uriInfo,
                             @Context
                             javax.ws.rs.core.HttpHeaders httpHeaders,
                             @Suspended
                             javax.ws.rs.container.AsyncResponse asyncResponse)
        Get the user's display name. This API may be used to fetch the user's own displayname or to query the name of other users; either locally or on remote homeservers.
        Return: DisplayName.

        Status code 200: The display name for this user.

        Status code 404: There is no display name for this user or this user does not exist.

        Parameters:
        userId - Required. The user whose display name to get.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • setAvatarUrl

        @PUT
        @Path("/{userId}/avatar_url")
        void setAvatarUrl​(@PathParam("userId")
                          String userId,
                          AvatarUrl avatarUrl,
                          @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)
        This API sets the given user's avatar URL. You must have permission to set this user's avatar URL, e.g. you need to have their access_token.
        Rate-limited: Yes.
        Requires auth: Yes.
        Return: EmptyResponse.

        Status code 200: The avatar URL was set.

        Status code 429: This request was rate-limited.

        Parameters:
        userId - Required. The user whose avatar URL to set.
        avatarUrl - JSON body request.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
        securityContext - Security context.
      • showAvatarUrl

        @GET
        @Path("/{userId}/avatar_url")
        void showAvatarUrl​(@PathParam("userId")
                           String userId,
                           @Context
                           javax.ws.rs.core.UriInfo uriInfo,
                           @Context
                           javax.ws.rs.core.HttpHeaders httpHeaders,
                           @Suspended
                           javax.ws.rs.container.AsyncResponse asyncResponse)
        Get the user's avatar URL. This API may be used to fetch the user's own avatar URL or to query the URL of other users; either locally or on remote homeservers.
        Return: AvatarUrl.

        Status code 200: The avatar URL for this user.

        Status code 404: There is no avatar URL for this user or this user does not exist.

        Parameters:
        userId - Required. The user whose avatar URL to get.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • profile

        @GET
        @Path("/{userId}")
        void profile​(@PathParam("userId")
                     String userId,
                     @Context
                     javax.ws.rs.core.UriInfo uriInfo,
                     @Context
                     javax.ws.rs.core.HttpHeaders httpHeaders,
                     @Suspended
                     javax.ws.rs.container.AsyncResponse asyncResponse)
        Get the combined profile information for this user. This API may be used to fetch the user's own profile information or other users; either locally or on remote homeservers. This API may return keys which are not limited to displayname or avatar_url.
        Return: Profile.

        Status code 200: The avatar URL for this user.

        Status code 404: There is no profile information for this user or this user does not exist.

        Parameters:
        userId - Required. The user whose profile information to get.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.