{ "info": { "author": "Jacek Ostanski", "author_email": "jacek@arabel.la", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP" ], "description": "===========\naa-intercom\n===========\n|travis|_ |pypi|_ |coveralls|_ |requiresio|_\n\nDjango integration for Intercom_ API\n\nThe **aa-intercom** package allows to\n\n* upload user data to Intercom including the last seen feature\n* push data to the Intercom API according to any event happening in your app\n\nInstallation\n============\nTo use, add ``aa_intercom`` to your ``INSTALLED_APPS``, and then migrate the project.\n\nSetting up models\n-----------------\n**aa-intercom** requires a few fields in the user model to be set. To make it work, you need to apply the\n``aa_intercom.mixins.IntercomUserMixin`` to your custom user model (if you do not have your own custom user model set,\ncheck the `documentation `_).\nThe ``IntercomUserMixin.get_intercom_data()`` method can be overloaded to change the default user data sent to the Intercom API.\n\nIf you want to use the user last seen feature on Intercom, execute the following task right after the user logs in:\n::\n\n from aa_intercom.tasks import push_account_last_seen_tasks\n push_account_last_seen_task.apply_async(args=[user.id], countdown=100)\n\nConfiguration\n-------------\nAnother step is to add event types to project settings, for example:\n::\n\n INTERCOM_EVENT_TYPES = (\n (\"example\", _(\"Example Type\")),\n (\"generic\", _(\"Generic Type\"))\n )\n\nThe last thing is to specify Intercom credentials in project settings:\n::\n\n INTERCOM_API_ACCESS_TOKEN = \"your access token\"\n\nMake sure, you have the ``CACHES`` set (see: `docs `_),\nand also as this app uses Celery_, you need to have it configured.\n\nTo provide id prefix for Intercom user id, set ``INTERCOM_ID_PREFIX`` to desired value.\n\nUsing the IntercomEvent model\n-----------------------------\nIf you want to send any kind of event data to the Intercom API, create an instance of **IntercomEvent** filled with\ndesired information, for example:\n::\n\n IntercomEvent.objects.create(\n user=request.user, type=\"generic\", text_content=post.content,\n content_type=ContentType.objects.get_for_model(Post), object_id=post.id)\n\nThen it will be automatically sent to the Intercom API. Unfortunately Intercom API has a tendency to go down often,\ntherefore to make sure all events will be sent, setup a cronjob running the ``resend_intercom_events`` command\nwhich will push all remaining IntercomEvent objects to the API.\n\nSending unregistered user data\n------------------------------\nIn case an upload of unregistered user data is needed, the ``aa_intercom.tasks.push_not_registered_user_data_task`` task\ncan be used (**email** and **name** keys are required), for example:\n::\n\n push_not_registered_user_data_task.apply_async(args=[{\n \"email\": \"test@arabel.la\",\n \"name\": \"Foo Bar\",\n \"pseudonym\": \"foobar\"\n }])\n\n\nCommands\n========\n* ``resend_intercom_events`` - resends all events (in case something went wrong, should be run chronically)\n\nSupport\n=======\n* Django 1.11\n* Python 2.7, 3.6\n\n.. |travis| image:: https://secure.travis-ci.org/ArabellaTech/aa-intercom.svg?branch=master\n.. _travis: http://travis-ci.org/ArabellaTech/aa-intercom\n\n.. |pypi| image:: https://img.shields.io/pypi/v/aa-intercom.svg\n.. _pypi: https://pypi.python.org/pypi/aa-intercom\n\n.. |coveralls| image:: https://coveralls.io/repos/github/ArabellaTech/aa-intercom/badge.svg?branch=master\n.. _coveralls: https://coveralls.io/github/ArabellaTech/aa-intercom\n\n.. |requiresio| image:: https://requires.io/github/ArabellaTech/aa-intercom/requirements.svg?branch=master\n.. _requiresio: https://requires.io/github/ArabellaTech/aa-intercom/requirements/\n\n.. _Intercom: http://intercom.com\n\n.. _Celery: http://www.celeryproject.org/", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ArabellaTech/aa-intercom", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "aa-intercom", "package_url": "https://pypi.org/project/aa-intercom/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/aa-intercom/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ArabellaTech/aa-intercom" }, "release_url": "https://pypi.org/project/aa-intercom/1.0.1/", "requires_dist": null, "requires_python": null, "summary": "Django integration for Intercom API", "version": "1.0.1" }, "last_serial": 4408016, "releases": { "0.0.1": [], "0.0.2": [ { "comment_text": "", "digests": { "md5": "cd93e17248ce81f68c58bb6156968b45", "sha256": "f6a6f37fbbaba74b8fc74853226cfb28898e24702815db191c7d5c0f225e4140" }, "downloads": -1, "filename": "aa_intercom-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cd93e17248ce81f68c58bb6156968b45", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 39015, "upload_time": "2017-05-25T15:30:27", "url": "https://files.pythonhosted.org/packages/4e/e3/7188d987bb3df773a68262c3d1b0968837bff51334d054008686262e5812/aa_intercom-0.0.2-py2.py3-none-any.whl" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "d99cd8375eb83a02f009c01342a44935", "sha256": "611d1c9629040a6b1ebadeeb3f9df85450f390b708ab5e3674c35a951fe1b6b6" }, "downloads": -1, "filename": "aa_intercom-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d99cd8375eb83a02f009c01342a44935", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 16572, "upload_time": "2017-06-05T10:06:11", "url": "https://files.pythonhosted.org/packages/ca/f3/413116f1ab406eea088cc29a853673a0b4480439cab23c21cf58ab219b99/aa_intercom-1.0.0-py2.py3-none-any.whl" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "df5f07e211bed9da696d851acefe83ff", "sha256": "6bac1fe9292d8b7881d50b3655268e3f8f3b83c6d7f0c93c86ad35a467d4cc90" }, "downloads": -1, "filename": "aa_intercom-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "df5f07e211bed9da696d851acefe83ff", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 16987, "upload_time": "2017-06-12T10:19:58", "url": "https://files.pythonhosted.org/packages/8a/dd/2c923898ed75f70e37d5f5eecee91c0de060260704c7b5a9344b539b0e88/aa_intercom-1.0.1-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "df5f07e211bed9da696d851acefe83ff", "sha256": "6bac1fe9292d8b7881d50b3655268e3f8f3b83c6d7f0c93c86ad35a467d4cc90" }, "downloads": -1, "filename": "aa_intercom-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "df5f07e211bed9da696d851acefe83ff", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 16987, "upload_time": "2017-06-12T10:19:58", "url": "https://files.pythonhosted.org/packages/8a/dd/2c923898ed75f70e37d5f5eecee91c0de060260704c7b5a9344b539b0e88/aa_intercom-1.0.1-py2.py3-none-any.whl" } ] }