MCPcopy Create free account
hub / github.com/pollinations/pollinations / get_buffer_channels

Function get_buffer_channels

social/scripts/buffer_utils.py:104–123  ·  view source on GitHub ↗

Fetch all Buffer channels for the authenticated user. Returns list of channels with id, service, name, displayName, etc.

(access_token: str)

Source from the content-addressed store, hash-verified

102# --- Channel (profile) functions ---
103
104def get_buffer_channels(access_token: str) -> List[Dict]:
105 """Fetch all Buffer channels for the authenticated user.
106
107 Returns list of channels with id, service, name, displayName, etc.
108 """
109 org_id = get_organization_id(access_token)
110 if not org_id:
111 return []
112
113 result = _graphql_request(
114 access_token,
115 GET_CHANNELS_QUERY,
116 variables={"input": {"organizationId": org_id}},
117 )
118
119 try:
120 channels = result["data"]["channels"]
121 return [ch for ch in channels if not ch.get("isDisconnected")]
122 except (KeyError, TypeError):
123 return []
124
125
126def get_channel_by_service(access_token: str, service: str) -> Optional[Dict]:

Callers 2

get_channel_by_serviceFunction · 0.85
buffer_utils.pyFile · 0.85

Calls 3

get_organization_idFunction · 0.85
_graphql_requestFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected