pystagram.graph_api.endpoints.comment package
Submodules
pystagram.graph_api.endpoints.comment.comment module
- class pystagram.graph_api.endpoints.comment.comment.Comment(graph_api: GraphInstagramBaseApi)
Bases:
object
The Comment node of the Instagram Graph API.
- Parameters:
graph_api (
InstagramGraphApi
) – An instance of theInstagramGraphApi
class.
- create(*args, **kwargs)
[Not Supported] Create an Instagram comment. :raises InstagramApiNotSupportedError: Comment creation is not supported by the Instagram Graph API.
- delete(comment_id: str, access_token: str | None = None)
Delete an Instagram comment.
- Parameters:
comment_id (str) – The ID of the Instagram comment to delete.
access_token (str, optional) – The access token of the Instagram user, inferred from the InstagramGraphApi instance if None, defaults to None
- Returns:
The response from the DELETE /{comment-id} endpoint.
- Return type:
pystagram.helpers.api_client.api_response.InstagramApiResponse
- get(comment_id: str, fields: List[str | CommentFields] | None = None, access_token: str | None = None)
Get fields and edges on an Instagram comment.
- Parameters:
comment_id (str) – The ID of the Instagram comment.
fields (Optional[List[Union[str, CommentFields]]], optional) – A list of
pystagram.graph_api.components.fields.comment_fields.CommentFields
to get from the Comment node, defaults to Noneaccess_token (str, optional) – The access token of the Instagram user, inferred from the InstagramGraphApi instance if None, defaults to None
- Returns:
The response from the GET /{comment-id} endpoint.
- Return type:
pystagram.helpers.api_client.api_response.InstagramApiResponse
- property replies
The Replies node of the Instagram Graph API. See the
pystagram.graph_api.endpoints.comment.replies.Replies
class for additional details.
- update(comment_id: str, hide: bool | None = False, access_token: str | None = None)
Update an Instagram comment.
- Parameters:
comment_id (str) – The ID of the Instagram comment to update.
hide (Optional[bool], optional) – Whether to hide the comment, defaults to False
access_token (str, optional) – The access token of the Instagram user, inferred from the InstagramGraphApi instance if None, defaults to None
- Returns:
The response from the POST /{comment-id} endpoint.
- Return type:
pystagram.helpers.api_client.api_response.InstagramApiResponse
pystagram.graph_api.endpoints.comment.replies module
- class pystagram.graph_api.endpoints.comment.replies.Replies(comment: Comment)
Bases:
object
The Replies node of the Instagram Graph API.
- Parameters:
comment (
Comment
) – An instance of theComment
class.
- create(comment_id: str, message: str, access_token: str | None = None)
Create a reply to an Instagram comment.
- Parameters:
comment_id (str) – The ID of the Instagram comment.
message (str) – The message of the reply.
access_token (str, optional) – The access token of the Instagram user, inferred from the InstagramGraphApi instance if None, defaults to None
- Returns:
The response from the POST /{comment-id}/replies endpoint.
- Return type:
pystagram.helpers.api_client.api_response.InstagramApiResponse
- delete(*args, **kwargs)
[Not Supported] Delete an Instagram comment reply. :raises InstagramApiNotSupportedError: Comment reply deletion is not supported by the Instagram Graph API.
- get(comment_id: str, access_token: str | None = None)
Get all replies on an Instagram comment.
- Parameters:
comment_id (str) – The ID of the Instagram comment.
access_token (str, optional) – The access token of the Instagram user, inferred from the InstagramGraphApi instance if None, defaults to None
- Returns:
The response from the GET /{comment-id}/replies endpoint.
- Return type:
pystagram.helpers.api_client.api_response.InstagramApiResponse
- update(*args, **kwargs)
[Not Supported] Update an Instagram comment reply. :raises InstagramApiNotSupportedError: Comment reply update is not supported by the Instagram Graph API.