@matheusdev20/hc-lib
v0.1.7
Published
An typescript library to implement common function and utilities for Help Center development
Readme
@matheusdev20/hc-lib
Utility library for Zendesk Help Center development. Supports both v3 and v4 Help Center versions through a single factory method.
CDN Usage
Add the script tag to your Help Center template:
<script src="https://cdn.example.com/hc-utilities-kit/index.global.js"></script>This exposes the global AktieHC object.
Instantiating
Call AktieHC.create() with the Help Center version:
<script>
// For Help Center v3
const hc = AktieHC.create("v3");
// For Help Center v4
const hc = AktieHC.create("v4");
// Bring API utilities like getArticles()
const hc = AktieHC.create("v4", ["articles"]);
</script>The returned hc object has the same interface regardless of version — the implementation details are handled internally.
Available Methods
const hc = AktieHC.create("v4", ["articles"]);
const { api } = hc
const response = hc.articles.getAll(page = 4)