Hashtags API¶
The HashtagsAPI client exposes the community hashtag listing endpoint added in v0.5.0.
Resource grouping¶
The endpoint is grouped under client.hashtags (D-v0.5-1), separate from community or post
resource clients.
Usage¶
from pynteracta.client import InteractaClient
with InteractaClient(base_url="https://tenant.example.com", credentials=...) as client:
# List hashtags for a community
page = client.hashtags.list_for_community(79)
for ht in page.items_typed:
print(ht.id, ht.name, ht.external_id)
# Iterate all pages lazily
for ht in client.hashtags.iterate_for_community(79, name="eng"):
print(ht.id, ht.name)
# Include deleted hashtags
page = client.hashtags.list_for_community(79, include_deleted=True)
Sort fields¶
Valid order_by values: 'name', 'externalId'. order_desc controls direction
(default: descending).
API Reference¶
pynteracta.api.hashtags.HashtagsAPI
¶
Bases: ResourceClient
Client for community hashtag listing endpoint.
list_for_community(community_id, *, page_token=None, page_size=None, name=None, include_deleted=None, order_by=None, order_desc=None)
¶
POST /admin/data/communities/{communityId}/hashtags.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
community_id
|
int
|
The community whose hashtags to list. |
required |
page_token
|
str | None
|
Pagination cursor from a previous response. |
None
|
page_size
|
int | None
|
Maximum items per page. |
None
|
name
|
str | None
|
Filter by hashtag name (substring match). |
None
|
include_deleted
|
bool | None
|
Include deleted hashtags (default: |
None
|
order_by
|
str | None
|
Sort field. Valid values: |
None
|
order_desc
|
bool | None
|
|
None
|
list_for_community_raw(community_id, req)
¶
POST hashtag list with a pre-built request DTO (escape hatch).
iterate_for_community(community_id, *, page_size=None, name=None, include_deleted=None, order_by=None, order_desc=None)
¶
Lazy iterator over all pages of :meth:list_for_community.
Facade Reference¶
pynteracta.models.facade.hashtags.Hashtag
¶
Thin facade over :class:~generated.AdminHashtagDTO.
AdminListHashtagsResponseDTO.items are typed as AdminHashtagDTOModel
(RootModel[Any] stubs); the typed sibling is the plain AdminHashtagDTO.
Attributes:
| Name | Type | Description |
|---|---|---|
raw |
The underlying typed DTO; access additional fields via this escape hatch. |
Source code in src/pynteracta/models/facade/hashtags.py
from_dict(data)
classmethod
¶
pynteracta.models.facade.hashtags.HashtagList
¶
Narrow facade over :class:~generated.AdminListHashtagsResponseDTO.
items are AdminHashtagDTOModel (RootModel[Any] stubs); call
:meth:items_typed to get :class:Hashtag instances.
Attributes:
| Name | Type | Description |
|---|---|---|
raw |
The underlying generated DTO; access additional fields via this escape hatch. |