Highspot Core Object¶
This section provides details around the core module and the methods used within the core object for the highspot package, which are listed below.
Init Module (highspot)¶
This module (being the primary __init__.py file for the library) provides a
“jumping-off-point” to initialize the primary highspot.core.Highspot object.
- Module:
highspot
- Synopsis:
This is the
__init__module for the highspot package- Created By:
Jeff Shurtliff
- Last Modified:
Jeff Shurtliff
- Modified Date:
10 Oct 2022
- class highspot.Highspot(username=None, password=None, helper=None, api_version='0.5')[source]¶
This is the class for the core object leveraged in this library.
- class Domain(hs_object)[source]¶
This class includes methods associated with Highspot domains.
- __init__(hs_object)[source]¶
This method initializes the
highspot.core.Highspot.Domaininner class object.- Parameters:
hs_object (class[highspot.Highspot]) – The core
highspot.Highspotobject
- get_custom_usage_labels()[source]¶
This method returns the custom usage labels in the user’s domain.
- Returns:
The custom usage labels data in JSON format
- Raises:
- class Group(hs_object)[source]¶
This class includes methods associated with Highspot groups.
- __init__(hs_object)[source]¶
This method initializes the
highspot.core.Highspot.Groupinner class object.- Parameters:
hs_object (class[highspot.Highspot]) – The core
highspot.Highspotobject
- get_group(group_id)[source]¶
This method returns the metadata for a specific group.
- Parameters:
group_id (str) – The unique identifier for the group
- Returns:
The group metadata in JSON format
- Raises:
- get_groups(role_filter=None, right_filter=None, start=None, limit=None)[source]¶
This method retrieves the list of groups.
- Parameters:
role_filter (str, None) – Role by which to filter groups (
editor,viewer,manager, orowner)right_filter (str, None) – Right by which to filter groups (
edit,view, ormanage)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
- class Item(hs_object)[source]¶
This class includes methods associated with Highspot items.
- __init__(hs_object)[source]¶
This method initializes the
highspot.core.Highspot.Iteminner class object.- Parameters:
hs_object (class[highspot.Highspot]) – The core
highspot.Highspotobject
- get_cms_metadata(item_id)[source]¶
This method retrieves item metadata when the item was imported through an external CMS.
- Parameters:
item_id (str) – The unique identifier for the specific item
- Returns:
The CMS metadata
- Raises:
- get_item(item_id)[source]¶
This method retrieves the metadata for a specific item.
- Parameters:
item_id (str) – The unique identifier for the specific item
- Returns:
The item metadata as a dictionary
- Raises:
- get_item_bookmarks(item_id)[source]¶
This method retrieves the bookmarks for a specific item.
- Parameters:
item_id (str) – The unique identifier for the specific item
- Returns:
The item bookmarks as a dictionary
- Raises:
- get_item_content(item_id, report=False)[source]¶
This method retrieves the content for a specific item.
- Parameters:
- Returns:
The item content or an error in plain text or as a dictionary (JSON format)
- Raises:
- get_item_properties(item_id)[source]¶
This method retrieves the properties for a given item.
- Parameters:
item_id (str) – The unique identifier for the specific item
- Returns:
The properties data
- Raises:
- get_item_property(item_id, property_name)[source]¶
This method retrieves a specific property for a given item.
- Parameters:
- Returns:
The value of the property in JSON format
- Raises:
- get_item_report(item_id)[source]¶
This method retrieves a CSV report for a specific item.
- Parameters:
item_id (str) – The unique identifier for the specific item
- Returns:
The item content or an error in plain text or as a dictionary (JSON format)
- Raises:
- get_item_thumbnails(item_id)[source]¶
This method retrieves the thumbnail(s) for a given item.
- Parameters:
item_id (str) – The unique identifier for the specific item
- Returns:
The thumbnail data
- Raises:
- class Pitch(hs_object)[source]¶
This class includes methods associated with Highspot pitches.
- __init__(hs_object)[source]¶
This method initializes the
highspot.core.Highspot.Pitchinner class object.- Parameters:
hs_object (class[highspot.Highspot]) – The core
highspot.Highspotobject
- get_pitches(start=0, limit=25, sort_by='recent_activity')[source]¶
This method retrieves a list of the user’s pitches.
- Parameters:
- Returns:
The pitch data in JSON format
- Raises:
highspot.errors.exceptions.APIConnectionError,highspot.errors.exceptions.InvalidFieldError
- class Request(hs_object)[source]¶
This class includes methods associated with Highspot asynchronous requests.
- __init__(hs_object)[source]¶
This method initializes the
highspot.core.Highspot.Requestinner class object.- Parameters:
hs_object (class[highspot.Highspot]) – The core
highspot.Highspotobject
- get_request_result(request_id)[source]¶
This function returns the result of an asynchronous request.
- Parameters:
request_id (str) – The ID of the request to check
- Returns:
The status of the request
- Raises:
- class Spot(hs_object)[source]¶
This class includes methods associated with Highspot spots and lists.
- __init__(hs_object)[source]¶
This method initializes the
highspot.core.Highspot.Spotinner class object.- Parameters:
hs_object (class[highspot.Highspot]) – The core
highspot.Highspotobject
- class User(hs_object)[source]¶
This class includes methods associated with Highspot users.
- __init__(hs_object)[source]¶
This method initializes the
highspot.core.Highspot.Userinner class object.- Parameters:
hs_object (class[highspot.Highspot]) – The core
highspot.Highspotobject
- get_user(user_id)[source]¶
This method retrieves the metadata for a specific user.
- Parameters:
user_id (str) – The unique identifier for the user
- Returns:
The user metadata as a dictionary
- Raises:
- get_user_properties(user_id)[source]¶
This method retrieves the properties for a specific user.
- Parameters:
user_id (str) – The unique identifier for the user
- Returns:
The user properties as a dictionary
- Raises:
- get_user_property(user_id, property_name)[source]¶
This method retrieves a given property for a specific user.
- Parameters:
- Returns:
The user properties as a dictionary
- Raises:
- get_users(email=None, list_type=None, with_fields=None, exclude_fields=None, start=0, limit=100)[source]¶
This method retrieves a list of users.
- Parameters:
email (str, None) – An email address by which to filter the users
list_type (str, None) – Allows filtering by
allorunverifiedusers (filters byverifiedusers 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 (
0by default)limit (int, str) – Maximum number of users returned (
100by default)
- Returns:
A dictionary containing the user data
- Raises:
highspot.errors.exceptions.InvalidFieldError,highspot.errors.exceptions.APIConnectionError
- __init__(username=None, password=None, helper=None, api_version='0.5')[source]¶
This method instantiates the core Fresh object.
Core Module (highspot.core)¶
This module contains the core object and functions to establish the connection to the API and leverage it to perform various actions.
- Module:
highspot.core
- Synopsis:
Defines the core highspot object used to interface with the Highspot API
- Created By:
Jeff Shurtliff
- Last Modified:
Jeff Shurtliff
- Modified Date:
20 Oct 2022
- class highspot.core.Highspot(username=None, password=None, helper=None, api_version='0.5')[source]¶
This is the class for the core object leveraged in this library.
- class Domain(hs_object)[source]¶
This class includes methods associated with Highspot domains.
- __init__(hs_object)[source]¶
This method initializes the
highspot.core.Highspot.Domaininner class object.- Parameters:
hs_object (class[highspot.Highspot]) – The core
highspot.Highspotobject
- get_custom_usage_labels()[source]¶
This method returns the custom usage labels in the user’s domain.
- Returns:
The custom usage labels data in JSON format
- Raises:
- class Group(hs_object)[source]¶
This class includes methods associated with Highspot groups.
- __init__(hs_object)[source]¶
This method initializes the
highspot.core.Highspot.Groupinner class object.- Parameters:
hs_object (class[highspot.Highspot]) – The core
highspot.Highspotobject
- get_group(group_id)[source]¶
This method returns the metadata for a specific group.
- Parameters:
group_id (str) – The unique identifier for the group
- Returns:
The group metadata in JSON format
- Raises:
- get_groups(role_filter=None, right_filter=None, start=None, limit=None)[source]¶
This method retrieves the list of groups.
- Parameters:
role_filter (str, None) – Role by which to filter groups (
editor,viewer,manager, orowner)right_filter (str, None) – Right by which to filter groups (
edit,view, ormanage)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
- class Item(hs_object)[source]¶
This class includes methods associated with Highspot items.
- __init__(hs_object)[source]¶
This method initializes the
highspot.core.Highspot.Iteminner class object.- Parameters:
hs_object (class[highspot.Highspot]) – The core
highspot.Highspotobject
- get_cms_metadata(item_id)[source]¶
This method retrieves item metadata when the item was imported through an external CMS.
- Parameters:
item_id (str) – The unique identifier for the specific item
- Returns:
The CMS metadata
- Raises:
- get_item(item_id)[source]¶
This method retrieves the metadata for a specific item.
- Parameters:
item_id (str) – The unique identifier for the specific item
- Returns:
The item metadata as a dictionary
- Raises:
- get_item_bookmarks(item_id)[source]¶
This method retrieves the bookmarks for a specific item.
- Parameters:
item_id (str) – The unique identifier for the specific item
- Returns:
The item bookmarks as a dictionary
- Raises:
- get_item_content(item_id, report=False)[source]¶
This method retrieves the content for a specific item.
- Parameters:
- Returns:
The item content or an error in plain text or as a dictionary (JSON format)
- Raises:
- get_item_properties(item_id)[source]¶
This method retrieves the properties for a given item.
- Parameters:
item_id (str) – The unique identifier for the specific item
- Returns:
The properties data
- Raises:
- get_item_property(item_id, property_name)[source]¶
This method retrieves a specific property for a given item.
- Parameters:
- Returns:
The value of the property in JSON format
- Raises:
- get_item_report(item_id)[source]¶
This method retrieves a CSV report for a specific item.
- Parameters:
item_id (str) – The unique identifier for the specific item
- Returns:
The item content or an error in plain text or as a dictionary (JSON format)
- Raises:
- get_item_thumbnails(item_id)[source]¶
This method retrieves the thumbnail(s) for a given item.
- Parameters:
item_id (str) – The unique identifier for the specific item
- Returns:
The thumbnail data
- Raises:
- class Pitch(hs_object)[source]¶
This class includes methods associated with Highspot pitches.
- __init__(hs_object)[source]¶
This method initializes the
highspot.core.Highspot.Pitchinner class object.- Parameters:
hs_object (class[highspot.Highspot]) – The core
highspot.Highspotobject
- get_pitches(start=0, limit=25, sort_by='recent_activity')[source]¶
This method retrieves a list of the user’s pitches.
- Parameters:
- Returns:
The pitch data in JSON format
- Raises:
highspot.errors.exceptions.APIConnectionError,highspot.errors.exceptions.InvalidFieldError
- class Request(hs_object)[source]¶
This class includes methods associated with Highspot asynchronous requests.
- __init__(hs_object)[source]¶
This method initializes the
highspot.core.Highspot.Requestinner class object.- Parameters:
hs_object (class[highspot.Highspot]) – The core
highspot.Highspotobject
- get_request_result(request_id)[source]¶
This function returns the result of an asynchronous request.
- Parameters:
request_id (str) – The ID of the request to check
- Returns:
The status of the request
- Raises:
- class Spot(hs_object)[source]¶
This class includes methods associated with Highspot spots and lists.
- __init__(hs_object)[source]¶
This method initializes the
highspot.core.Highspot.Spotinner class object.- Parameters:
hs_object (class[highspot.Highspot]) – The core
highspot.Highspotobject
- class User(hs_object)[source]¶
This class includes methods associated with Highspot users.
- __init__(hs_object)[source]¶
This method initializes the
highspot.core.Highspot.Userinner class object.- Parameters:
hs_object (class[highspot.Highspot]) – The core
highspot.Highspotobject
- get_user(user_id)[source]¶
This method retrieves the metadata for a specific user.
- Parameters:
user_id (str) – The unique identifier for the user
- Returns:
The user metadata as a dictionary
- Raises:
- get_user_properties(user_id)[source]¶
This method retrieves the properties for a specific user.
- Parameters:
user_id (str) – The unique identifier for the user
- Returns:
The user properties as a dictionary
- Raises:
- get_user_property(user_id, property_name)[source]¶
This method retrieves a given property for a specific user.
- Parameters:
- Returns:
The user properties as a dictionary
- Raises:
- get_users(email=None, list_type=None, with_fields=None, exclude_fields=None, start=0, limit=100)[source]¶
This method retrieves a list of users.
- Parameters:
email (str, None) – An email address by which to filter the users
list_type (str, None) – Allows filtering by
allorunverifiedusers (filters byverifiedusers 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 (
0by default)limit (int, str) – Maximum number of users returned (
100by default)
- Returns:
A dictionary containing the user data
- Raises:
highspot.errors.exceptions.InvalidFieldError,highspot.errors.exceptions.APIConnectionError
- __init__(username=None, password=None, helper=None, api_version='0.5')[source]¶
This method instantiates the core Fresh object.
Core Functionality Subclasses (highspot.core.Highspot)¶
These classes below are inner/nested classes within the core highspot.core.Highspot class.
Note
The classes themselves are PascalCase format and singular (e.g. Item, User, etc.) whereas
the names used to call the inner class methods are all lowercase (or snake_case) and plural.
(e.g. core_object.items.get_item(), core_object.users.get_user(), etc.)
Domain Subclass (highspot.core.Highspot.Domain)¶
- class Highspot.Domain(hs_object)[source]
This class includes methods associated with Highspot domains.
- get_custom_usage_labels()[source]
This method returns the custom usage labels in the user’s domain.
- Returns:
The custom usage labels data in JSON format
- Raises:
- get_promoted_search_results(start=None, limit=None)[source]
This method retrieves the existing promoted search terms and their associated items.
- Parameters:
- Returns:
The promoted search data in JSON format
- Raises:
Groups Subclass (highspot.core.Highspot.Group)¶
- class Highspot.Group(hs_object)[source]
This class includes methods associated with Highspot groups.
- get_group(group_id)[source]
This method returns the metadata for a specific group.
- Parameters:
group_id (str) – The unique identifier for the group
- Returns:
The group metadata in JSON format
- Raises:
- get_groups(role_filter=None, right_filter=None, start=None, limit=None)[source]
This method retrieves the list of groups.
- Parameters:
role_filter (str, None) – Role by which to filter groups (
editor,viewer,manager, orowner)right_filter (str, None) – Right by which to filter groups (
edit,view, ormanage)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
Items Subclass (highspot.core.Highspot.Item)¶
- class Highspot.Item(hs_object)[source]
This class includes methods associated with Highspot items.
- get_cms_metadata(item_id)[source]
This method retrieves item metadata when the item was imported through an external CMS.
- Parameters:
item_id (str) – The unique identifier for the specific item
- Returns:
The CMS metadata
- Raises:
- get_item(item_id)[source]
This method retrieves the metadata for a specific item.
- Parameters:
item_id (str) – The unique identifier for the specific item
- Returns:
The item metadata as a dictionary
- Raises:
- get_item_bookmarks(item_id)[source]
This method retrieves the bookmarks for a specific item.
- Parameters:
item_id (str) – The unique identifier for the specific item
- Returns:
The item bookmarks as a dictionary
- Raises:
- get_item_content(item_id, report=False)[source]
This method retrieves the content for a specific item.
- Parameters:
- Returns:
The item content or an error in plain text or as a dictionary (JSON format)
- Raises:
- get_item_properties(item_id)[source]
This method retrieves the properties for a given item.
- Parameters:
item_id (str) – The unique identifier for the specific item
- Returns:
The properties data
- Raises:
- get_item_property(item_id, property_name)[source]
This method retrieves a specific property for a given item.
- Parameters:
- Returns:
The value of the property in JSON format
- Raises:
- get_item_report(item_id)[source]
This method retrieves a CSV report for a specific item.
- Parameters:
item_id (str) – The unique identifier for the specific item
- Returns:
The item content or an error in plain text or as a dictionary (JSON format)
- Raises:
- get_item_thumbnails(item_id)[source]
This method retrieves the thumbnail(s) for a given item.
- Parameters:
item_id (str) – The unique identifier for the specific item
- Returns:
The thumbnail data
- Raises:
- get_items(spot_id, list_id=None, start=0, limit=100)[source]
This method retrieves the items for a specific Spot.
- Parameters:
- Returns:
A dictionary containing the items
- Raises:
Pitches Subclass (highspot.core.Highspot.Pitch)¶
- class Highspot.Pitch(hs_object)[source]
This class includes methods associated with Highspot pitches.
- get_pitches(start=0, limit=25, sort_by='recent_activity')[source]
This method retrieves a list of the user’s pitches.
- Parameters:
- Returns:
The pitch data in JSON format
- Raises:
highspot.errors.exceptions.APIConnectionError,highspot.errors.exceptions.InvalidFieldError
Request Subclass (highspot.core.Highspot.Request)¶
- class Highspot.Request(hs_object)[source]
This class includes methods associated with Highspot asynchronous requests.
- get_request_result(request_id)[source]
This function returns the result of an asynchronous request.
- Parameters:
request_id (str) – The ID of the request to check
- Returns:
The status of the request
- Raises:
Spots Subclass (highspot.core.Highspot.Spot)¶
- class Highspot.Spot(hs_object)[source]
This class includes methods associated with Highspot spots and lists.
Users Subclass (highspot.core.Highspot.User)¶
- class Highspot.User(hs_object)[source]
This class includes methods associated with Highspot users.
- get_user(user_id)[source]
This method retrieves the metadata for a specific user.
- Parameters:
user_id (str) – The unique identifier for the user
- Returns:
The user metadata as a dictionary
- Raises:
- get_user_properties(user_id)[source]
This method retrieves the properties for a specific user.
- Parameters:
user_id (str) – The unique identifier for the user
- Returns:
The user properties as a dictionary
- Raises:
- get_user_property(user_id, property_name)[source]
This method retrieves a given property for a specific user.
- Parameters:
- Returns:
The user properties as a dictionary
- Raises:
- get_users(email=None, list_type=None, with_fields=None, exclude_fields=None, start=0, limit=100)[source]
This method retrieves a list of users.
- Parameters:
email (str, None) – An email address by which to filter the users
list_type (str, None) – Allows filtering by
allorunverifiedusers (filters byverifiedusers 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 (
0by default)limit (int, str) – Maximum number of users returned (
100by default)
- Returns:
A dictionary containing the user data
- Raises:
highspot.errors.exceptions.InvalidFieldError,highspot.errors.exceptions.APIConnectionError
- me()[source]
This method returns the information about the user making the API call.
- Returns:
A dictionary with the user data
- Raises: