pystagram.graph_api.endpoints.comment package

Submodules

pystagram.graph_api.endpoints.comment.comment module

class pystagram.graph_api.endpoints.comment.comment.Comment(graph_api: PystagramGraphApi)

Bases: object

The Comment node of the Instagram Graph API. :param graph_api: An instance of the InstagramGraphApi class. :type graph_api: InstagramGraphApi

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. :param comment_id: The ID of the Instagram comment to delete. :type comment_id: str :param access_token: The access token of the Instagram user, inferred from the InstagramGraphApi instance if None, defaults to None :type access_token: str, optional :return: The response from the DELETE /{comment-id} endpoint. :rtype: pystagram.helpers.api_client.api_response.PystagramApiResponse

get(comment_id: str, fields: List[str | CommentFields] | None = None, access_token: str | None = None)

Get fields and edges on an Instagram comment. :param comment_id: The ID of the Instagram comment. :type comment_id: str :param fields: A list of pystagram.graph_api.components.fields.comment_fields.CommentFields to get from the Comment node, defaults to None :type fields: Optional[List[Union[str, CommentFields]]], optional :param access_token: The access token of the Instagram user, inferred from the InstagramGraphApi instance if None, defaults to None :type access_token: str, optional :return: The response from the GET /{comment-id} endpoint. :rtype: pystagram.helpers.api_client.api_response.PystagramApiResponse

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. :param comment_id: The ID of the Instagram comment to update. :type comment_id: str :param hide: Whether to hide the comment, defaults to False :type hide: Optional[bool], optional :param access_token: The access token of the Instagram user, inferred from the InstagramGraphApi instance if None, defaults to None :type access_token: str, optional :return: The response from the POST /{comment-id} endpoint. :rtype: pystagram.helpers.api_client.api_response.PystagramApiResponse

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. :param comment: An instance of the Comment class. :type comment: Comment

create(comment_id: str, message: str, access_token: str | None = None)

Create a reply to an Instagram comment. :param comment_id: The ID of the Instagram comment. :type comment_id: str :param message: The message of the reply. :type message: str :param access_token: The access token of the Instagram user, inferred from the InstagramGraphApi instance if None, defaults to None :type access_token: str, optional :return: The response from the POST /{comment-id}/replies endpoint. :rtype: pystagram.helpers.api_client.api_response.PystagramApiResponse

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. :param comment_id: The ID of the Instagram comment. :type comment_id: str :param access_token: The access token of the Instagram user, inferred from the InstagramGraphApi instance if None, defaults to None :type access_token: str, optional :return: The response from the GET /{comment-id}/replies endpoint. :rtype: pystagram.helpers.api_client.api_response.PystagramApiResponse

update(*args, **kwargs)

[Not Supported] Update an Instagram comment reply. :raises InstagramApiNotSupportedError: Comment reply update is not supported by the Instagram Graph API.

Module contents