{ "info": { "author": "MyBook", "author_email": "dev@mybook.ru", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "==========\nAppMetrica\n==========\n\nApplication for integrating with Yandex AppMetrica https://appmetrica.yandex.ru/\n\nYandex Docs https://tech.yandex.ru/appmetrica/doc/mobile-api/push/use-cases-docpage/\n\n.. image:: https://travis-ci.org/MyBook/appmetrica.svg?branch=master\n :target: https://travis-ci.org/MyBook/appmetrica\n.. image:: https://codecov.io/gh/MyBook/appmetrica/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/MyBook/appmetrica\n\nBefore using API it is necessary:\n\n1. Get `application id` from your account in appmetrica.yandex.ru\n\n2. [Generate access token](https://tech.yandex.ru/appmetrica/doc/mobile-api/intro/authorization-docpage/)\n\nSend push\n---------\n\n1. Create `API` instance::\n\n from appmetrica.push.api import PushAPI\n\n api = PushAPI(application_id, access_token)\n\n2. Create group to combine the sending in the report::\n\n group_id = api.create_group('test-push-1')\n\n3. Pass `group_id`, `device list` and `message` to send_push method and call::\n\n from appmetrica.push.api import TokenTypes\n\n transfer_id = api.send_push(group_id, devices=devices, ios_message=ios_message,\n android_message=android_message, tag='harry potter')\n\n devices - list of token objects like:\n [\n {\n \"id_type\": TokenTypes.APPMETRICA_DEVICE_ID,\n \"id_values\": [\"123456789\", \"42\"]\n },\n {\n \"id_type\": TokenTypes.IOS_IFA,\n \"id_values\": [\"8A690667-6204-4A6A-9B38-85DE016.....\"]\n },\n {\n \"id_type\": TokenTypes.ANDROID_PUSH_TOKEN,\n \"id_values\": [\"eFfxdO7uCMw:APA91bF1tN3X3BAbiJXsQhk-...\"]\n }\n ]\n\n ios_message - push message for ios devices\n android_message - push message for android devices:\n {\n \"silent\": false,\n \"content\": {\n \"title\": \"string\",\n \"text\": \"string\",\n \"sound\": \"disable\",\n \"data\": \"string\"\n }\n }\n\n4. To check status of push call `check_status` method::\n\n status = api.check_status(transfer_id)\n\n\nList of available groups\n------------------------\n\n1. Create `API` instance::\n\n from appmetrica.push.api import PushAPI\n\n api = PushAPI(application_id, access_token)\n\n2. Get list of groups\n\n group_id = api.get_groups()\n\n\nExport tokens\n-------------\n\n1. Create `API` instance::\n\n from appmetrica.export.api import ExportAPI\n\n api = ExportAPI(application_id, access_token)\n\n2. Call push_tokens method with necessary fields::\n\n data = api.export_push_tokens('token', 'ios_ifa', 'google_aid')\n\n\nExport devices\n--------------\n\n1. Create `API` instance::\n\n from appmetrica.export.api import ExportAPI\n\n api = ExportAPI(application_id, access_token)\n\n2. Call push_tokens method with necessary fields::\n\n date_till = datetime.now()\n date_from = date_till - timedelta(days=7)\n\n data = api.export_installations('ios_ifv', date_from=date_from, date_till=date_till)\n\n\n\nPublish a release on PyPi\n-------------------------\n\nInstall `twine `_ globally::\n\n pip install twine\n\n1. Don't forget to bump the package version::\n\n __version__ = '1.0.2'\n\n2. Build the release::\n\n python setup.py sdist\n\n3. Publish the release on PyPi::\n\n twine upload dist/litresapi-1.0.1.tar.gz\n\n\nChangelog\n---------\n\n\n1.0.2 (2019-01-09)\n------------------\n* Increased request timeout to 30 seconds\n\n\n1.0.1 (2018-12-17)\n------------------\n* Replace deprecated `send` method to `send-batch`\n\n\n1.0.0 (2017-12-14)\n------------------\n* Initial release", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/MyBook/appmetrica", "keywords": "appmetrica", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "appmetrica", "package_url": "https://pypi.org/project/appmetrica/", "platform": "", "project_url": "https://pypi.org/project/appmetrica/", "project_urls": { "Homepage": "https://github.com/MyBook/appmetrica" }, "release_url": "https://pypi.org/project/appmetrica/1.0.3/", "requires_dist": null, "requires_python": "", "summary": "API for integration with Yandex AppMetrica", "version": "1.0.3" }, "last_serial": 5626589, "releases": { "1.0.3": [ { "comment_text": "", "digests": { "md5": "a409d7f970d2ddb3d0cfc910972661d7", "sha256": "4ee694fabe6fb9de2f1922f90d3130f4284f6d48f3fd394f747adf64a5fe1c76" }, "downloads": -1, "filename": "appmetrica-1.0.3.tar.gz", "has_sig": false, "md5_digest": "a409d7f970d2ddb3d0cfc910972661d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9150, "upload_time": "2019-08-02T21:39:07", "url": "https://files.pythonhosted.org/packages/26/f4/72ace1bf445035732e0c954826c3efc8bd5f38277653a49de37e65a5a376/appmetrica-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a409d7f970d2ddb3d0cfc910972661d7", "sha256": "4ee694fabe6fb9de2f1922f90d3130f4284f6d48f3fd394f747adf64a5fe1c76" }, "downloads": -1, "filename": "appmetrica-1.0.3.tar.gz", "has_sig": false, "md5_digest": "a409d7f970d2ddb3d0cfc910972661d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9150, "upload_time": "2019-08-02T21:39:07", "url": "https://files.pythonhosted.org/packages/26/f4/72ace1bf445035732e0c954826c3efc8bd5f38277653a49de37e65a5a376/appmetrica-1.0.3.tar.gz" } ] }