Skip to main content

A Python wrapper around the Mention API.

Project description

https://img.shields.io/pypi/v/MentionAPI.svg https://travis-ci.org/mazi76erX2/mention-python.svg?branch=master https://codecov.io/gh/mazi76erX2/mention-python/branch/master/graph/badge.svg https://readthedocs.org/projects/mention-python/badge/?version=latest

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

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mention, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size mention-0.1-py3-none-any.whl (8.0 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size mention-0.1.tar.gz (6.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page