Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
NodeJS client for HelpScout Docs API written in TypeScript
$ npm install docscout
import { listCollections } from 'docscout/collections'
const apiToken = process.env.HELPSCOUT_DOCS_API_TOKEN;
(async () => {
try {
const collectionsEnvelope = await listCollections(apiToken, { visibility: 'private', sort: 'createdAt', order: 'asc' });
console.log(JSON.stringify(collectionsEnvelope, null, 2));
} catch (error) {
console.error(error);
}
})();
The OOP Client has two subtle differences from the functional approach:
import DocscoutClient from 'docscout'
const apiToken = process.env.HELPSCOUT_DOCS_API_TOKEN;
(async () => {
try {
const docscoutClient = new DocscoutClient(apiToken);
const collections = await docscoutClient.listCollections({
visibility: 'private',
sort: 'createdAt',
order: 'desc'
});
console.log(JSON.stringify(collections, null, 2));
} catch (error) {
console.error(error);
}
})();
Version 1 of this client focuses on fetching data, i.e. the API Reads.
We'll happily welcome your PRs to improve this client.
listArticlesInCollection( apiToken: string, collectionId: string, options?: ListArticleOptions )
listArticlesInCategory( apiToken: string, categoryId: string, options?: ListArticleOptions )
searchArticles( apiToken: string, options: SearchArticlesOptions )
listRelatedArticles( apiToken: string, articleId: string, options?: ListRelatedArticlesOptions )
listRevisions( apiToken: string, articleId: string, options?: ListRevisionsOptions )
getArticle( apiToken: string, articleIdOrNumber: string | number, options?: GetArticleOptions )
getRevision( apiToken: string, revisionId: string )
createArticleAsset( apiToken: string, options: CreateArticleAssetOptions )
listCategories( apiToken: string, collectionId: string, options?: ListCategoriesOptions )
getCategory( apiToken: string, categoryIdOrNumber: string | number )
listCollections( apiToken: string, options?: ListCollectionsOptions )
getCollection( apiToken: string, collectionIdOrNumber: string | number )
listSites( apiToken: string, options?: ListSitesOptions )
Copyright (c) 2019 You Need A Budget, LLC
Licensed under the Apache-2.0 license
FAQs
NodeJS client for HelpScout Docs API
The npm package docscout receives a total of 4 weekly downloads. As such, docscout popularity was classified as not popular.
We found that docscout demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.