API wrapper for Instagram written in Python
Project description
# instagram-python
instagram-python is an API wrapper for Instagram written in Python
## Installing
```
pip install instagram-python-lib
```
## Usage
```
from instagram.client import Client
client = Client('CLIENT_ID', 'CLIENT_SECRET')
```
Get authorization url
```
scopes = ['basic']
url = client.authorization_url('REDIRECT_URI', scopes)
```
Exchange the code for a token
```
token = client.exchange_code('REDIRECT_URI', 'CODE')
```
Set the token
```
client.set_access_token('TOKEN')
```
Get account information
```
response = client.get_account(')
```
Get media
```
response = client.get_media('MEDIA_ID')
```
### Webhooks
Create subscription
```
response = client.create_subscription('user', 'media', 'A_SECRET_RANDOM_KEY', 'NOTIFICATION_URL')
```
Get subscriptions
```
response = client.get_subscriptions()
```
Delete subscription
```
response = client.delete_subscription('SUBSCRIPTION_ID')
```
instagram-python is an API wrapper for Instagram written in Python
## Installing
```
pip install instagram-python-lib
```
## Usage
```
from instagram.client import Client
client = Client('CLIENT_ID', 'CLIENT_SECRET')
```
Get authorization url
```
scopes = ['basic']
url = client.authorization_url('REDIRECT_URI', scopes)
```
Exchange the code for a token
```
token = client.exchange_code('REDIRECT_URI', 'CODE')
```
Set the token
```
client.set_access_token('TOKEN')
```
Get account information
```
response = client.get_account(')
```
Get media
```
response = client.get_media('MEDIA_ID')
```
### Webhooks
Create subscription
```
response = client.create_subscription('user', 'media', 'A_SECRET_RANDOM_KEY', 'NOTIFICATION_URL')
```
Get subscriptions
```
response = client.get_subscriptions()
```
Delete subscription
```
response = client.delete_subscription('SUBSCRIPTION_ID')
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file instagram-python-lib-0.1.2.tar.gz
.
File metadata
- Download URL: instagram-python-lib-0.1.2.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f69be35e96104e98c3c3802d6d28207b9abd0c0fe77578daddb740f72c824dd |
|
MD5 | bdf3521a1adadda7a8cb982b34b540cd |
|
BLAKE2b-256 | 37e308158172d5733b9c9454390d21ad57dc57f50989e298359821af289348af |