helpjuice
Helpjuice API wrapper
https://help.helpjuice.com/en_US/api-v3/api-v3
Overview
Version 3 of the Helpjuice API is structured around REST, HTTP, and JSON. API endpoint URLs are organized around resources, such as users or articles. It uses HTTP methods for indicating the action to take on a resource, and HTTP status codes for expressing error statues. Resources are represented in JSON following a conventional schema.
Subpackages
Submodules
Package Contents
Classes
Helpjuice Client. |
- class helpjuice.Client(account, api_key, v='v3', timeout=5, total=5, backoff_factor=30)
Bases:
requests.SessionHelpjuice Client.
Constructs a
requests.Sessionfor Helpjuice API requests with authorization, base URL, request timeouts, and request retries.- Parameters
account (str) – Helpjuice base address subdomain.
api_key (str) – Helpjuice API key.
version (str, optional) – Helpjuice API version. Defaults to “v3”.
timeout (int, optional) –
TimeoutHTTPAdaptertimeout value. Defaults to 5.total (int, optional) –
Retrytotal value. Defaults to 5.backoff_factor (int, optional) –
Retrybackoff_factor value. Defaults to 30.
Usage:
from helpjuice import Client helpjuice = Client(account="your-account", api_key="ffb722a62e8**********************") # Get a single article article = helpjuice.Article(id=1).get() # Search for articles with pagination for question in helpjuice.Search().get(query="foo", limit=1000, paginate=True): print(question)
- request(method, path, *args, **kwargs)
Override
Sessionrequest method to add retries and output JSON.- Parameters
method (str) – Method for the new Request object.
path (str) – Path from host for the new Request object.
- Returns
Response JSON
- Return type
dict