Help Center

HelpCenter class encapsulates all the network requests and parsing logic involved in the Help Center API Endpoints. Use this class to access Categories, Sections and Articles.

The HelpCenter needs to be instantiated with the Help Center Url (String) and Locale (java.util.Locale).

import com.kayako.sdk.helpcenter.HelpCenter;

//...
HelpCenter mHelpCenter = new HelpCenter(HELP_CENTER_URL, LOCALE);

Sample Code Snippets:

import com.kayako.sdk.helpcenter.category.Category;

//...
List<Category> categories = mHelpCenter.getCategories(0, 10); 
import com.kayako.sdk.helpcenter.category.Category;
import com.kayako.sdk.helpcenter.base.ListCallback; // added in v1.0.0

//...
mHelpCenter.getCategories(0, 10, new ListCallback<Category>() {
    @Override
    public void onSuccess(List<Category> items) {
        // use categories
    }

    @Override
    public void onFailure(KayakoException exception) {
        // show error message
    }
});


Method Summary

Method Description
getCategories Retrieve list of Category resources
getSections Retrieve list of Section resources
getArticles Retrieve list of Article resources
getSearchArticles Retrieve list of searched Articles resources
getLocales Retrieve list of Locale resources

getCategories

Name Type Description
offset int Number of items to skip - use for pagination
limit int Number of items returned in one request
callback Callback (Optional) Provide for asynchronous requests

Retrieve list of Category resources


getSections

Name Type Description
categoryId long Id of the category of whose sections to retrieve
offset int Number of items to skip - use for pagination
limit int Number of items returned in one request
callback Callback (Optional) Provide for asynchronous requests

Retrieve list of Section resources


getArticles

Name Type Description
sectionId long Id of the section of whose articles to retrieve
offset int Number of items to skip - use for pagination
limit int Number of items returned in one request
callback Callback (Optional) Provide for asynchronous requests

Retrieve list of Article resources


getSearchArticles

Name Type Description
query String Query to filter articles
offset int Number of items to skip - use for pagination
limit int Number of items returned in one request
callback Callback (Optional) Provide for asynchronous requests

Search for Article resources


getLocales

Name Type Description
callback Callback (Optional) Provide for asynchronous requests

Retrieve complete list of supported Locales