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

Client

Helpjuice Client.

class helpjuice.Client(account, api_key, v='v3', timeout=5, total=5, backoff_factor=30)

Bases: requests.Session

Helpjuice Client.

Constructs a requests.Session for 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) – TimeoutHTTPAdapter timeout value. Defaults to 5.

  • total (int, optional) – Retry total value. Defaults to 5.

  • backoff_factor (int, optional) – Retry backoff_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 Session request 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