{ "info": { "author": "santiher", "author_email": "", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "# Help Scout API client\n\nThis package contains a wrapper to query Help Scout's API.\nThe package tries to be as general and assume as little as possible about the\nAPI. Therefore, it will allow any endpoint to be requested and objects and\ntypes will be created on the fly.\n\nInformation about the available endpoints, objects and other stuff can be found\non the [API's documentation](https://developer.helpscout.com/mailbox-api/).\nThe client contains as little internal knowledge of the API as possible, mostly\nauthentication, pagination and how are objects returned.\n\nIn order to handle pagination calls to API are done inside a generator.\nAs a consequence, even post and deletes have to be \"nexted\" if using the *hit_*\nmethod.\n\n## Installation\n\nThe package can be installed cloning the repository and doing\n`python setup.py install` or `pip install .`.\n\nIt can also be install from pypi.org doing `pip install python-helpscout-v2`.\n\n## Authentication\n\nIn order to use the API you need an app id and app secret.\n\nMore about credentials can be found in\n[helpscout's documentation](https://developer.helpscout.com/mailbox-api/overview/authentication/).\n\n## General use\n\nThe general use is by instantiating a client and then hitting the API by\ndoing `client..(, )`. Where:\n\n* *Endpoint* is one of the endpoints defined in the API's documentation.\n* *Method* is one of get, post, patch, put or delete as defined in the API.\n* *Resource id* can be None or the id of the specific resource to access,\n update or delete. E.g.: a conversation id.\n* *Params* can be None, a string or a dictionary with the parameters to access\n in the get method or the data to send otherwise.\n\nTo access attributes of specific resources, like the tags of a conversation,\nyou can do:\n`client.[]..(, )`.\n\nExample: `client.conversations[212109].threads.get()`\n\n## Examples\n\n### Listing all users\n\n```python\n> from helpscout import HelpScout\n> hs = HelpScout(app_id='ax0912n', app_secret='axon129')\n> users = hs.users.get()\n> users[0]\nUser(id=12391,\n firstName=\"John\",\n lastName=\"Doe\",\n email=\"john.doe@gmail.com\",\n role=\"user\",\n timezone=\"America/New_York\",\n createdAt=\"2019-01-03T19:00:00Z\",\n updatedAt=\"2019-05-20T18:00:00Z\",\n type=\"user\",\n mention=\"johnny\",\n initials=\"JD\",\n _links={'self': {'href': 'https://api.helpscout.net/v2/users/12391'}})\n> users[1].id\n9320\n```\n\n### Hitting the API directly to get all mailboxes\n\n```python\n> from helpscout.client import HelpScout\n> hs = HelpScout(app_id='laknsdo', app_secret='12haosd9')\n> for mailbox in hs.hit('mailboxes', 'get'):\n> print(mailbox)\n{'mailboxes': [\n {'id': 1930,\n 'name': 'Fake Support',\n 'slug': '0912301u',\n 'email': 'support@fake.com',\n 'createdAt': '2018-12-20T20:00:00Z',\n 'updatedAt': '2019-05-01T16:00:00Z',\n '_links': {\n 'fields': {'href': 'https://api.helpscout.net/v2/mailboxes/1930/fields/'},\n 'folders': {'href': 'https://api.helpscout.net/v2/mailboxes/1930/folders/'},\n 'self': {'href': 'https://api.helpscout.net/v2/mailboxes/1930'}\n }\n }\n ]\n}\n```\n\n### Hitting the API directly to get all mailboxes but handling requests with pagination as iteration goes on\n\n```python\n> from helpscout.client import HelpScout\n> hs = HelpScout(app_id='laknsdo', app_secret='12haosd9')\n> for mailbox in hs.hit_('mailboxes', 'get'):\n> print(mailbox)\n{'mailboxes': [\n {'id': 1930,\n 'name': 'Fake Support',\n 'slug': '0912301u',\n 'email': 'support@fake.com',\n 'createdAt': '2018-12-20T20:00:00Z',\n 'updatedAt': '2019-05-01T16:00:00Z',\n '_links': {\n 'fields': {'href': 'https://api.helpscout.net/v2/mailboxes/1930/fields/'},\n 'folders': {'href': 'https://api.helpscout.net/v2/mailboxes/1930/folders/'},\n 'self': {'href': 'https://api.helpscout.net/v2/mailboxes/1930'}\n }\n }\n ]\n}\n```\n\n### Hitting the API directly to get a specific mailbox\n\n```python\n> from helpscout.client import HelpScout\n> hs = HelpScout(app_id='laknsdo', app_secret='12haosd9')\n> for mailbox in hs.hit('mailboxes', 'get', resource_id=1930):\n> print(mailbox)\n{'id': 1930,\n 'name': 'Fake Support',\n 'slug': '0912301u',\n 'email': 'support@fake.com',\n 'createdAt': '2018-12-20T20:00:00Z',\n 'updatedAt': '2019-05-01T16:00:00Z',\n '_links': {\n 'fields': {'href': 'https://api.helpscout.net/v2/mailboxes/1930/fields/'},\n 'folders': {'href': 'https://api.helpscout.net/v2/mailboxes/1930/folders/'},\n 'self': {'href': 'https://api.helpscout.net/v2/mailboxes/1930'}\n }\n}\n```\n\n### Hitting the API directly to get a specific mailbox dictionary style\n\nIn this case, you will have to select the first element of the list yourself,\nas it is not quite clear if one or more elements should be expected from the\napi depending on the endpoint.\n\n```python\n> from helpscout.client import HelpScout\n> hs = HelpScout(app_id='laknsdo', app_secret='12haosd9')\n> print(hs.mailboxes[1930].get())\nMailbox(\n id=1930,\n name='Fake Support',\n slug='0912301u',\n email='support@fake.com',\n createdAt='2018-12-20T20:00:00Z',\n updatedAt='2019-05-01T16:00:00Z',\n _links={\n 'fields': {'href': 'https://api.helpscout.net/v2/mailboxes/1930/fields/'},\n 'folders': {'href': 'https://api.helpscout.net/v2/mailboxes/1930/folders/'},\n 'self': {'href': 'https://api.helpscout.net/v2/mailboxes/1930'}\n }\n)\n```\n\n### Listing conversations using a dictionary parameters\n\n```python\n> from helpscout.client import HelpScout\n> hs = HelpScout(app_id='asd12', app_secret='onas912')\n> params = {'status': 'active'}\n> conversations = hs.conversations.get(params=params)\n```\n\n### Listing conversations using a string with parameters\n\n```python\n> from helpscout.client import HelpScout\n> hs = HelpScout(app_id='asdon123', app_secret='asdoin1')\n> params = 'query=(createdAt:[2019-06-20T00:00:00Z TO 2019-06-22T23:59:59Z])'\n> conversations = hs.conversations.get(params=params)\n```\n\n### Deleting a conversation\n\n```python\n> from helpscout.client import HelpScout\n> hs = HelpScout(app_id='asdon123', app_secret='asdoin1')\n> conversation_id = 10\n> hs.conversations.delete(resource_id=conversation_id)\n```\n\n### Requesting a pre-made report\n\n```python\n> from helpscout.client import HelpScout\n> hs = HelpScout(app_id='asdon123', app_secret='asdoin1')\n> report_url = 'reports/happiness?start=2019-06-01T00:00:00Z&end=2019-06-15:00:00Z'\n> next(hs.hit_(report_url, 'get'))\n...\n```\n\nor\n\n```python\n> from helpscout.client import HelpScout\n> hs = HelpScout(app_id='asdon123', app_secret='asdoin1')\n> report_url = 'reports/happiness?start=2019-06-01T00:00:00Z&end=2019-06-15:00:00Z'\n> hs.hit(report_url, 'get')\n...\n```\n\n### Adding tags to a conversation\n\n```python\n> from helpscout import HelpScout\n> helpscout_client = HelpScout(app_id='ax0912n', app_secret='axon129')\n> conversation_id = 999\n> endpoint = 'conversations/%s/tags' % conversation_id\n> data = {'tags': conversation_tags}\n> helpscout_client.hit(endpoint, 'put', data=data)\n```\n\nor\n\n```python\n> from helpscout import HelpScout\n> helpscout_client = HelpScout(app_id='ax0912n', app_secret='axon129')\n> conversation_id = 999\n> endpoint = 'conversations/%s/tags' % conversation_id\n> data = {'tags': conversation_tags}\n> next(helpscout_client.hit_(endpoint, 'put', data=data))\n```\n\nor\n\n```python\n> from helpscout import HelpScout\n> helpscout_client = HelpScout(app_id='ax0912n', app_secret='axon129')\n> conversation_id = 999\n> data = {'tags': conversation_tags}\n> helpscout_client.conversations[999].tags.put(data=data)\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/santiher/python-helpscout-v2", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "python-helpscout-v2", "package_url": "https://pypi.org/project/python-helpscout-v2/", "platform": "", "project_url": "https://pypi.org/project/python-helpscout-v2/", "project_urls": { "Homepage": "https://github.com/santiher/python-helpscout-v2" }, "release_url": "https://pypi.org/project/python-helpscout-v2/2.0.0/", "requires_dist": [ "requests" ], "requires_python": "", "summary": "Wrapper to query Help Scout v2 API", "version": "2.0.0" }, "last_serial": 5972187, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "5365dbe0b86cfda4d1100b7439497edb", "sha256": "eaa9ba8e5957497da0c2e94a55635c4c8bb6f91161d1cd8e4a65dad156ae959e" }, "downloads": -1, "filename": "python_helpscout_v2-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5365dbe0b86cfda4d1100b7439497edb", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8467, "upload_time": "2019-06-28T21:28:39", "url": "https://files.pythonhosted.org/packages/e9/ff/76d5ac40de52988ae45d6ebd6df7e45b34bb241914dfcd83b7af5447e06f/python_helpscout_v2-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "306b9c96d52e6943f7b6f594b86976ac", "sha256": "d2296aa9fe354d3f89f3050891036ed49c43c6fde45c1e76282ab1f82de39758" }, "downloads": -1, "filename": "python-helpscout-v2-0.1.0.tar.gz", "has_sig": false, "md5_digest": "306b9c96d52e6943f7b6f594b86976ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7348, "upload_time": "2019-06-28T21:28:41", "url": "https://files.pythonhosted.org/packages/76/c2/6258615b64dc4eb40b6f4f86fa932c18f2a7f0b9ee639cb320acb6c8aa54/python-helpscout-v2-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "63150523cfa4dd18781c8a2ea79d40cd", "sha256": "eb8b1096608515286956c35011ce0aebb65cffd06f1d5ea100e7d5e07f97d545" }, "downloads": -1, "filename": "python_helpscout_v2-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "63150523cfa4dd18781c8a2ea79d40cd", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8816, "upload_time": "2019-07-01T19:55:05", "url": "https://files.pythonhosted.org/packages/6e/12/2af73b8507ee4caad8f73458c1dc59e0eac6068f313ba4c359b2cbb18ebf/python_helpscout_v2-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1dc5c1e3783b17b355572f80953adb79", "sha256": "0315b3463af71d4a9fdd472a271b57777edfc4c792436040e82e7d6f9276222f" }, "downloads": -1, "filename": "python-helpscout-v2-0.2.0.tar.gz", "has_sig": false, "md5_digest": "1dc5c1e3783b17b355572f80953adb79", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7659, "upload_time": "2019-07-01T19:55:07", "url": "https://files.pythonhosted.org/packages/40/18/f3d8f018c8cc74da1aa5e0518d63d908b0090f57446bb204587910c9e28d/python-helpscout-v2-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "6fd140928c743701649a2fb9af4eeb52", "sha256": "6c9f1086a9a8a23b2ad9c47f2065d6979c21da0131db2dbef6497984c09e94a7" }, "downloads": -1, "filename": "python_helpscout_v2-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6fd140928c743701649a2fb9af4eeb52", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8923, "upload_time": "2019-07-08T17:04:18", "url": "https://files.pythonhosted.org/packages/56/d7/acdd1e1bc646554bdf3e2dcf9b9d9a4e61fdd9d0d20cf3a1b99b1cf8c19e/python_helpscout_v2-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "583f82c6cf9c77e84d89a605833824b0", "sha256": "1d3c51842420b4f664499dffaa3b040d82a83bf8e05a2dbddf123ed011f93f4c" }, "downloads": -1, "filename": "python-helpscout-v2-0.2.1.tar.gz", "has_sig": false, "md5_digest": "583f82c6cf9c77e84d89a605833824b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8415, "upload_time": "2019-07-08T17:04:19", "url": "https://files.pythonhosted.org/packages/20/46/7489c47a512859c747207d3080ede372cb73fa5d435de9bc7b2985966dba/python-helpscout-v2-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "85cadb7ebee73b2e1e3c4dbe07dc0832", "sha256": "f06707cf39ea543539cba2600a4973b8f89b87e2ac2bcf90a8602ec2ec10c179" }, "downloads": -1, "filename": "python_helpscout_v2-0.2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "85cadb7ebee73b2e1e3c4dbe07dc0832", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8930, "upload_time": "2019-07-12T19:01:56", "url": "https://files.pythonhosted.org/packages/14/d0/b0657b72acd47a679332fd035ecc01a5d2b48d67f7833de9e9d61af75f32/python_helpscout_v2-0.2.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "efdb930414fca20c97578e2c71578ab6", "sha256": "af537a3b4a720da1cb9bd4c83016756b07c6bc18270f1c48abb2856535fc9bbc" }, "downloads": -1, "filename": "python-helpscout-v2-0.2.2.tar.gz", "has_sig": false, "md5_digest": "efdb930414fca20c97578e2c71578ab6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8426, "upload_time": "2019-07-12T19:01:58", "url": "https://files.pythonhosted.org/packages/7e/7a/1fea01c9227bbbec1047666678f82d076d4e42690868e9fc43509ec3d8b1/python-helpscout-v2-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "ee247db24fdcbabe2911f11c51293466", "sha256": "b2b9347d88bbf2ddb44ee74f6e06b0bdf6eaeeac141d57259fb1ea9210cca803" }, "downloads": -1, "filename": "python_helpscout_v2-0.2.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ee247db24fdcbabe2911f11c51293466", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9037, "upload_time": "2019-07-16T17:06:31", "url": "https://files.pythonhosted.org/packages/81/bf/cb4c6e15c92e1903f517e822465d8385bb257a5698305f604c78e3d928e2/python_helpscout_v2-0.2.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e9dffe16768f9e907813972aa678fc53", "sha256": "3260a8b6c380901fb4f94514c9bdccca1786f1fcdaf794898f3a287f08dc972e" }, "downloads": -1, "filename": "python-helpscout-v2-0.2.3.tar.gz", "has_sig": false, "md5_digest": "e9dffe16768f9e907813972aa678fc53", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8592, "upload_time": "2019-07-16T17:06:33", "url": "https://files.pythonhosted.org/packages/76/bd/1da013c6f87f6f7cff1ff0672115c56b5de3d9c89e10b871438bc82477dc/python-helpscout-v2-0.2.3.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "d1013a1a503669529d3488bb4cc0010b", "sha256": "e9d3ff3d793a0afed00fc1692f00b371f2559ec322b85181674f8d62316eb7b2" }, "downloads": -1, "filename": "python_helpscout_v2-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d1013a1a503669529d3488bb4cc0010b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10327, "upload_time": "2019-09-18T04:05:16", "url": "https://files.pythonhosted.org/packages/59/db/56a2d25ec0531ee9cc6036edf96c57ec4ec4f782156f0489b93bd3bb2bb3/python_helpscout_v2-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "131433fe93b274094f71d0fcee1d7445", "sha256": "ae6fcbbee4b46f7e1347ef063df711a7595467aabc724b0fb5a7c53ed9081ef4" }, "downloads": -1, "filename": "python-helpscout-v2-1.0.0.tar.gz", "has_sig": false, "md5_digest": "131433fe93b274094f71d0fcee1d7445", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15083, "upload_time": "2019-09-18T04:05:19", "url": "https://files.pythonhosted.org/packages/29/6d/5aae9e98e8cdfdb5fe60b77095a8387534675292f771183cd176a13a34cd/python-helpscout-v2-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "e6aec768890e3785bf584059d8533bfb", "sha256": "a516d9846d466c26f9a5795b816e453a30023cf5a3739bcac88820e0163602e2" }, "downloads": -1, "filename": "python_helpscout_v2-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e6aec768890e3785bf584059d8533bfb", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10610, "upload_time": "2019-10-14T15:51:04", "url": "https://files.pythonhosted.org/packages/55/33/ee2a75f5faba22395670f60cafff2b37b8b2203ab3a99e9861a2b3ebe326/python_helpscout_v2-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f6a6a336135e4141b7bcfffb8a8e5841", "sha256": "7e9ff2a27b3142bbb16d111b05739046dbac1d518b6d6fec9e4b21a341f9f278" }, "downloads": -1, "filename": "python-helpscout-v2-1.0.1.tar.gz", "has_sig": false, "md5_digest": "f6a6a336135e4141b7bcfffb8a8e5841", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15760, "upload_time": "2019-10-14T15:51:07", "url": "https://files.pythonhosted.org/packages/4f/b3/492f13a0bed17fe940ad5e909f6c26ac34e9f39f14868c56c194e883798c/python-helpscout-v2-1.0.1.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "3410daa13431337df94c08172f2e702a", "sha256": "6d2c883f313c6caca44ec5a9ce0b1dc31b3ebd19c650d44b06066bc3d9b4708c" }, "downloads": -1, "filename": "python_helpscout_v2-2.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3410daa13431337df94c08172f2e702a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10644, "upload_time": "2019-10-14T15:59:13", "url": "https://files.pythonhosted.org/packages/97/fb/8908c293ab84dc7fb7c212417529afa182a3d132c7a22cd84c07c5599a3d/python_helpscout_v2-2.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "65dd308f35eb424151afe345765fe2a5", "sha256": "a41fbb4569ebfdf246c08012c53b3e0162d5d22955b93d455310b436de08cb4d" }, "downloads": -1, "filename": "python-helpscout-v2-2.0.0.tar.gz", "has_sig": false, "md5_digest": "65dd308f35eb424151afe345765fe2a5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15894, "upload_time": "2019-10-14T15:59:16", "url": "https://files.pythonhosted.org/packages/b1/30/e09568c13952148976413143d542f3c3b8b49254e5c9740af913e3c3d324/python-helpscout-v2-2.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3410daa13431337df94c08172f2e702a", "sha256": "6d2c883f313c6caca44ec5a9ce0b1dc31b3ebd19c650d44b06066bc3d9b4708c" }, "downloads": -1, "filename": "python_helpscout_v2-2.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3410daa13431337df94c08172f2e702a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10644, "upload_time": "2019-10-14T15:59:13", "url": "https://files.pythonhosted.org/packages/97/fb/8908c293ab84dc7fb7c212417529afa182a3d132c7a22cd84c07c5599a3d/python_helpscout_v2-2.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "65dd308f35eb424151afe345765fe2a5", "sha256": "a41fbb4569ebfdf246c08012c53b3e0162d5d22955b93d455310b436de08cb4d" }, "downloads": -1, "filename": "python-helpscout-v2-2.0.0.tar.gz", "has_sig": false, "md5_digest": "65dd308f35eb424151afe345765fe2a5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15894, "upload_time": "2019-10-14T15:59:16", "url": "https://files.pythonhosted.org/packages/b1/30/e09568c13952148976413143d542f3c3b8b49254e5c9740af913e3c3d324/python-helpscout-v2-2.0.0.tar.gz" } ] }