https://github.com/stranger6667/pyoffers
Python client library for HasOffers API.
https://github.com/stranger6667/pyoffers
Last synced: 12 months ago
JSON representation
Python client library for HasOffers API.
- Host: GitHub
- URL: https://github.com/stranger6667/pyoffers
- Owner: Stranger6667
- License: mit
- Created: 2016-08-25T12:53:41.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2020-09-01T10:36:50.000Z (almost 6 years ago)
- Last Synced: 2024-10-19T10:44:50.677Z (over 1 year ago)
- Language: Python
- Homepage: https://pyoffers.readthedocs.io
- Size: 413 KB
- Stars: 16
- Watchers: 3
- Forks: 7
- Open Issues: 5
-
Metadata Files:
- Readme: README.rst
- Contributing: docs/contributing.rst
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
PyOffers
========
|Build| |Coverage| |Version| |Python versions| |License|
Python client library for `HasOffers API `_.
Installation
============
PyOffers can be obtained with ``pip``::
$ pip install pyoffers
Usage example
=============
Initialize API client:
.. code-block:: python
>>> from pyoffers.api import HasOffersAPI
>>> hasoffers = HasOffersAPI(
endpoint='https://api.hasoffers.com/Apiv3/json',
network_token='',
network_id='',
)
Execute queries:
.. code-block:: python
>>> # Get all offers with ID greater than 100, sorted by ID and with loaded `Country` data
>>> hasoffers.offers.find_all(id__gt=100, sort='id', contain=['Country'])
[,
,
,
,
,
]
>>> # Get all clicks records for 2016-09-20
>>> hasoffers.raw_logs.clicks.find_all('20160920')
[, ...]
>>> # Get all conversions for specific offer
>>> offer = hasoffers.offers.get_by_id(100)
>>> offer.conversions.find_all()
[]
Documentation
=============
You can view documentation online at:
- https://pyoffers.readthedocs.io
Or you can look at the docs/ directory in the repository.
Python support
==============
PyOffers supports Python 3.5+.
.. |Build| image:: https://github.com/Stranger6667/pyoffers/workflows/build/badge.svg
:target: https://github.com/Stranger6667/pyoffers/actions
.. |Coverage| image:: https://codecov.io/github/Stranger6667/pyoffers/coverage.svg?branch=master
:target: https://codecov.io/github/Stranger6667/pyoffers?branch=master
.. |Version| image:: https://img.shields.io/pypi/v/pyoffers.svg
:target: https://pypi.org/project/pyoffers/
.. |Python versions| image:: https://img.shields.io/pypi/pyversions/pyoffers.svg
:target: https://pypi.org/project/pyoffers/
.. |License| image:: https://img.shields.io/pypi/l/pyoffers.svg
:target: https://opensource.org/licenses/MIT