Primary Modules

This section provides details around the primary modules used in the highspot package, which are listed below.


Init Module (highspot)

The Init Module is covered on this page.


Core Module (highspot.core)

The Core Module is covered on this page.


API Module (highspot.api)

This module handles interactions with the Highspot API.

Module:

highspot.api

Synopsis:

This module handles interactions with the Highspot REST API

Created By:

Jeff Shurtliff

Last Modified:

Jeff Shurtliff

Modified Date:

16 Oct 2022

highspot.api.get_request_with_retries(hs_object, endpoint, return_json=True, verify_ssl=True)[source]

This function performs a GET request and will retry several times if a failure occurs.

Parameters:
  • hs_object – The Highspot object

  • endpoint (string) – The endpoint URI to query

  • return_json (bool) – Determines if JSON data should be returned

  • verify_ssl (bool) – Determines if SSL verification should occur (True by default)

Returns:

The JSON data from the response or the raw requests response.

Raises:

highspot.errors.exceptions.APIConnectionError

Return to Top


Domain Module (highspot.domain)

This module handles interactions with Highspot domains.

Module:

highspot.domain

Synopsis:

Defines the domain-related functions associated with the Highspot API

Created By:

Jeff Shurtliff

Last Modified:

Jeff Shurtliff

Modified Date:

17 Oct 2022

highspot.domain.get_custom_usage_labels(hs_object)[source]

This function returns the custom usage labels in the user’s domain.

Parameters:

hs_object (class[highspot.Highspot]) – The core highspot.Highspot object

Returns:

The custom usage labels data in JSON format

Raises:

highspot.errors.exceptions.APIConnectionError

highspot.domain.get_promoted_search_results(hs_object, start=None, limit=None)[source]

This function retrieves the existing promoted search terms and their associated items.

Parameters:
  • hs_object (class[highspot.Highspot]) – The core highspot.Highspot object

  • start (int, str, None) – The start position of a paged request (0 by default)

  • limit (int, str, None) – Maximum number of users returned (100 by default)

Returns:

The promoted search data in JSON format

Raises:

highspot.errors.exceptions.APIConnectionError

Return to Top


Groups Module (highspot.groups)

This module handles interactions with Highspot groups.

Module:

highspot.groups

Synopsis:

Defines the group-related functions associated with the Highspot API

Created By:

Jeff Shurtliff

Last Modified:

Jeff Shurtliff

Modified Date:

16 Oct 2022

highspot.groups.get_group(hs_object, group_id)[source]

This function returns the metadata for a specific group.

Parameters:
Returns:

The group metadata in JSON format

Raises:

highspot.errors.exceptions.APIConnectionError

highspot.groups.get_groups(hs_object, role_filter=None, right_filter=None, start=None, limit=None)[source]

This function retrieves the list of groups.

Parameters:
  • hs_object (class[highspot.Highspot]) – The core highspot.Highspot object

  • role_filter (str, None) – Role by which to filter groups (editor, viewer, manager, or owner)

  • right_filter (str, None) – Right by which to filter groups (edit, view, or manage)

  • start (str, int, None) – The start position of the paged request

  • limit (str, int, None) – The maximum number of groups returned

Returns:

The group list data in JSON format

Raises:

highspot.errors.exceptions.APIConnectionError, highspot.errors.exceptions.InvalidFieldError

Return to Top


Items Module (highspot.items)

This module handles interactions with Highspot items.

Module:

highspot.items

Synopsis:

Defines the item-related functions associated with the Highspot API

Created By:

Jeff Shurtliff

Last Modified:

Jeff Shurtliff

Modified Date:

16 Oct 2022

highspot.items.get_cms_metadata(hs_object, item_id)[source]

This function retrieves item metadata when the item was imported through an external CMS.

Parameters:
Returns:

The CMS metadata

Raises:

highspot.errors.exceptions.APIConnectionError

highspot.items.get_item(hs_object, item_id)[source]

This function retrieves the metadata for a specific item.

Parameters:
Returns:

The item metadata as a dictionary

Raises:

highspot.errors.exceptions.APIConnectionError

highspot.items.get_item_bookmarks(hs_object, item_id)[source]

This function retrieves the bookmarks for a specific item.

Parameters:
Returns:

The item bookmarks as a dictionary

Raises:

highspot.errors.exceptions.APIConnectionError

highspot.items.get_item_content(hs_object, item_id, report=False)[source]

This function retrieves the content for a specific item.

Parameters:
  • hs_object (class[highspot.Highspot]) – The core highspot.Highspot object

  • item_id (str) – The unique identifier for the specific item

  • report (bool) – Indicates that the content is a report and should be returned in CSV format (False by default)

Returns:

The item content or an error in plain text or as a dictionary (JSON format)

Raises:

highspot.errors.exceptions.APIConnectionError

highspot.items.get_item_properties(hs_object, item_id)[source]

This function retrieves the properties for a given item.

Parameters:
Returns:

The properties data in JSON format

Raises:

highspot.errors.exceptions.APIConnectionError

highspot.items.get_item_property(hs_object, item_id, property_name)[source]

This function retrieves a specific property for a given item.

Parameters:
Returns:

The value of the property in JSON format

Raises:

highspot.errors.exceptions.APIConnectionError

highspot.items.get_item_report(hs_object, item_id)[source]

This function retrieves a CSV report for a specific item.

Parameters:
Returns:

The item content or an error in plain text or as a dictionary (JSON format)

Raises:

highspot.errors.exceptions.APIConnectionError

highspot.items.get_item_thumbnails(hs_object, item_id)[source]

This function retrieves the thumbnail(s) for a given item.

Parameters:
Returns:

The thumbnail data

Raises:

highspot.errors.exceptions.APIConnectionError

highspot.items.get_items(hs_object, spot_id, list_id=None, start=0, limit=100)[source]

This function retrieves the items for a specific Spot.

Parameters:
  • hs_object (class[highspot.Highspot]) – The core highspot.Highspot object

  • spot_id (str) – The unique identifier for the Spot (required)

  • list_id (str, None) – The unique identifier for a list by which to filter the results

  • start (int, str) – The start position of a paged request (0 by default)

  • limit (int, str) – Maximum number of users returned (100 by default)

Returns:

A dictionary containing the items

Raises:

highspot.errors.exceptions.APIConnectionError

Return to Top


Pitches Module (highspot.pitches)

This module handles interactions with Highspot pitches.

Module:

highspot.pitches

Synopsis:

Defines the pitch-related functions associated with the Highspot API

Created By:

Jeff Shurtliff

Last Modified:

Jeff Shurtliff

Modified Date:

17 Oct 2022

highspot.pitches.get_pitches(hs_object, start=0, limit=25, sort_by='recent_activity')[source]

This function retrieves a list of the user’s pitches.

Parameters:
  • hs_object (class[highspot.Highspot]) – The core highspot.Highspot object

  • start (int, str) – The start position of a paged request (0 by default)

  • limit (int, str) – Maximum number of users returned (100 by default)

  • sort_by (str) – Determines how the data is sorted (recent_activity, alphabetical, or date_created)

Returns:

The pitch data in JSON format

Raises:

highspot.errors.exceptions.APIConnectionError, highspot.errors.exceptions.InvalidFieldError

Return to Top


Request Module (highspot.request)

This module handles interactions with Highspot asynchronous requests.

Module:

highspot.domain

Synopsis:

Defines the domain-related functions associated with the Highspot API

Created By:

Jeff Shurtliff

Last Modified:

Jeff Shurtliff

Modified Date:

20 Oct 2022

highspot.request.get_request_result(hs_object, request_id)[source]

This function returns the result of an asynchronous request.

Parameters:
Returns:

The status of the request

Raises:

highspot.errors.exceptions.APIConnectionError

highspot.request.get_request_status(hs_object, request_id)[source]

This function returns the status of an asynchronous request.

Parameters:
Returns:

The status of the request

Raises:

highspot.errors.exceptions.APIConnectionError

Return to Top


Spots Module (highspot.spots)

This module handles interactions with Highspot spots and lists.

Module:

highspot.spots

Synopsis:

Defines the spot-related functions associated with the Highspot API

Created By:

Jeff Shurtliff

Last Modified:

Jeff Shurtliff

Modified Date:

16 Oct 2022

Return to Top


Users Module (highspot.users)

This module handles interactions with Highspot users.

Module:

highspot.users

Synopsis:

Defines the users-related functions associated with the Highspot API

Created By:

Jeff Shurtliff

Last Modified:

Jeff Shurtliff

Modified Date:

16 Oct 2022

highspot.users.get_user(hs_object, user_id)[source]

This function retrieves the metadata for a specific user.

Parameters:
Returns:

The user metadata as a dictionary

Raises:

highspot.errors.exceptions.APIConnectionError

highspot.users.get_user_properties(hs_object, user_id)[source]

This function retrieves the properties for a specific user.

Parameters:
Returns:

The user properties as a dictionary

Raises:

highspot.errors.exceptions.APIConnectionError

highspot.users.get_user_property(hs_object, user_id, property_name)[source]

This function retrieves a given property for a specific user.

Parameters:
Returns:

The user properties as a dictionary

Raises:

highspot.errors.exceptions.APIConnectionError

highspot.users.get_users(hs_object, email=None, list_type=None, with_fields=None, exclude_fields=None, start=0, limit=100)[source]

This function retrieves a list of users.

Parameters:
  • hs_object (class[highspot.Highspot]) – The core highspot.Highspot object

  • email (str, None) – An email address by which to filter the users

  • list_type (str, None) – Allows filtering by all or unverified users (filters by verified users by default)

  • with_fields (str, tuple, list, set, None) – Additional field(s) to include in the response

  • exclude_fields (str, tuple, list, set, None) – Additional field(s) to exclude in the response

  • start (int, str) – The start position of a paged request (0 by default)

  • limit (int, str) – Maximum number of users returned (100 by default)

Returns:

A dictionary containing the user data

Raises:

highspot.errors.exceptions.InvalidFieldError, highspot.errors.exceptions.APIConnectionError

highspot.users.me(hs_object)[source]

This function returns the information about the user making the API call.

Parameters:

hs_object (class[highspot.Highspot]) – The core highspot.Highspot object

Returns:

A dictionary with the user data

Raises:

highspot.errors.exceptions.APIConnectionError

Return to Top