ironsource-mobile-api


Nameironsource-mobile-api JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://github.com/ironSource/mobile-api-lib-python
Summary
upload_time2022-12-13 21:19:28
maintainer
docs_urlNone
authorIronSource Ltd.
requires_python>=3.7
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# ironsource_api_python
![Test And Lint](https://github.com/ironSource/mobile-api-lib-python/actions/workflows/deploy.yml/badge.svg)

## Installation

This module is installed via pip:

```
pip install ironsrc_mobile_api
```

## Simple Example:
```python
import os
from ironsource_api.ironsource_api import IronSourceAPI
from ironsource_api.promote_api import Metrics, Breakdowns

ironsrc_api = IronSourceAPI()

ironsrc_api.set_credentials(API_USER, API_TOKEN,API_SECRET)

#Get Monetization Data
res = ironsrc_api.monetize_api().get_monetization_data(start_date='2020-01-01', end_date='2020-01-01')


#Get Advertiser Statistics
bytes_io = ironsrc_api.promote_api().get_advertiser_statistics('2020-10-03','2020-10-04',
        [Metrics.Impressions,Metrics.Clicks,Metrics.Installs],
        [Breakdowns.Application,Breakdowns.Day],response_format='csv')

line = bytes_io_r.readline()

while len(line) > 0:
    print(line)
    line = bytes_io_r.readline()

bytes_io_r.close()



```
####  Authentication
Before starting to use the API make sure to get the credentials from ironSource dashboard.
![Account Cred](https://developers.ironsrc.com/wp-content/uploads/2019/01/1-1.png)

And set the Access Key, Secret Key and Refresh Token: 
<a id="ironsource_api.IronSourceAPI.set_credentials"></a>

#### set\_credentials

```python
def set_credentials(user: str, token: str, secret: str)
```

sets credentials for the APIs


<br>
## Modules

* [IronSourceAPI](#ironsource_api.IronSourceAPI)
    * [monetize\_api](docs/monetize_api.md)
    * [promote\_api](docs/promote_api.md)


<br>

## Contributing:
Please follow contribution [guide](/CONTRIBUTING.md)

## Dependencies
* [requests](https://github.com/psf/requests)
* [httpx](https://github.com/encode/httpx)
* [pydash](https://github.com/dgilland/pydash)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ironSource/mobile-api-lib-python",
    "name": "ironsource-mobile-api",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "IronSource Ltd.",
    "author_email": "mobile-api-lib-ci@is.com",
    "download_url": "https://files.pythonhosted.org/packages/38/ce/e20c36494ec08a0b4da9834f8100656de66f514fffc2b9c15e5d53dffdb2/ironsource-mobile-api-1.1.0.tar.gz",
    "platform": null,
    "description": "\n# ironsource_api_python\n![Test And Lint](https://github.com/ironSource/mobile-api-lib-python/actions/workflows/deploy.yml/badge.svg)\n\n## Installation\n\nThis module is installed via pip:\n\n```\npip install ironsrc_mobile_api\n```\n\n## Simple Example:\n```python\nimport os\nfrom ironsource_api.ironsource_api import IronSourceAPI\nfrom ironsource_api.promote_api import Metrics, Breakdowns\n\nironsrc_api = IronSourceAPI()\n\nironsrc_api.set_credentials(API_USER, API_TOKEN,API_SECRET)\n\n#Get Monetization Data\nres = ironsrc_api.monetize_api().get_monetization_data(start_date='2020-01-01', end_date='2020-01-01')\n\n\n#Get Advertiser Statistics\nbytes_io = ironsrc_api.promote_api().get_advertiser_statistics('2020-10-03','2020-10-04',\n        [Metrics.Impressions,Metrics.Clicks,Metrics.Installs],\n        [Breakdowns.Application,Breakdowns.Day],response_format='csv')\n\nline = bytes_io_r.readline()\n\nwhile len(line) > 0:\n    print(line)\n    line = bytes_io_r.readline()\n\nbytes_io_r.close()\n\n\n\n```\n####  Authentication\nBefore starting to use the API make sure to get the credentials from ironSource dashboard.\n![Account Cred](https://developers.ironsrc.com/wp-content/uploads/2019/01/1-1.png)\n\nAnd set the Access Key, Secret Key and Refresh Token: \n<a id=\"ironsource_api.IronSourceAPI.set_credentials\"></a>\n\n#### set\\_credentials\n\n```python\ndef set_credentials(user: str, token: str, secret: str)\n```\n\nsets credentials for the APIs\n\n\n<br>\n## Modules\n\n* [IronSourceAPI](#ironsource_api.IronSourceAPI)\n    * [monetize\\_api](docs/monetize_api.md)\n    * [promote\\_api](docs/promote_api.md)\n\n\n<br>\n\n## Contributing:\nPlease follow contribution [guide](/CONTRIBUTING.md)\n\n## Dependencies\n* [requests](https://github.com/psf/requests)\n* [httpx](https://github.com/encode/httpx)\n* [pydash](https://github.com/dgilland/pydash)\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "",
    "version": "1.1.0",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "0281d8e007f9eebfee447aceea53ef37",
                "sha256": "97b3483b179fc47430e8fb4714c195bd204a7f7f9cbcba49d5c14bfd0ddb3ace"
            },
            "downloads": -1,
            "filename": "ironsource-mobile-api-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0281d8e007f9eebfee447aceea53ef37",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 32530,
            "upload_time": "2022-12-13T21:19:28",
            "upload_time_iso_8601": "2022-12-13T21:19:28.841632Z",
            "url": "https://files.pythonhosted.org/packages/38/ce/e20c36494ec08a0b4da9834f8100656de66f514fffc2b9c15e5d53dffdb2/ironsource-mobile-api-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-13 21:19:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "ironSource",
    "github_project": "mobile-api-lib-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "ironsource-mobile-api"
}
        
Elapsed time: 0.03101s