communities API¶
pynteracta.api.communities.CommunitiesAPI
¶
Bases: ResourceClient
Client for community settings endpoints.
list()
¶
GET /communication/settings/communities.
Returns all communities the caller is allowed to post in.
list_by_view_post_capability(level=None)
¶
GET /communication/settings/communities/view-post.
Restituisce le community in cui l'identità autenticata ha la capability di
visualizzazione dei post indicata, nella stessa forma di :meth:list.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
level
|
ViewPostCapabilityLevel | str | None
|
|
None
|
Raises:
| Type | Description |
|---|---|
ValueError
|
Livello non valido; nessuna richiesta parte. |
details(community_id)
¶
GET /communication/settings/communities/{communityId}/details.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
community_id
|
int
|
Unique community identifier. |
required |
details_bulk(community_ids)
¶
POST /communication/settings/communities/details.
Retrieve details for multiple communities in a single call.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
community_ids
|
list[int]
|
List of community identifiers. |
required |
details_bulk_raw(req)
¶
POST community details with a pre-built request DTO (escape hatch).
post_definition(community_id)
¶
GET /communication/settings/communities/{communityId}/post-definition.
Returns the post structure (field definitions, hashtags, workflow) for a community.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
community_id
|
int
|
Unique community identifier. |
required |
post_definitions(community_ids)
¶
POST /communication/settings/communities/post-definitions.
Retrieve post definitions for multiple communities in a single call.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
community_ids
|
list[int]
|
List of community identifiers. |
required |
post_definitions_raw(req)
¶
POST community post definitions with a pre-built request DTO (escape hatch).
Communities by post-view capability¶
list() returns the communities the caller can post in. list_by_view_post_capability()
returns those where the caller can view posts at a given capability level, in the same
CommunityList shape.
from pynteracta.client import InteractaClient
from pynteracta.models.facade.communities import ViewPostCapabilityLevel
with InteractaClient(base_url="https://tenant.example.com", credentials=...) as client:
everything = client.communities.list_by_view_post_capability()
public = client.communities.list_by_view_post_capability(ViewPostCapabilityLevel.PUBLIC)
private = client.communities.list_by_view_post_capability("private") # case-insensitive
print([c.name for c in public.items_typed])
levelis aViewPostCapabilityLevel(PRIVATE,PUBLIC,ALL) or its name as a string, in any case. Any other value raisesValueErrorbefore the request.- Without a level the query parameter is not sent and the answer is the server's choice. On the
test tenant, with a service account, it matched
ALL; every level returned the same 15 communities, whilelist()returned 9. - A
403raisesPermissionError; a timeout raisesTransportError. One request, never retried.
Facade models¶
pynteracta.models.facade.communities.CommunityList
¶
Facade over :class:~generated.ListCommunitiesResponseDTO.
Attributes:
| Name | Type | Description |
|---|---|---|
raw |
The underlying generated DTO. |
Source code in src/pynteracta/models/facade/communities.py
pynteracta.models.facade.communities.Community
¶
Narrow facade over :class:~generated.CommunityDTO1.
Attributes:
| Name | Type | Description |
|---|---|---|
raw |
The underlying generated DTO; access additional fields via this escape hatch. |
Source code in src/pynteracta/models/facade/communities.py
pynteracta.models.facade.communities.CommunityDetail
¶
Facade over :class:~generated.GetCommunityDetailsResponseDTO.
Attributes:
| Name | Type | Description |
|---|---|---|
raw |
The underlying generated DTO. |
Source code in src/pynteracta/models/facade/communities.py
pynteracta.models.facade.communities.PostDefinition
¶
Facade over :class:~generated.GetPostDefinitionResponseDTOModel.
Attributes:
| Name | Type | Description |
|---|---|---|
raw |
The underlying generated DTO. |
Source code in src/pynteracta/models/facade/communities.py
community_id
property
¶
Community identifier this definition belongs to.
custom_fields_enabled
property
¶
Whether custom fields are enabled.
field_definitions
property
¶
Custom field definitions, re-validated as typed facades.
hashtags
property
¶
Hashtags configured for this community (typed variants).
from_dict(data)
classmethod
¶
Parse from a raw API response dict.
pynteracta.models.facade.communities.PostFieldDefinition
¶
Facade over :class:~generated.PostFieldDefinitionDTO1.
Attributes:
| Name | Type | Description |
|---|---|---|
raw |
The underlying generated DTO. |
Source code in src/pynteracta/models/facade/communities.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 | |
description
property
¶
Field description / compilation instructions.
enum_values
property
¶
Allowed enum values for ENUM / ENUM_LIST / HIERARCHICAL_ENUM fields.
Returns an empty list for non-enum field types.
Use the id of each entry as the parameters value in postFieldFilters.
external_id
property
¶
Stable external identifier set by the API consumer (preferred over label).
id
property
¶
Field identifier.
label
property
¶
Human-readable field label.
metadata
property
¶
Vendor metadata dict (e.g. feedback_max_value, decimal_digits).
name
property
¶
Internal field name (e.g. column_1459).
readonly
property
¶
Whether the field is read-only.
required
property
¶
Whether the field is required.
searchable
property
¶
Whether the field can be used in postFieldFilters.
sortable
property
¶
Whether the field can be used in orderBy (postCustomField-{id} form).
type
property
¶
Typed field type. Returns None if the raw value is absent or unknown.
type_raw
property
¶
Raw integer field type value, for unknown/future types.
validations
property
¶
Validation rules attached to this field.
pynteracta.models.facade.communities.PostDefinitionMap
¶
Facade over :class:~generated.ListPostDefinitionsResponseDTO.
The vendor returns a communityPostDefinitionMap keyed by community ID as a string;
this facade exposes it with integer keys.
Attributes:
| Name | Type | Description |
|---|---|---|
raw |
The underlying generated DTO. |
Source code in src/pynteracta/models/facade/communities.py
pynteracta.models.facade.communities.FieldType
¶
Bases: IntEnum
Field type identifiers as defined in the CommunicationSettings vendor documentation.
Source code in src/pynteracta/models/facade/communities.py
pynteracta.models.facade.communities.ViewPostCapabilityLevel
¶
Bases: StrEnum
Livello della capability di visualizzazione dei post, per communities/view-post.
Accetta anche il nome come stringa, senza distinzione di maiuscole
(ViewPostCapabilityLevel("private")); qualunque altro valore solleva ValueError.