https://github.com/ironsource/mobile-api-lib-python
https://github.com/ironsource/mobile-api-lib-python
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ironsource/mobile-api-lib-python
- Owner: ironSource
- License: apache-2.0
- Created: 2022-09-20T19:06:46.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-23T18:55:46.000Z (over 3 years ago)
- Last Synced: 2025-02-11T23:13:38.247Z (over 1 year ago)
- Language: Python
- Size: 129 KB
- Stars: 1
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# ironsource_api_python

## 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.

And set the Access Key, Secret Key and Refresh Token:
#### set\_credentials
```python
def set_credentials(user: str, token: str, secret: str)
```
sets credentials for the APIs
## Modules
* [IronSourceAPI](#ironsource_api.IronSourceAPI)
* [monetize\_api](docs/monetize_api.md)
* [promote\_api](docs/promote_api.md)
## 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)