Interface HelpCenterService



  • public interface HelpCenterService
    Defines the operations that can be carried out on Help Center.

    For more information on the APIs available see: Help Center REST API Documentation

    Currently this is defined using retrofit annotations but this could be changed in the future as long as these signatures remain.

    Locale should be in the format of: "en" or "en-us", this is a requirement of the REST API being called.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      <any> deleteVote(java.lang.String authorization, java.lang.Long voteId)
      Deletes a vote
      <any> downvoteArticle(java.lang.String authorization, java.lang.Long articleId, java.lang.String body)
      Marks an article as unhelpful.
      <any> getArticle(java.lang.String authorization, java.lang.String locale, java.lang.Long articleId, java.lang.String sideLoadsToBeIncluded) 
      <any> getArticles(java.lang.String authorization, java.lang.String locale, java.lang.Long sectionId, java.lang.String sideLoadsToBeIncluded, int numberPerPage) 
      <any> getAttachments(java.lang.String authorization, java.lang.String locale, java.lang.Long articleId, java.lang.String attachmentType) 
      <any> getCategories(java.lang.String authorization, java.lang.String locale) 
      <any> getCategoryById(java.lang.String authorization, java.lang.String locale, java.lang.Long categoryId)
      Search for a category for a particular category Id.
      <any> getHelp(java.lang.String authorization, java.lang.String locale, java.lang.String categoryIds, java.lang.String sectionIds, java.lang.String sideLoadsToBeIncluded, int articlesPerSectionLimit, java.lang.String labelNames, int numberPerPage, java.lang.String sortBy, java.lang.String sortOrder) 
      <any> getSectionById(java.lang.String authorization, java.lang.String locale, java.lang.Long sectionId)
      Search for a section for a particular section Id.
      <any> getSections(java.lang.String authorization, java.lang.String locale, java.lang.Long categoryId, int numberPerPage) 
      <any> getSuggestedArticles(java.lang.String authorization, java.lang.String query, java.lang.String locale, java.lang.String labelNames, java.lang.Long category, java.lang.Long section)
      Gets a list of suggested articles.
      <any> listArticles(java.lang.String authorization, java.lang.String locale, java.lang.String labelNames, java.lang.String include, java.lang.String sortBy, java.lang.String sortOrder, java.lang.Integer page, java.lang.Integer resultsPerPage)
      Lists articles for the supplied query parameters
      <any> searchArticles(java.lang.String authorization, java.lang.String query, java.lang.String locale, java.lang.String include, java.lang.String labelNames, java.lang.String categoryIds, java.lang.String sectionIds, java.lang.Integer page, java.lang.Integer resultsPerPage)
      Searches for articles.
      <any> submitRecordArticleView(java.lang.String authorization, java.lang.Long articleId, java.lang.String locale, RecordArticleViewRequest recordArticleViewRequest)
      Submit a record article view.
      <any> upvoteArticle(java.lang.String authorization, java.lang.Long articleId, java.lang.String body)
      Marks an article as helpful.
    • Method Detail

      • getHelp

        <any> getHelp(java.lang.String authorization,
                      java.lang.String locale,
                      java.lang.String categoryIds,
                      java.lang.String sectionIds,
                      java.lang.String sideLoadsToBeIncluded,
                      int articlesPerSectionLimit,
                      java.lang.String labelNames,
                      int numberPerPage,
                      java.lang.String sortBy,
                      java.lang.String sortOrder)
      • getCategories

        <any> getCategories(java.lang.String authorization,
                            java.lang.String locale)
      • getSections

        <any> getSections(java.lang.String authorization,
                          java.lang.String locale,
                          java.lang.Long categoryId,
                          int numberPerPage)
      • getArticles

        <any> getArticles(java.lang.String authorization,
                          java.lang.String locale,
                          java.lang.Long sectionId,
                          java.lang.String sideLoadsToBeIncluded,
                          int numberPerPage)
      • listArticles

        <any> listArticles(java.lang.String authorization,
                           java.lang.String locale,
                           java.lang.String labelNames,
                           java.lang.String include,
                           java.lang.String sortBy,
                           java.lang.String sortOrder,
                           java.lang.Integer page,
                           java.lang.Integer resultsPerPage)
        Lists articles for the supplied query parameters
        Parameters:
        authorization - A bearer authorization header for access control, may be null for Help Centers that are not password protected
        labelNames - A comma-separated list of labels to restrict the search to. An article must have ALL of the labels specified in order to be matched
        locale - The locale to limit search results to.
        include - The comma-separated elements to sideload in the search
        sortBy - What the results will be sorted by.
        sortOrder - The order to display the results in
        page - The page to request
        resultsPerPage - The amount of results to display per page.
        Returns:
        The Call object for the API call, before it has been executed or enqueued.
        See Also:
        Sideloading
      • searchArticles

        <any> searchArticles(java.lang.String authorization,
                             java.lang.String query,
                             java.lang.String locale,
                             java.lang.String include,
                             java.lang.String labelNames,
                             java.lang.String categoryIds,
                             java.lang.String sectionIds,
                             java.lang.Integer page,
                             java.lang.Integer resultsPerPage)
        Searches for articles.
        Parameters:
        authorization - A bearer authorization header for access control, may be null for Help Centers that are not password protected
        query - The search query
        locale - The locale to limit search results to.
        include - The comma-separated elements to sideload in the search
        labelNames - A comma-separated list of labels to restrict the search to. An article must have ALL of the labels specified in order to be matched
        categoryIds - The IDs of the categories used to scope the search
        sectionIds - The IDs of the sections used to scope the search
        page - The page to request
        resultsPerPage - The amount of results to display per page.
        Returns:
        The Call object for the API call, before it has been executed or enqueued.
        See Also:
        Sideloading
      • getArticle

        <any> getArticle(java.lang.String authorization,
                         java.lang.String locale,
                         java.lang.Long articleId,
                         java.lang.String sideLoadsToBeIncluded)
      • getSectionById

        <any> getSectionById(java.lang.String authorization,
                             java.lang.String locale,
                             java.lang.Long sectionId)
        Search for a section for a particular section Id.
        Parameters:
        authorization - A bearer authorisation header
        locale - The locale to limit search results to.
        sectionId - The article ID to mark as helpful
        Returns:
        The Call object for the API call, before it has been executed or enqueued.
      • getCategoryById

        <any> getCategoryById(java.lang.String authorization,
                              java.lang.String locale,
                              java.lang.Long categoryId)
        Search for a category for a particular category Id.
        Parameters:
        authorization - A bearer authorisation header
        locale - The locale to limit search results to.
        categoryId - The category ID to mark as helpful
        Returns:
        The Call object for the API call, before it has been executed or enqueued.
      • getAttachments

        <any> getAttachments(java.lang.String authorization,
                             java.lang.String locale,
                             java.lang.Long articleId,
                             java.lang.String attachmentType)
      • upvoteArticle

        <any> upvoteArticle(java.lang.String authorization,
                            java.lang.Long articleId,
                            java.lang.String body)
        Marks an article as helpful.
        Parameters:
        authorization - A bearer authorisation header
        articleId - The article ID to mark as helpful
        body - The body of the request. This should be an empty json body '{}'
        Returns:
        The Call object for the API call, before it has been executed or enqueued.
        See Also:
        Creating votes
      • downvoteArticle

        <any> downvoteArticle(java.lang.String authorization,
                              java.lang.Long articleId,
                              java.lang.String body)
        Marks an article as unhelpful.
        Parameters:
        authorization - A bearer authorisation header
        articleId - The article ID to mark as unhelpful
        body - The body of the request. This should be an empty json body '{}'
        Returns:
        The Call object for the API call, before it has been executed or enqueued.
        See Also:
        Creating votes
      • deleteVote

        <any> deleteVote(java.lang.String authorization,
                         java.lang.Long voteId)
        Deletes a vote
        Parameters:
        authorization - A bearer authorisation header
        voteId - The ID of the vote to delete
        Returns:
        The Call object for the API call, before it has been executed or enqueued.
      • getSuggestedArticles

        <any> getSuggestedArticles(java.lang.String authorization,
                                   java.lang.String query,
                                   java.lang.String locale,
                                   java.lang.String labelNames,
                                   java.lang.Long category,
                                   java.lang.Long section)
        Gets a list of suggested articles.
        Parameters:
        authorization - A bearer authorisation header.
        query - The search query.
        locale - The locale to limit search results to.
        labelNames - A comma-separated list of labels to restrict the search to. An article must. have ALL of the labels specified in order to be matched.
        category - The id of the category used to scope the search.
        section - The id of the section used to scope the search.
        Returns:
        The Call object for the API call, before it has been executed or enqueued.
      • submitRecordArticleView

        <any> submitRecordArticleView(java.lang.String authorization,
                                      java.lang.Long articleId,
                                      java.lang.String locale,
                                      RecordArticleViewRequest recordArticleViewRequest)
        Submit a record article view.
        Parameters:
        authorization - A bearer authorisation header.
        articleId - The id of a viewed article.
        locale - The locale of the article.
        recordArticleViewRequest - An object holding information about last search query.
        Returns:
        The Call object for the API call, before it has been executed or enqueued.