Metadata-Version: 2.1
Name: mention
Version: 0.1
Summary: A Python wrapper around the Mention API.
Home-page: https://github.com/mazi76erX2/mention-python
Author: Xolani Mazibuko
Author-email: mazi76erx@gmail.com
License: UNKNOWN
Project-URL: Coverage, https://codecov.io/gh/mazi76erX2/mention-python
Project-URL: Documentation, https://mention-python.readthedocs.io/en/latest/
Project-URL: Source Code, https://github.com/mazi76erX2/mention-python
Keywords: mention api examples
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Description-Content-Type: text/x-rst
Requires-Dist: requests
Requires-Dist: requests-oauth2 (>=0.3.0)

==============
Mention-Python
==============

.. image:: https://img.shields.io/pypi/v/MentionAPI.svg
    :target: https://pypi.python.org/pypi/MentionAPI

.. image:: https://travis-ci.org/mazi76erX2/mention-python.svg?branch=master
    :target: https://travis-ci.org/mazi76erX2/mention-python

.. image:: https://codecov.io/gh/mazi76erX2/mention-python/branch/master/graph/badge.svg
  :target: https://codecov.io/gh/mazi76erX2/mention-python

.. image:: https://readthedocs.org/projects/mention-python/badge/?version=latest
    :target: https://mention-python.readthedocs.org/en/latest

**A Python wrapper around the Mention API.**

Installation
------------

.. code-block:: console

    $ python3 -m pip install mention


.. code-block:: python

    >>> 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**

.. code-block:: python

    >>> 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**

.. code-block:: python

    >>> 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**

 - `Full Documentation`_
     - `Installation`_
     - `Basic Usage`_
     - `Contributing`_

.. _Full Documentation: http:///mention-python.readthedocs.org/en/latest/
.. _Installation: http://mention-python.readthedocs.org/en/latest/pages/installation.html
.. _Basic Usage: http:///mention-python.readthedocs.org/en/latest/pages/quickstart.html
.. _Contributing: http:///mention-python.readthedocs.org/en/latest/pages/contributing.html

