pystagram.graph_api.endpoints.hashtag package

Submodules

pystagram.graph_api.endpoints.hashtag.hashtag module

class pystagram.graph_api.endpoints.hashtag.hashtag.Hashtag(graph_api: PystagramGraphApi)

Bases: object

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

get(hashtag_id: str, fields: List[str | HashtagFields] | None = None, access_token: str | None = None)

Get fields and edges on an Instagram hashtag. :param hashtag_id: The ID of the hashtag to get fields and edges from. :type hashtag_id: str :param fields: A list of pystagram.graph_api.components.fields.hashtag_fields.HashtagFields to get from the hashtag, defaults to None :type fields: Optional[List[Union[str, HashtagFields]]], 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 /{hashtag-id} endpoint. :rtype: pystagram.helpers.api_client.api_response.PystagramApiResponse

property recent_media

The RecentMedia node of the Instagram Graph API. See the pystagram.graph_api.endpoints.hashtag.recent_media.RecentMedia class for more information.

property top_media

The TopMedia node of the Instagram Graph API. See the pystagram.graph_api.endpoints.hashtag.top_media.TopMedia class for more information.

pystagram.graph_api.endpoints.hashtag.recent_media module

class pystagram.graph_api.endpoints.hashtag.recent_media.RecentMedia(hashtag: Hashtag)

Bases: object

The RecentMedia node of the Instagram Graph API. :param hashtag: An instance of the Hashtag class. :type hashtag: Hashtag

get(hashtag_id: str, user_id: str | None = None, fields: List[str | MediaFields] | None = None, access_token: str | None = None)

Get a list of the most recently published photo and video Instagram Media objects published with a specific hashtag. :param hashtag_id: The ID of the hashtag to get recent media from. :type hashtag_id: str :param user_id: The ID of the Instagram user performing the query, inferred from the InstagramGraphApi instance if None, defaults to None :type user_id: str, optional :param fields: A list of pystagram.graph_api.components.fields.media_fields.MediaFields to get from the recent media, defaults to None :type fields: Optional[List[Union[str, MediaFields]]], 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 /{hashtag-id}/recent_media endpoint. :rtype: pystagram.helpers.api_client.api_response.PystagramApiResponse

pystagram.graph_api.endpoints.hashtag.top_media module

class pystagram.graph_api.endpoints.hashtag.top_media.TopMedia(hashtag: Hashtag)

Bases: object

The TopMedia node of the Instagram Graph API. :param hashtag: An instance of the Hashtag class. :type hashtag: Hashtag

get(hashtag_id: str, user_id: str | None = None, fields: List[str | MediaFields] | None = None, access_token: str | None = None)

Get a list of the most popular photo and video IG Media objects that have been tagged with the hashtag. :param hashtag_id: The ID of the hashtag to get top media from. :type hashtag_id: str :param user_id: The ID of the Instagram user performing the query, inferred from the InstagramGraphApi instance if None, defaults to None :type user_id: str, optional :param fields: A list of pystagram.graph_api.components.fields.media_fields.MediaFields to get from the top media, defaults to None :type fields: Optional[List[Union[str, MediaFields]]], 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 /{hashtag-id}/top_media endpoint. :rtype: pystagram.helpers.api_client.api_response.PystagramApiResponse

Module contents