Instagram¶
-
class
instagram.
Instagram
(client_id=None, access_token=None)¶ Create an Instagram service.
Variables: - client_id (str) – Associates your script with a specific application. Required if no access_token.
- access_token (str) – For some requests, specifically those made on behalf of a user, authentication is needed. Required if no client_id.
AuthenticatedUser¶
-
Instagram.
authenticated_user
()¶ Return the resource corresponding to the authenticated user.
LikedMedia¶
-
AuthenticatedUser.
liked_media
()¶ Return the resource corresponding to all liked media for the user.
RequestedBy¶
-
AuthenticatedUser.
requested_by
()¶ Return the resource corresponding to all requests for the user.
-
RequestedBy.
get
()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
AuthenticatedUser.
get
()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
RecentMedia¶
-
Geography.
recent_media
()¶ Return the resource corresponding to all recent media for the greography.
-
RecentMedia.
get
(count=None, max_timestamp=None, min_timestamp=None, min_id=None, max_id=None)¶ Fetch all of the objects.
Variables: - count (int) – Count of media to return.
- max_timestamp (int) – Return media before this UNIX timestamp.
- min_timestamp (int) – Return media after this UNIX timestamp.
- min_id (int) – Return media later than this min_id.
- max_id (int) – Return media earlier than this max_id.
RecentMedia¶
-
Location.
recent_media
()¶ Return the resource corresponding to all recent media for the location.
-
RecentMedia.
get
(count=None, max_timestamp=None, min_timestamp=None, min_id=None, max_id=None) Fetch all of the objects.
Variables: - count (int) – Count of media to return.
- max_timestamp (int) – Return media before this UNIX timestamp.
- min_timestamp (int) – Return media after this UNIX timestamp.
- min_id (int) – Return media later than this min_id.
- max_id (int) – Return media earlier than this max_id.
-
Location.
get
()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
Locations¶
-
Instagram.
locations
()¶ Return the resource corresponding to all locations.
-
Locations.
get
(lat=None, distance=None, lng=None, foursquare_v2_id=None, foursquare_id=None)¶ fetch all locations by geographic coordinate.
Variables: - lat (float) – Latitude of the center search coordinate. If used, lng is required.
- distance (int) – Default is 1km (distance=1000), max distance is 5km.
- lng (float) – Longitude of the center search coordinate. If used, lat is required.
- foursquare_v2_id (str) – A foursquare v2 api location id. If used, you are not required to use lat and ln
- foursquare_id (str) – A foursquare v1 api location id. If used, you are not required to use lat and lng. Note that this method is deprecated; you should use the new foursquare IDs with V2 of their API.
Comment¶
-
Media.
comment
(comment_id)¶ Return the resource corresponding to a single comment for the media.
-
Comment.
delete
()¶ Delete this resource.
Comments¶
-
Media.
comments
()¶ Return the resource corresponding to all comments for the media.
-
Comments.
create
(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Comments.
get
()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
Likes¶
-
Media.
likes
()¶ Return the resource corresponding to all likes for the media.
-
Likes.
create
()¶ Set a like on this media by the currently authenticated user.
-
Likes.
delete
()¶ Remove a like on this media by the currently authenticated user.
-
Likes.
get
()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
Media.
get
()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
Medias¶
-
Instagram.
medias
()¶ Return the resource corresponding to all medias.
-
Medias.
get
(lat=None, max_timestamp=None, min_timestamp=None, lng=None, distance=None)¶ Fetch all of the objects.
Variables: - lat (float) – Latitude of the center search coordinate. If used, lng is required.
- max_timestamp (int) – A unix timestamp. All media returned will be taken later than this timestamp.
- min_timestamp (int) – A unix timestamp. All media returned will be taken earlier than this timestamp.
- lng (float) – Longitude of the center search coordinate. If used, lat is required.
- distance (int) – Default is 1km (distance=1000), max distance is 5km.
PopularMedia¶
-
Instagram.
popular_media
()¶ Return the resource corresponding to all most popular media.
-
PopularMedia.
get
()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
RecentMedia¶
Return the resource corresponding to all recent media for the tag.
-
RecentMedia.
get
(count=None, max_timestamp=None, min_timestamp=None, min_id=None, max_id=None) Fetch all of the objects.
Variables: - count (int) – Count of media to return.
- max_timestamp (int) – Return media before this UNIX timestamp.
- min_timestamp (int) – Return media after this UNIX timestamp.
- min_id (int) – Return media later than this min_id.
- max_id (int) – Return media earlier than this max_id.
For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
Tags¶
Return the resource corresponding to all tags.
fetch all tags by name.
Variables: query (str) – A valid tag name without a leading #. (eg. snow, nofilter).
FollowedBy¶
-
User.
followed_by
()¶ Return the resource corresponding to all followers for the user.
-
FollowedBy.
get
()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
Follows¶
-
User.
follows
()¶ Return the resource corresponding to all follows for the user.
-
Follows.
get
()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
RecentMedia¶
-
User.
recent_media
()¶ Return the resource corresponding to all recent media for the user.
-
RecentMedia.
get
(count=None, max_timestamp=None, min_timestamp=None, min_id=None, max_id=None) Fetch all of the objects.
Variables: - count (int) – Count of media to return.
- max_timestamp (int) – Return media before this UNIX timestamp.
- min_timestamp (int) – Return media after this UNIX timestamp.
- min_id (int) – Return media later than this min_id.
- max_id (int) – Return media earlier than this max_id.
Relationship¶
-
User.
relationship
()¶ Return the resource corresponding to all relationships for the user.
-
Relationship.
get
()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
-
Relationship.
update
(action)¶ Modifies the relationship between the current user and the target user.
Variables: action (str) – One of follow/unfollow/block/unblock/approve/deny.
-
User.
get
()¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.