{ "info": { "author": "OohlaLabs Limited", "author_email": "packages@oohlalabs.co.nz", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "=========\r\nHasOffers\r\n=========\r\n\r\n.. image:: https://pypip.in/version/hasoffers/badge.svg\r\n :target: https://pypi.python.org/pypi/hasoffers/\r\n\r\n.. image:: https://pypip.in/format/hasoffers/badge.svg\r\n :target: https://pypi.python.org/pypi/hasoffers/\r\n\r\n.. image:: https://travis-ci.org/jthi3rry/hasoffers.svg?branch=master\r\n :target: https://travis-ci.org/jthi3rry/hasoffers\r\n\r\n.. image:: https://coveralls.io/repos/jthi3rry/hasoffers/badge.png?branch=master\r\n :target: https://coveralls.io/r/jthi3rry/hasoffers\r\n\r\n.. image:: https://pypip.in/py_versions/hasoffers/badge.svg\r\n :target: https://pypi.python.org/pypi/hasoffers/\r\n\r\n.. image:: https://pypip.in/license/hasoffers/badge.svg\r\n :target: https://pypi.python.org/pypi/hasoffers/\r\n\r\nThis package provides a Python low-level client for the `HasOffers `_ API.\r\n\r\n\r\nInstallation\r\n------------\r\n::\r\n\r\n pip install hasoffers\r\n\r\n\r\nUsage Examples\r\n--------------\r\n\r\nInstantiate a client with your network token and network id::\r\n\r\n\r\n from hasoffers import BrandClient\r\n\r\n client = BrandClient(\"networktoken\", \"networkid\")\r\n\r\nOr for the Affiliate API::\r\n\r\n from hasoffers import AffiliateClient\r\n\r\n client = AffiliateClient(\"api_key\", \"network_id\")\r\n\r\nThe general usage to call an API method is ``client.request(target, method, **params)``.\r\n\r\nFor example, to retrieve all offer categories::\r\n\r\n\r\n response = client.request(\"Application\", \"findAllOfferCategories\",\r\n filters={\r\n \"status\": {\"NOT_EQUAL\": \"deleted\"}\r\n })\r\n\r\n if response.success:\r\n # do something with\r\n response.data\r\n\r\n\r\nOr to retrieve all conversions for an advertiser::\r\n\r\n\r\n response = client.request(\"Conversion\", \"findAll\",\r\n page=1,\r\n limit=100,\r\n filters={\r\n \"advertiser_id\": 444,\r\n })\r\n\r\n if response.success:\r\n # do something with\r\n response.data\r\n\r\n\r\nTo use a combination of OR and AND in filters::\r\n\r\n\r\n # Find all conversions where (advertiser_id == 444 OR advertiser_id == 555 OR revenue >= 100) AND user_agent contains \"AppleWebKit\"\r\n response = client.request(\"Conversion\", \"findAll\",\r\n page=1,\r\n limit=100,\r\n filters={\r\n \"OR\": {\r\n \"advertiser_id\": [444, 555],\r\n \"revenue\": {\r\n \"GREATER_THAN_OR_EQUAL_TO\": 100\r\n }\r\n },\r\n \"user_agent\": {\r\n \"LIKE\": \"%AppleWebKit%\"\r\n }\r\n })\r\n\r\n\r\nNote that a special keyword argument called ``response_class`` can be passed to substitute the default response wrapper. For example::\r\n\r\n\r\n from hasoffers import Response\r\n\r\n\r\n class CustomResponse(Response):\r\n\r\n def next_page(self):\r\n return int(self.data.get('page')) + 1\r\n\r\n def has_more(self):\r\n return int(self.data.get('page')) < int(self.data.get('pageCount'))\r\n\r\n\r\n response = client.request(\"Conversion\", \"findAll\",\r\n limit=100,\r\n page=1,\r\n response_class=CustomResponse)\r\n\r\n\r\nRunning Tests\r\n-------------\r\n::\r\n\r\n tox\r\n\r\n\r\nContributions\r\n-------------\r\n\r\nAll contributions and comments are welcome.\r\n\r\nChange Log\r\n----------\r\n\r\nv0.2.1\r\n~~~~~~\r\n* Add ability to specify HTTP methods (verbs) when making a request. Thanks `jeffkayser `_\r\n\r\nv0.2.0\r\n~~~~~~\r\n* Add support for Affiliate API. Thanks `jarradh `_\r\n\r\nv0.1.1\r\n~~~~~~\r\n* Switch to Semantic Versioning\r\n* Fix issue with parse_requirements for newer versions of pip (>=6.0.0)\r\n\r\nv0.1\r\n~~~~\r\n* Initial", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jthi3rry/hasoffers", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "hasoffers", "package_url": "https://pypi.org/project/hasoffers/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/hasoffers/", "project_urls": { "Homepage": "https://github.com/jthi3rry/hasoffers" }, "release_url": "https://pypi.org/project/hasoffers/0.2.1/", "requires_dist": [ "requests", "six" ], "requires_python": null, "summary": "Python low-level client for HasOffers.com. http://developers.hasoffers.com/", "version": "0.2.1" }, "last_serial": 1560958, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "d63f31f004da2c378246a39fb6c81ab4", "sha256": "b45ec53307b907759f95b365956359e5ae5681505fb488786470b592c4c0029e" }, "downloads": -1, "filename": "hasoffers-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d63f31f004da2c378246a39fb6c81ab4", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 7568, "upload_time": "2014-10-31T12:51:54", "url": "https://files.pythonhosted.org/packages/21/43/f0724086296d1fd5d8da72a12b5c62e1fac993980c7587293cebdc957949/hasoffers-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "78e2f777dfa7bdfd7795a673285b53d5", "sha256": "baa9edab96c8baab83c0c3d85f86731b90c72a21e86c21b695cde9a376ab7725" }, "downloads": -1, "filename": "hasoffers-0.1.tar.gz", "has_sig": false, "md5_digest": "78e2f777dfa7bdfd7795a673285b53d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6135, "upload_time": "2014-10-31T12:51:46", "url": "https://files.pythonhosted.org/packages/18/53/31f97b62f9881b2383bf8d38ab51774028cd2e6878b33113ea3fe8a7a825/hasoffers-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "2c0799e3d0c1622254274d07153c9513", "sha256": "28b5390d02cca0d856ed767d99be601580a6fa7b431f5c0b3fa55fcb7bfc4125" }, "downloads": -1, "filename": "hasoffers-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2c0799e3d0c1622254274d07153c9513", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7731, "upload_time": "2015-01-29T23:13:30", "url": "https://files.pythonhosted.org/packages/e1/a2/d64e50de1f799aef6ebf0c92e8ed1eb4e508050af227093f4790543d3cbd/hasoffers-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ef614e61dc923ab833c0bf65c187de85", "sha256": "352ee03d4e950609bc5d09785aaead5aa34234c1a2360a1d93a57c7849d4918f" }, "downloads": -1, "filename": "hasoffers-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ef614e61dc923ab833c0bf65c187de85", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6250, "upload_time": "2015-01-29T23:13:39", "url": "https://files.pythonhosted.org/packages/03/f1/e6c6c6d1960db7dd43578e52a725355b073f8f06d731ba08329d50b66278/hasoffers-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "05cf386cf382640aec313e097873d261", "sha256": "b00a9f99949be64defa98779d116281367d7e354d580fbaba854c23b522172c3" }, "downloads": -1, "filename": "hasoffers-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "05cf386cf382640aec313e097873d261", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5889, "upload_time": "2015-02-15T06:02:05", "url": "https://files.pythonhosted.org/packages/57/68/72e349a2b1d9a5af1920d53bf8e8e760d23a3978ae64ac2cd32cdb46ca6c/hasoffers-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "59ea0db627c11a76f03f709ee54e452d", "sha256": "a21fabcbbbe8cfac5bf71fa192c5af313a136552b4c0ac19f2abc08d8c86a5f5" }, "downloads": -1, "filename": "hasoffers-0.2.0.tar.gz", "has_sig": false, "md5_digest": "59ea0db627c11a76f03f709ee54e452d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5094, "upload_time": "2015-02-15T06:02:13", "url": "https://files.pythonhosted.org/packages/9e/1e/373621b2079e6a9d6a28cdd585ea5792a2dbc91324e008a81b38231e8baa/hasoffers-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "20bbfa57e22098ac6ad76e6d8136c35c", "sha256": "338877df003593218c4f1b6be62458f16fda991e021961881604b80851f28e84" }, "downloads": -1, "filename": "hasoffers-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "20bbfa57e22098ac6ad76e6d8136c35c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6029, "upload_time": "2015-05-23T01:26:33", "url": "https://files.pythonhosted.org/packages/52/76/8ef892913bdb13f7585122e4683ab07325f5ffbd27f4c7bac62181c69ab9/hasoffers-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "317e499186cb033aadd46e0469c11977", "sha256": "559b9054564d038df0df0c4ebe180595049279066eb0b8a99dbbe1f64125ca7c" }, "downloads": -1, "filename": "hasoffers-0.2.1.tar.gz", "has_sig": false, "md5_digest": "317e499186cb033aadd46e0469c11977", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5195, "upload_time": "2015-05-23T01:26:39", "url": "https://files.pythonhosted.org/packages/15/26/56d5d3ee4b5bd402bf8e36b0da7007102f26445a85ebe32804a2a2d785f6/hasoffers-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "20bbfa57e22098ac6ad76e6d8136c35c", "sha256": "338877df003593218c4f1b6be62458f16fda991e021961881604b80851f28e84" }, "downloads": -1, "filename": "hasoffers-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "20bbfa57e22098ac6ad76e6d8136c35c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6029, "upload_time": "2015-05-23T01:26:33", "url": "https://files.pythonhosted.org/packages/52/76/8ef892913bdb13f7585122e4683ab07325f5ffbd27f4c7bac62181c69ab9/hasoffers-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "317e499186cb033aadd46e0469c11977", "sha256": "559b9054564d038df0df0c4ebe180595049279066eb0b8a99dbbe1f64125ca7c" }, "downloads": -1, "filename": "hasoffers-0.2.1.tar.gz", "has_sig": false, "md5_digest": "317e499186cb033aadd46e0469c11977", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5195, "upload_time": "2015-05-23T01:26:39", "url": "https://files.pythonhosted.org/packages/15/26/56d5d3ee4b5bd402bf8e36b0da7007102f26445a85ebe32804a2a2d785f6/hasoffers-0.2.1.tar.gz" } ] }