A Python wrapper around the Mention API.
Project description
A Python wrapper around the Mention API.
Installation
$ python3 -m pip install mention
>>> from mention import FetchAMentionAPI
>>> first_mention = FetchAMentionAPI('access_token', 'account_id', 'alert_id', 'mention_id')
>>> first_mention_data = first_mention.query()
>>> title = first_mention_data['title']
Examples
Fetch all alerts of an account
>>> allAlerts = mention.FetchAlertsAPI(access_token, account_id)
>>> data = nandosAlert.query()
>>> alertsList = data['alerts']
>>> alertsList[5]['alert']['name']
'Nandos'
>>> data['alert']['query']['included_keywords']
['Nandos', 'Flame-grilled Chicken', 'Peri-Peri Sauce']
Fetch a mention
>>> nandosMention = mention.FetchAMentionAPI(access_token, account_id, alert_id, mention_id)
>>> data = nandosMention.query()
>>> data['title']
"Nando's launches their own food ordering app"
>>> data['description']
"Nando's has launched their own app that will allow people to order their favourite meal from the comfort
... of their own home."
>>> data['original_url']
'https:\/\/www.iol.co.za\/business-report\/technology\/nandos-launches-their-own-food-
... ordering-app-18378360'
Read More
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
mention-0.1.tar.gz
(6.7 kB
view details)
Built Distribution
mention-0.1-py3-none-any.whl
(8.0 kB
view details)
File details
Details for the file mention-0.1.tar.gz
.
File metadata
- Download URL: mention-0.1.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 998db351380060ad5ca20d844398cbf5a5eac447bd809a3abbb0c9929f034a2a |
|
MD5 | 96a2187a3846094769392685936a8109 |
|
BLAKE2b-256 | 3b872b44c801232d8e5f3ba057dcc97d90c5f4dad90d3480be544e826cc8d2a4 |
File details
Details for the file mention-0.1-py3-none-any.whl
.
File metadata
- Download URL: mention-0.1-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 786cf064a982f5d9745eb8332fa7f0eef06b4e9e7cec26468c1b529fbf1482e1 |
|
MD5 | d63c7cf7c648fc69f71dc680a0020e02 |
|
BLAKE2b-256 | 3c7f6d1ea6010fd86aead9ff97fbbecbe174b3bf54ed6498202e302d4f6671f3 |