Class AbstractApi

    • Method Summary

      Modifier and Type Method Description
      protected void addFormParam​(javax.ws.rs.core.Form formData, String name, Object value)
      Convenience method for adding query and form parameters to a get() or post() call.
      protected void addFormParam​(javax.ws.rs.core.Form formData, String name, Object value, boolean required)
      Convenience method for adding query and form parameters to a get() or post() call.
      protected javax.ws.rs.core.Response delete​(javax.ws.rs.core.Response.Status expectedStatus, javax.ws.rs.core.MultivaluedMap<String,​String> queryParams, Object... pathArgs)
      Perform an HTTP DELETE call with the specified form data and path objects, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response delete​(javax.ws.rs.core.Response.Status expectedStatus, javax.ws.rs.core.MultivaluedMap<String,​String> queryParams, URL url)
      Perform an HTTP DELETE call with the specified form data and URL, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response get​(javax.ws.rs.core.Response.Status expectedStatus, javax.ws.rs.core.MultivaluedMap<String,​String> queryParams, Object... pathArgs)
      Perform an HTTP GET call with the specified query parameters and path objects, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response get​(javax.ws.rs.core.Response.Status expectedStatus, javax.ws.rs.core.MultivaluedMap<String,​String> queryParams, URL url)
      Perform an HTTP GET call with the specified query parameters and URL, returning a ClientResponse instance with the data returned from the endpoint.
      protected GitLabApiClient getApiClient()  
      protected GitLabApi.ApiVersion getApiVersion()  
      protected int getDefaultPerPage()  
      protected javax.ws.rs.core.MultivaluedMap<String,​String> getDefaultPerPageParam()
      Creates a MultivaluedMap instance containing the "per_page" param with the default value.
      protected javax.ws.rs.core.MultivaluedMap<String,​String> getDefaultPerPageParam​(boolean customAttributesEnabled)
      Creates a MultivaluedMap instance containing the "per_page" param with the default value.
      Object getGroupIdOrPath​(Object obj)
      Returns the group ID or path from the provided Integer, String, or Group instance.
      protected javax.ws.rs.core.MultivaluedMap<String,​String> getPageQueryParams​(int page, int perPage)
      Creates a MultivaluedMap instance containing "page" and "per_page" params.
      protected javax.ws.rs.core.MultivaluedMap<String,​String> getPageQueryParams​(int page, int perPage, boolean customAttributesEnabled)
      Creates a MultivaluedMap instance containing "page" and "per_page" params.
      protected javax.ws.rs.core.MultivaluedMap<String,​String> getPerPageQueryParam​(int perPage)
      Creates a MultivaluedMap instance containing the "per_page" param.
      Object getProjectIdOrPath​(Object obj)
      Returns the project ID or path from the provided Integer, String, or Project instance.
      Object getUserIdOrUsername​(Object obj)
      Returns the user ID or path from the provided Integer, String, or User instance.
      protected javax.ws.rs.core.Response getWithAccepts​(javax.ws.rs.core.Response.Status expectedStatus, javax.ws.rs.core.MultivaluedMap<String,​String> queryParams, String accepts, Object... pathArgs)
      Perform an HTTP GET call with the specified query parameters and path objects, returning a ClientResponse instance with the data returned from the endpoint.
      protected GitLabApiException handle​(Exception thrown)
      Wraps an exception in a GitLabApiException if needed.
      protected javax.ws.rs.core.Response head​(javax.ws.rs.core.Response.Status expectedStatus, javax.ws.rs.core.MultivaluedMap<String,​String> queryParams, Object... pathArgs)
      Perform an HTTP HEAD call with the specified query parameters and path objects, returning a ClientResponse instance with the data returned from the endpoint.
      protected boolean isApiVersion​(GitLabApi.ApiVersion apiVersion)  
      protected javax.ws.rs.core.Response post​(javax.ws.rs.core.Response.Status expectedStatus, Object payload, Object... pathArgs)
      Perform an HTTP POST call with the specified payload object and path objects, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response post​(javax.ws.rs.core.Response.Status expectedStatus, javax.ws.rs.core.Form formData, Object... pathArgs)
      Perform an HTTP POST call with the specified form data and path objects, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response post​(javax.ws.rs.core.Response.Status expectedStatus, javax.ws.rs.core.Form formData, URL url)
      Perform an HTTP POST call with the specified form data and URL, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response post​(javax.ws.rs.core.Response.Status expectedStatus, javax.ws.rs.core.MultivaluedMap<String,​String> queryParams, Object... pathArgs)
      Perform an HTTP POST call with the specified form data and path objects, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response post​(javax.ws.rs.core.Response.Status expectedStatus, javax.ws.rs.core.StreamingOutput stream, String mediaType, Object... pathArgs)
      Perform an HTTP POST call with the specified payload object and path objects, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response put​(javax.ws.rs.core.Response.Status expectedStatus, javax.ws.rs.core.MultivaluedMap<String,​String> queryParams, Object... pathArgs)
      Perform an HTTP PUT call with the specified form data and path objects, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response put​(javax.ws.rs.core.Response.Status expectedStatus, javax.ws.rs.core.MultivaluedMap<String,​String> queryParams, URL url)
      Perform an HTTP PUT call with the specified form data and URL, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response putUpload​(javax.ws.rs.core.Response.Status expectedStatus, String name, File fileToUpload, Object... pathArgs)
      Perform a file upload using the HTTP PUT method with the specified File instance and path objects, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response putUpload​(javax.ws.rs.core.Response.Status expectedStatus, String name, File fileToUpload, URL url)
      Perform a file upload using the HTTP PUT method with the specified File instance and path objects, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response putWithFormData​(javax.ws.rs.core.Response.Status expectedStatus, javax.ws.rs.core.Form formData, Object... pathArgs)
      Perform an HTTP PUT call with the specified form data and path objects, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response upload​(javax.ws.rs.core.Response.Status expectedStatus, String name, File fileToUpload, String mediaType, Object... pathArgs)
      Perform a file upload with the specified File instance and path objects, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response upload​(javax.ws.rs.core.Response.Status expectedStatus, String name, File fileToUpload, String mediaType, URL url)
      Perform a file upload with the specified File instance and path objects, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response upload​(javax.ws.rs.core.Response.Status expectedStatus, String name, File fileToUpload, String mediaType, javax.ws.rs.core.Form formData, URL url)
      Perform a file upload with the specified File instance and path objects, returning a ClientResponse instance with the data returned from the endpoint.
      protected String urlEncode​(String s)
      Encode a string to be used as in-path argument for a gitlab api request.
      protected javax.ws.rs.core.Response validate​(javax.ws.rs.core.Response response, javax.ws.rs.core.Response.Status expected)
      Validates response the response from the server against the expected HTTP status and the returned secret token, if either is not correct will throw a GitLabApiException.
    • Constructor Detail

      • AbstractApi

        public AbstractApi​(GitLabApi gitLabApi)
    • Method Detail

      • getProjectIdOrPath

        public Object getProjectIdOrPath​(Object obj)
                                  throws GitLabApiException
        Returns the project ID or path from the provided Integer, String, or Project instance.
        Parameters:
        obj - the object to determine the ID or path from
        Returns:
        the project ID or path from the provided Integer, String, or Project instance
        Throws:
        GitLabApiException - if any exception occurs during execution
      • getGroupIdOrPath

        public Object getGroupIdOrPath​(Object obj)
                                throws GitLabApiException
        Returns the group ID or path from the provided Integer, String, or Group instance.
        Parameters:
        obj - the object to determine the ID or path from
        Returns:
        the group ID or path from the provided Integer, String, or Group instance
        Throws:
        GitLabApiException - if any exception occurs during execution
      • getUserIdOrUsername

        public Object getUserIdOrUsername​(Object obj)
                                   throws GitLabApiException
        Returns the user ID or path from the provided Integer, String, or User instance.
        Parameters:
        obj - the object to determine the ID or username from
        Returns:
        the user ID or username from the provided Integer, String, or User instance
        Throws:
        GitLabApiException - if any exception occurs during execution
      • getDefaultPerPage

        protected int getDefaultPerPage()
      • urlEncode

        protected String urlEncode​(String s)
                            throws GitLabApiException
        Encode a string to be used as in-path argument for a gitlab api request. Standard URL encoding changes spaces to plus signs, but for arguments that are part of the path, like the :file_path in a "Get raw file" request, gitlab expects spaces to be encoded with %20.
        Parameters:
        s - the string to encode
        Returns:
        encoded version of s with spaces encoded as %2F
        Throws:
        GitLabApiException - if encoding throws an exception
      • get

        protected javax.ws.rs.core.Response get​(javax.ws.rs.core.Response.Status expectedStatus,
                                                javax.ws.rs.core.MultivaluedMap<String,​String> queryParams,
                                                Object... pathArgs)
                                         throws GitLabApiException
        Perform an HTTP GET call with the specified query parameters and path objects, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        expectedStatus - the HTTP status that should be returned from the server
        queryParams - multivalue map of request parameters
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        GitLabApiException - if any exception occurs during execution
      • getWithAccepts

        protected javax.ws.rs.core.Response getWithAccepts​(javax.ws.rs.core.Response.Status expectedStatus,
                                                           javax.ws.rs.core.MultivaluedMap<String,​String> queryParams,
                                                           String accepts,
                                                           Object... pathArgs)
                                                    throws GitLabApiException
        Perform an HTTP GET call with the specified query parameters and path objects, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        expectedStatus - the HTTP status that should be returned from the server
        queryParams - multivalue map of request parameters
        accepts - if non-empty will set the Accepts header to this value
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        GitLabApiException - if any exception occurs during execution
      • get

        protected javax.ws.rs.core.Response get​(javax.ws.rs.core.Response.Status expectedStatus,
                                                javax.ws.rs.core.MultivaluedMap<String,​String> queryParams,
                                                URL url)
                                         throws GitLabApiException
        Perform an HTTP GET call with the specified query parameters and URL, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        expectedStatus - the HTTP status that should be returned from the server
        queryParams - multivalue map of request parameters
        url - the fully formed path to the GitLab API endpoint
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        GitLabApiException - if any exception occurs during execution
      • head

        protected javax.ws.rs.core.Response head​(javax.ws.rs.core.Response.Status expectedStatus,
                                                 javax.ws.rs.core.MultivaluedMap<String,​String> queryParams,
                                                 Object... pathArgs)
                                          throws GitLabApiException
        Perform an HTTP HEAD call with the specified query parameters and path objects, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        expectedStatus - the HTTP status that should be returned from the server
        queryParams - multivalue map of request parameters
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        GitLabApiException - if any exception occurs during execution
      • post

        protected javax.ws.rs.core.Response post​(javax.ws.rs.core.Response.Status expectedStatus,
                                                 javax.ws.rs.core.Form formData,
                                                 Object... pathArgs)
                                          throws GitLabApiException
        Perform an HTTP POST call with the specified form data and path objects, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        expectedStatus - the HTTP status that should be returned from the server
        formData - the Form containing the name/value pairs for the POST data
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        GitLabApiException - if any exception occurs during execution
      • post

        protected javax.ws.rs.core.Response post​(javax.ws.rs.core.Response.Status expectedStatus,
                                                 Object payload,
                                                 Object... pathArgs)
                                          throws GitLabApiException
        Perform an HTTP POST call with the specified payload object and path objects, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        expectedStatus - the HTTP status that should be returned from the server
        payload - the object instance that will be serialized to JSON and used as the POST data
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        GitLabApiException - if any exception occurs during execution
      • post

        protected javax.ws.rs.core.Response post​(javax.ws.rs.core.Response.Status expectedStatus,
                                                 javax.ws.rs.core.StreamingOutput stream,
                                                 String mediaType,
                                                 Object... pathArgs)
                                          throws GitLabApiException
        Perform an HTTP POST call with the specified payload object and path objects, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        expectedStatus - the HTTP status that should be returned from the server
        stream - the StreamingOutput that will be used for the POST data
        mediaType - the content-type for the streamed data
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        GitLabApiException - if any exception occurs during execution
      • post

        protected javax.ws.rs.core.Response post​(javax.ws.rs.core.Response.Status expectedStatus,
                                                 javax.ws.rs.core.MultivaluedMap<String,​String> queryParams,
                                                 Object... pathArgs)
                                          throws GitLabApiException
        Perform an HTTP POST call with the specified form data and path objects, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        expectedStatus - the HTTP status that should be returned from the server
        queryParams - multivalue map of request parameters
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        GitLabApiException - if any exception occurs during execution
      • post

        protected javax.ws.rs.core.Response post​(javax.ws.rs.core.Response.Status expectedStatus,
                                                 javax.ws.rs.core.Form formData,
                                                 URL url)
                                          throws GitLabApiException
        Perform an HTTP POST call with the specified form data and URL, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        expectedStatus - the HTTP status that should be returned from the server
        formData - the Form containing the name/value pairs for the POST data
        url - the fully formed path to the GitLab API endpoint
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        GitLabApiException - if any exception occurs during execution
      • upload

        protected javax.ws.rs.core.Response upload​(javax.ws.rs.core.Response.Status expectedStatus,
                                                   String name,
                                                   File fileToUpload,
                                                   String mediaType,
                                                   Object... pathArgs)
                                            throws GitLabApiException
        Perform a file upload with the specified File instance and path objects, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        expectedStatus - the HTTP status that should be returned from the server
        name - the name for the form field that contains the file name
        fileToUpload - a File instance pointing to the file to upload
        mediaType - the content-type of the uploaded file, if null will be determined from fileToUpload
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        GitLabApiException - if any exception occurs during execution
      • upload

        protected javax.ws.rs.core.Response upload​(javax.ws.rs.core.Response.Status expectedStatus,
                                                   String name,
                                                   File fileToUpload,
                                                   String mediaType,
                                                   URL url)
                                            throws GitLabApiException
        Perform a file upload with the specified File instance and path objects, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        expectedStatus - the HTTP status that should be returned from the server
        name - the name for the form field that contains the file name
        fileToUpload - a File instance pointing to the file to upload
        mediaType - the content-type of the uploaded file, if null will be determined from fileToUpload
        url - the fully formed path to the GitLab API endpoint
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        GitLabApiException - if any exception occurs during execution
      • upload

        protected javax.ws.rs.core.Response upload​(javax.ws.rs.core.Response.Status expectedStatus,
                                                   String name,
                                                   File fileToUpload,
                                                   String mediaType,
                                                   javax.ws.rs.core.Form formData,
                                                   URL url)
                                            throws GitLabApiException
        Perform a file upload with the specified File instance and path objects, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        expectedStatus - the HTTP status that should be returned from the server
        name - the name for the form field that contains the file name
        fileToUpload - a File instance pointing to the file to upload
        mediaType - the content-type of the uploaded file, if null will be determined from fileToUpload
        formData - the Form containing the name/value pairs
        url - the fully formed path to the GitLab API endpoint
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        GitLabApiException - if any exception occurs during execution
      • put

        protected javax.ws.rs.core.Response put​(javax.ws.rs.core.Response.Status expectedStatus,
                                                javax.ws.rs.core.MultivaluedMap<String,​String> queryParams,
                                                Object... pathArgs)
                                         throws GitLabApiException
        Perform an HTTP PUT call with the specified form data and path objects, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        expectedStatus - the HTTP status that should be returned from the server
        queryParams - multivalue map of request parameters
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        GitLabApiException - if any exception occurs during execution
      • put

        protected javax.ws.rs.core.Response put​(javax.ws.rs.core.Response.Status expectedStatus,
                                                javax.ws.rs.core.MultivaluedMap<String,​String> queryParams,
                                                URL url)
                                         throws GitLabApiException
        Perform an HTTP PUT call with the specified form data and URL, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        expectedStatus - the HTTP status that should be returned from the server
        queryParams - multivalue map of request parameters
        url - the fully formed path to the GitLab API endpoint
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        GitLabApiException - if any exception occurs during execution
      • putWithFormData

        protected javax.ws.rs.core.Response putWithFormData​(javax.ws.rs.core.Response.Status expectedStatus,
                                                            javax.ws.rs.core.Form formData,
                                                            Object... pathArgs)
                                                     throws GitLabApiException
        Perform an HTTP PUT call with the specified form data and path objects, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        expectedStatus - the HTTP status that should be returned from the server
        formData - the Form containing the name/value pairs for the POST data
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        GitLabApiException - if any exception occurs during execution
      • putUpload

        protected javax.ws.rs.core.Response putUpload​(javax.ws.rs.core.Response.Status expectedStatus,
                                                      String name,
                                                      File fileToUpload,
                                                      Object... pathArgs)
                                               throws GitLabApiException
        Perform a file upload using the HTTP PUT method with the specified File instance and path objects, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        expectedStatus - the HTTP status that should be returned from the server
        name - the name for the form field that contains the file name
        fileToUpload - a File instance pointing to the file to upload
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        GitLabApiException - if any exception occurs during execution
      • putUpload

        protected javax.ws.rs.core.Response putUpload​(javax.ws.rs.core.Response.Status expectedStatus,
                                                      String name,
                                                      File fileToUpload,
                                                      URL url)
                                               throws GitLabApiException
        Perform a file upload using the HTTP PUT method with the specified File instance and path objects, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        expectedStatus - the HTTP status that should be returned from the server
        name - the name for the form field that contains the file name
        fileToUpload - a File instance pointing to the file to upload
        url - the fully formed path to the GitLab API endpoint
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        GitLabApiException - if any exception occurs during execution
      • delete

        protected javax.ws.rs.core.Response delete​(javax.ws.rs.core.Response.Status expectedStatus,
                                                   javax.ws.rs.core.MultivaluedMap<String,​String> queryParams,
                                                   Object... pathArgs)
                                            throws GitLabApiException
        Perform an HTTP DELETE call with the specified form data and path objects, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        expectedStatus - the HTTP status that should be returned from the server
        queryParams - multivalue map of request parameters
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        GitLabApiException - if any exception occurs during execution
      • delete

        protected javax.ws.rs.core.Response delete​(javax.ws.rs.core.Response.Status expectedStatus,
                                                   javax.ws.rs.core.MultivaluedMap<String,​String> queryParams,
                                                   URL url)
                                            throws GitLabApiException
        Perform an HTTP DELETE call with the specified form data and URL, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        expectedStatus - the HTTP status that should be returned from the server
        queryParams - multivalue map of request parameters
        url - the fully formed path to the GitLab API endpoint
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        GitLabApiException - if any exception occurs during execution
      • addFormParam

        protected void addFormParam​(javax.ws.rs.core.Form formData,
                                    String name,
                                    Object value)
                             throws IllegalArgumentException
        Convenience method for adding query and form parameters to a get() or post() call.
        Parameters:
        formData - the Form containing the name/value pairs
        name - the name of the field/attribute to add
        value - the value of the field/attribute to add
        Throws:
        IllegalArgumentException
      • addFormParam

        protected void addFormParam​(javax.ws.rs.core.Form formData,
                                    String name,
                                    Object value,
                                    boolean required)
                             throws IllegalArgumentException
        Convenience method for adding query and form parameters to a get() or post() call. If required is true and value is null, will throw an IllegalArgumentException.
        Parameters:
        formData - the Form containing the name/value pairs
        name - the name of the field/attribute to add
        value - the value of the field/attribute to add
        required - the field is required flag
        Throws:
        IllegalArgumentException - if a required parameter is null or empty
      • validate

        protected javax.ws.rs.core.Response validate​(javax.ws.rs.core.Response response,
                                                     javax.ws.rs.core.Response.Status expected)
                                              throws GitLabApiException
        Validates response the response from the server against the expected HTTP status and the returned secret token, if either is not correct will throw a GitLabApiException.
        Parameters:
        response - response
        expected - expected response status
        Returns:
        original response if the response status is expected
        Throws:
        GitLabApiException - if HTTP status is not as expected, or the secret token doesn't match
      • handle

        protected GitLabApiException handle​(Exception thrown)
        Wraps an exception in a GitLabApiException if needed.
        Parameters:
        thrown - the exception that should be wrapped
        Returns:
        either the untouched GitLabApiException or a new GitLabApiExceptin wrapping a non-GitLabApiException
      • getPerPageQueryParam

        protected javax.ws.rs.core.MultivaluedMap<String,​String> getPerPageQueryParam​(int perPage)
        Creates a MultivaluedMap instance containing the "per_page" param.
        Parameters:
        perPage - the number of projects per page
        Returns:
        a MultivaluedMap instance containing the "per_page" param
      • getPageQueryParams

        protected javax.ws.rs.core.MultivaluedMap<String,​String> getPageQueryParams​(int page,
                                                                                          int perPage)
        Creates a MultivaluedMap instance containing "page" and "per_page" params.
        Parameters:
        page - the page to get
        perPage - the number of projects per page
        Returns:
        a MultivaluedMap instance containing "page" and "per_page" params
      • getPageQueryParams

        protected javax.ws.rs.core.MultivaluedMap<String,​String> getPageQueryParams​(int page,
                                                                                          int perPage,
                                                                                          boolean customAttributesEnabled)
        Creates a MultivaluedMap instance containing "page" and "per_page" params.
        Parameters:
        page - the page to get
        perPage - the number of projects per page
        customAttributesEnabled - enables customAttributes for this query
        Returns:
        a MultivaluedMap instance containing "page" and "per_page" params
      • getDefaultPerPageParam

        protected javax.ws.rs.core.MultivaluedMap<String,​String> getDefaultPerPageParam()
        Creates a MultivaluedMap instance containing the "per_page" param with the default value.
        Returns:
        a MultivaluedMap instance containing the "per_page" param with the default value
      • getDefaultPerPageParam

        protected javax.ws.rs.core.MultivaluedMap<String,​String> getDefaultPerPageParam​(boolean customAttributesEnabled)
        Creates a MultivaluedMap instance containing the "per_page" param with the default value.
        Parameters:
        customAttributesEnabled - enables customAttributes for this query
        Returns:
        a MultivaluedMap instance containing the "per_page" param with the default value