Package io.gitea.api

Class NotificationApi


  • public class NotificationApi
    extends java.lang.Object
    • Constructor Detail

      • NotificationApi

        public NotificationApi()
      • NotificationApi

        public NotificationApi​(ApiClient apiClient)
    • Method Detail

      • getApiClient

        public ApiClient getApiClient()
      • setApiClient

        public void setApiClient​(ApiClient apiClient)
      • notifyGetListCall

        public com.squareup.okhttp.Call notifyGetListCall​(java.lang.Boolean all,
                                                          java.util.List<java.lang.String> statusTypes,
                                                          java.util.List<java.lang.String> subjectType,
                                                          org.threeten.bp.OffsetDateTime since,
                                                          org.threeten.bp.OffsetDateTime before,
                                                          java.lang.Integer page,
                                                          java.lang.Integer limit,
                                                          ProgressResponseBody.ProgressListener progressListener,
                                                          ProgressRequestBody.ProgressRequestListener progressRequestListener)
                                                   throws ApiException
        Build call for notifyGetList
        Parameters:
        all - If true, show notifications marked as read. Default value is false (optional)
        statusTypes - Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned. (optional)
        subjectType - filter notifications by subject type (optional)
        since - Only show notifications updated after the given time. This is a timestamp in RFC 3339 format (optional)
        before - Only show notifications updated before the given time. This is a timestamp in RFC 3339 format (optional)
        page - page number of results to return (1-based) (optional)
        limit - page size of results (optional)
        progressListener - Progress listener
        progressRequestListener - Progress request listener
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • notifyGetList

        public java.util.List<NotificationThread> notifyGetList​(java.lang.Boolean all,
                                                                java.util.List<java.lang.String> statusTypes,
                                                                java.util.List<java.lang.String> subjectType,
                                                                org.threeten.bp.OffsetDateTime since,
                                                                org.threeten.bp.OffsetDateTime before,
                                                                java.lang.Integer page,
                                                                java.lang.Integer limit)
                                                         throws ApiException
        List users's notification threads
        Parameters:
        all - If true, show notifications marked as read. Default value is false (optional)
        statusTypes - Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned. (optional)
        subjectType - filter notifications by subject type (optional)
        since - Only show notifications updated after the given time. This is a timestamp in RFC 3339 format (optional)
        before - Only show notifications updated before the given time. This is a timestamp in RFC 3339 format (optional)
        page - page number of results to return (1-based) (optional)
        limit - page size of results (optional)
        Returns:
        List<NotificationThread>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • notifyGetListWithHttpInfo

        public ApiResponse<java.util.List<NotificationThread>> notifyGetListWithHttpInfo​(java.lang.Boolean all,
                                                                                         java.util.List<java.lang.String> statusTypes,
                                                                                         java.util.List<java.lang.String> subjectType,
                                                                                         org.threeten.bp.OffsetDateTime since,
                                                                                         org.threeten.bp.OffsetDateTime before,
                                                                                         java.lang.Integer page,
                                                                                         java.lang.Integer limit)
                                                                                  throws ApiException
        List users's notification threads
        Parameters:
        all - If true, show notifications marked as read. Default value is false (optional)
        statusTypes - Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned. (optional)
        subjectType - filter notifications by subject type (optional)
        since - Only show notifications updated after the given time. This is a timestamp in RFC 3339 format (optional)
        before - Only show notifications updated before the given time. This is a timestamp in RFC 3339 format (optional)
        page - page number of results to return (1-based) (optional)
        limit - page size of results (optional)
        Returns:
        ApiResponse<List<NotificationThread>>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • notifyGetListAsync

        public com.squareup.okhttp.Call notifyGetListAsync​(java.lang.Boolean all,
                                                           java.util.List<java.lang.String> statusTypes,
                                                           java.util.List<java.lang.String> subjectType,
                                                           org.threeten.bp.OffsetDateTime since,
                                                           org.threeten.bp.OffsetDateTime before,
                                                           java.lang.Integer page,
                                                           java.lang.Integer limit,
                                                           ApiCallback<java.util.List<NotificationThread>> callback)
                                                    throws ApiException
        List users's notification threads (asynchronously)
        Parameters:
        all - If true, show notifications marked as read. Default value is false (optional)
        statusTypes - Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned. (optional)
        subjectType - filter notifications by subject type (optional)
        since - Only show notifications updated after the given time. This is a timestamp in RFC 3339 format (optional)
        before - Only show notifications updated before the given time. This is a timestamp in RFC 3339 format (optional)
        page - page number of results to return (1-based) (optional)
        limit - page size of results (optional)
        callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • notifyGetRepoListCall

        public com.squareup.okhttp.Call notifyGetRepoListCall​(java.lang.String owner,
                                                              java.lang.String repo,
                                                              java.lang.Boolean all,
                                                              java.util.List<java.lang.String> statusTypes,
                                                              java.util.List<java.lang.String> subjectType,
                                                              org.threeten.bp.OffsetDateTime since,
                                                              org.threeten.bp.OffsetDateTime before,
                                                              java.lang.Integer page,
                                                              java.lang.Integer limit,
                                                              ProgressResponseBody.ProgressListener progressListener,
                                                              ProgressRequestBody.ProgressRequestListener progressRequestListener)
                                                       throws ApiException
        Build call for notifyGetRepoList
        Parameters:
        owner - owner of the repo (required)
        repo - name of the repo (required)
        all - If true, show notifications marked as read. Default value is false (optional)
        statusTypes - Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned (optional)
        subjectType - filter notifications by subject type (optional)
        since - Only show notifications updated after the given time. This is a timestamp in RFC 3339 format (optional)
        before - Only show notifications updated before the given time. This is a timestamp in RFC 3339 format (optional)
        page - page number of results to return (1-based) (optional)
        limit - page size of results (optional)
        progressListener - Progress listener
        progressRequestListener - Progress request listener
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • notifyGetRepoList

        public java.util.List<NotificationThread> notifyGetRepoList​(java.lang.String owner,
                                                                    java.lang.String repo,
                                                                    java.lang.Boolean all,
                                                                    java.util.List<java.lang.String> statusTypes,
                                                                    java.util.List<java.lang.String> subjectType,
                                                                    org.threeten.bp.OffsetDateTime since,
                                                                    org.threeten.bp.OffsetDateTime before,
                                                                    java.lang.Integer page,
                                                                    java.lang.Integer limit)
                                                             throws ApiException
        List users's notification threads on a specific repo
        Parameters:
        owner - owner of the repo (required)
        repo - name of the repo (required)
        all - If true, show notifications marked as read. Default value is false (optional)
        statusTypes - Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned (optional)
        subjectType - filter notifications by subject type (optional)
        since - Only show notifications updated after the given time. This is a timestamp in RFC 3339 format (optional)
        before - Only show notifications updated before the given time. This is a timestamp in RFC 3339 format (optional)
        page - page number of results to return (1-based) (optional)
        limit - page size of results (optional)
        Returns:
        List<NotificationThread>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • notifyGetRepoListWithHttpInfo

        public ApiResponse<java.util.List<NotificationThread>> notifyGetRepoListWithHttpInfo​(java.lang.String owner,
                                                                                             java.lang.String repo,
                                                                                             java.lang.Boolean all,
                                                                                             java.util.List<java.lang.String> statusTypes,
                                                                                             java.util.List<java.lang.String> subjectType,
                                                                                             org.threeten.bp.OffsetDateTime since,
                                                                                             org.threeten.bp.OffsetDateTime before,
                                                                                             java.lang.Integer page,
                                                                                             java.lang.Integer limit)
                                                                                      throws ApiException
        List users's notification threads on a specific repo
        Parameters:
        owner - owner of the repo (required)
        repo - name of the repo (required)
        all - If true, show notifications marked as read. Default value is false (optional)
        statusTypes - Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned (optional)
        subjectType - filter notifications by subject type (optional)
        since - Only show notifications updated after the given time. This is a timestamp in RFC 3339 format (optional)
        before - Only show notifications updated before the given time. This is a timestamp in RFC 3339 format (optional)
        page - page number of results to return (1-based) (optional)
        limit - page size of results (optional)
        Returns:
        ApiResponse<List<NotificationThread>>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • notifyGetRepoListAsync

        public com.squareup.okhttp.Call notifyGetRepoListAsync​(java.lang.String owner,
                                                               java.lang.String repo,
                                                               java.lang.Boolean all,
                                                               java.util.List<java.lang.String> statusTypes,
                                                               java.util.List<java.lang.String> subjectType,
                                                               org.threeten.bp.OffsetDateTime since,
                                                               org.threeten.bp.OffsetDateTime before,
                                                               java.lang.Integer page,
                                                               java.lang.Integer limit,
                                                               ApiCallback<java.util.List<NotificationThread>> callback)
                                                        throws ApiException
        List users's notification threads on a specific repo (asynchronously)
        Parameters:
        owner - owner of the repo (required)
        repo - name of the repo (required)
        all - If true, show notifications marked as read. Default value is false (optional)
        statusTypes - Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned (optional)
        subjectType - filter notifications by subject type (optional)
        since - Only show notifications updated after the given time. This is a timestamp in RFC 3339 format (optional)
        before - Only show notifications updated before the given time. This is a timestamp in RFC 3339 format (optional)
        page - page number of results to return (1-based) (optional)
        limit - page size of results (optional)
        callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • notifyGetThread

        public NotificationThread notifyGetThread​(java.lang.String id)
                                           throws ApiException
        Get notification thread by ID
        Parameters:
        id - id of notification thread (required)
        Returns:
        NotificationThread
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • notifyGetThreadWithHttpInfo

        public ApiResponse<NotificationThread> notifyGetThreadWithHttpInfo​(java.lang.String id)
                                                                    throws ApiException
        Get notification thread by ID
        Parameters:
        id - id of notification thread (required)
        Returns:
        ApiResponse<NotificationThread>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • notifyGetThreadAsync

        public com.squareup.okhttp.Call notifyGetThreadAsync​(java.lang.String id,
                                                             ApiCallback<NotificationThread> callback)
                                                      throws ApiException
        Get notification thread by ID (asynchronously)
        Parameters:
        id - id of notification thread (required)
        callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • notifyNewAvailable

        public NotificationCount notifyNewAvailable()
                                             throws ApiException
        Check if unread notifications exist
        Returns:
        NotificationCount
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • notifyNewAvailableWithHttpInfo

        public ApiResponse<NotificationCount> notifyNewAvailableWithHttpInfo()
                                                                      throws ApiException
        Check if unread notifications exist
        Returns:
        ApiResponse<NotificationCount>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • notifyNewAvailableAsync

        public com.squareup.okhttp.Call notifyNewAvailableAsync​(ApiCallback<NotificationCount> callback)
                                                         throws ApiException
        Check if unread notifications exist (asynchronously)
        Parameters:
        callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • notifyReadListCall

        public com.squareup.okhttp.Call notifyReadListCall​(org.threeten.bp.OffsetDateTime lastReadAt,
                                                           java.lang.String all,
                                                           java.util.List<java.lang.String> statusTypes,
                                                           java.lang.String toStatus,
                                                           ProgressResponseBody.ProgressListener progressListener,
                                                           ProgressRequestBody.ProgressRequestListener progressRequestListener)
                                                    throws ApiException
        Build call for notifyReadList
        Parameters:
        lastReadAt - Describes the last point that notifications were checked. Anything updated since this time will not be updated. (optional)
        all - If true, mark all notifications on this repo. Default value is false (optional)
        statusTypes - Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. (optional)
        toStatus - Status to mark notifications as, Defaults to read. (optional)
        progressListener - Progress listener
        progressRequestListener - Progress request listener
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • notifyReadList

        public java.util.List<NotificationThread> notifyReadList​(org.threeten.bp.OffsetDateTime lastReadAt,
                                                                 java.lang.String all,
                                                                 java.util.List<java.lang.String> statusTypes,
                                                                 java.lang.String toStatus)
                                                          throws ApiException
        Mark notification threads as read, pinned or unread
        Parameters:
        lastReadAt - Describes the last point that notifications were checked. Anything updated since this time will not be updated. (optional)
        all - If true, mark all notifications on this repo. Default value is false (optional)
        statusTypes - Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. (optional)
        toStatus - Status to mark notifications as, Defaults to read. (optional)
        Returns:
        List<NotificationThread>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • notifyReadListWithHttpInfo

        public ApiResponse<java.util.List<NotificationThread>> notifyReadListWithHttpInfo​(org.threeten.bp.OffsetDateTime lastReadAt,
                                                                                          java.lang.String all,
                                                                                          java.util.List<java.lang.String> statusTypes,
                                                                                          java.lang.String toStatus)
                                                                                   throws ApiException
        Mark notification threads as read, pinned or unread
        Parameters:
        lastReadAt - Describes the last point that notifications were checked. Anything updated since this time will not be updated. (optional)
        all - If true, mark all notifications on this repo. Default value is false (optional)
        statusTypes - Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. (optional)
        toStatus - Status to mark notifications as, Defaults to read. (optional)
        Returns:
        ApiResponse<List<NotificationThread>>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • notifyReadListAsync

        public com.squareup.okhttp.Call notifyReadListAsync​(org.threeten.bp.OffsetDateTime lastReadAt,
                                                            java.lang.String all,
                                                            java.util.List<java.lang.String> statusTypes,
                                                            java.lang.String toStatus,
                                                            ApiCallback<java.util.List<NotificationThread>> callback)
                                                     throws ApiException
        Mark notification threads as read, pinned or unread (asynchronously)
        Parameters:
        lastReadAt - Describes the last point that notifications were checked. Anything updated since this time will not be updated. (optional)
        all - If true, mark all notifications on this repo. Default value is false (optional)
        statusTypes - Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. (optional)
        toStatus - Status to mark notifications as, Defaults to read. (optional)
        callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • notifyReadRepoListCall

        public com.squareup.okhttp.Call notifyReadRepoListCall​(java.lang.String owner,
                                                               java.lang.String repo,
                                                               java.lang.String all,
                                                               java.util.List<java.lang.String> statusTypes,
                                                               java.lang.String toStatus,
                                                               org.threeten.bp.OffsetDateTime lastReadAt,
                                                               ProgressResponseBody.ProgressListener progressListener,
                                                               ProgressRequestBody.ProgressRequestListener progressRequestListener)
                                                        throws ApiException
        Build call for notifyReadRepoList
        Parameters:
        owner - owner of the repo (required)
        repo - name of the repo (required)
        all - If true, mark all notifications on this repo. Default value is false (optional)
        statusTypes - Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. (optional)
        toStatus - Status to mark notifications as. Defaults to read. (optional)
        lastReadAt - Describes the last point that notifications were checked. Anything updated since this time will not be updated. (optional)
        progressListener - Progress listener
        progressRequestListener - Progress request listener
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • notifyReadRepoList

        public java.util.List<NotificationThread> notifyReadRepoList​(java.lang.String owner,
                                                                     java.lang.String repo,
                                                                     java.lang.String all,
                                                                     java.util.List<java.lang.String> statusTypes,
                                                                     java.lang.String toStatus,
                                                                     org.threeten.bp.OffsetDateTime lastReadAt)
                                                              throws ApiException
        Mark notification threads as read, pinned or unread on a specific repo
        Parameters:
        owner - owner of the repo (required)
        repo - name of the repo (required)
        all - If true, mark all notifications on this repo. Default value is false (optional)
        statusTypes - Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. (optional)
        toStatus - Status to mark notifications as. Defaults to read. (optional)
        lastReadAt - Describes the last point that notifications were checked. Anything updated since this time will not be updated. (optional)
        Returns:
        List<NotificationThread>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • notifyReadRepoListWithHttpInfo

        public ApiResponse<java.util.List<NotificationThread>> notifyReadRepoListWithHttpInfo​(java.lang.String owner,
                                                                                              java.lang.String repo,
                                                                                              java.lang.String all,
                                                                                              java.util.List<java.lang.String> statusTypes,
                                                                                              java.lang.String toStatus,
                                                                                              org.threeten.bp.OffsetDateTime lastReadAt)
                                                                                       throws ApiException
        Mark notification threads as read, pinned or unread on a specific repo
        Parameters:
        owner - owner of the repo (required)
        repo - name of the repo (required)
        all - If true, mark all notifications on this repo. Default value is false (optional)
        statusTypes - Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. (optional)
        toStatus - Status to mark notifications as. Defaults to read. (optional)
        lastReadAt - Describes the last point that notifications were checked. Anything updated since this time will not be updated. (optional)
        Returns:
        ApiResponse<List<NotificationThread>>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • notifyReadRepoListAsync

        public com.squareup.okhttp.Call notifyReadRepoListAsync​(java.lang.String owner,
                                                                java.lang.String repo,
                                                                java.lang.String all,
                                                                java.util.List<java.lang.String> statusTypes,
                                                                java.lang.String toStatus,
                                                                org.threeten.bp.OffsetDateTime lastReadAt,
                                                                ApiCallback<java.util.List<NotificationThread>> callback)
                                                         throws ApiException
        Mark notification threads as read, pinned or unread on a specific repo (asynchronously)
        Parameters:
        owner - owner of the repo (required)
        repo - name of the repo (required)
        all - If true, mark all notifications on this repo. Default value is false (optional)
        statusTypes - Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. (optional)
        toStatus - Status to mark notifications as. Defaults to read. (optional)
        lastReadAt - Describes the last point that notifications were checked. Anything updated since this time will not be updated. (optional)
        callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • notifyReadThreadCall

        public com.squareup.okhttp.Call notifyReadThreadCall​(java.lang.String id,
                                                             java.lang.String toStatus,
                                                             ProgressResponseBody.ProgressListener progressListener,
                                                             ProgressRequestBody.ProgressRequestListener progressRequestListener)
                                                      throws ApiException
        Build call for notifyReadThread
        Parameters:
        id - id of notification thread (required)
        toStatus - Status to mark notifications as (optional, default to read)
        progressListener - Progress listener
        progressRequestListener - Progress request listener
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • notifyReadThread

        public NotificationThread notifyReadThread​(java.lang.String id,
                                                   java.lang.String toStatus)
                                            throws ApiException
        Mark notification thread as read by ID
        Parameters:
        id - id of notification thread (required)
        toStatus - Status to mark notifications as (optional, default to read)
        Returns:
        NotificationThread
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • notifyReadThreadWithHttpInfo

        public ApiResponse<NotificationThread> notifyReadThreadWithHttpInfo​(java.lang.String id,
                                                                            java.lang.String toStatus)
                                                                     throws ApiException
        Mark notification thread as read by ID
        Parameters:
        id - id of notification thread (required)
        toStatus - Status to mark notifications as (optional, default to read)
        Returns:
        ApiResponse<NotificationThread>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • notifyReadThreadAsync

        public com.squareup.okhttp.Call notifyReadThreadAsync​(java.lang.String id,
                                                              java.lang.String toStatus,
                                                              ApiCallback<NotificationThread> callback)
                                                       throws ApiException
        Mark notification thread as read by ID (asynchronously)
        Parameters:
        id - id of notification thread (required)
        toStatus - Status to mark notifications as (optional, default to read)
        callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object