Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gearplug/instagram-python
Instagram wrapper written in Python
https://github.com/gearplug/instagram-python
api instagram library notifications python subscription webhook wrapper
Last synced: about 2 months ago
JSON representation
Instagram wrapper written in Python
- Host: GitHub
- URL: https://github.com/gearplug/instagram-python
- Owner: GearPlug
- License: mit
- Created: 2018-01-10T16:58:20.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-09T16:35:38.000Z (about 6 years ago)
- Last Synced: 2024-11-01T06:35:14.819Z (about 2 months ago)
- Topics: api, instagram, library, notifications, python, subscription, webhook, wrapper
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 2
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# instagram-python
instagram-python is an API wrapper for Instagram written in Python
## Installing
```
pip install instagram-python-lib
```## Usage
```
from instagram.client import Clientclient = 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')
```## Contributing
We are always grateful for any kind of contribution including but not limited to bug reports, code enhancements, bug fixes, and even functionality suggestions.
#### You can report any bug you find or suggest new functionality with a new [issue](https://github.com/GearPlug/instagram-python/issues).
#### If you want to add yourself some functionality to the wrapper:
1. Fork it ( https://github.com/GearPlug/instagram-python )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Adds my new feature')
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request