aiokeitaro


Nameaiokeitaro JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/developerreva/aiokeitaro
SummaryUnofficial Asynchronous Keitaro Admin API client
upload_time2024-04-23 10:57:35
maintainerNone
docs_urlNone
authorDevelopereva
requires_python>=3.6
licenseNone
keywords python python3 api-client aiohttp api-wrapper keitaro keitaro-tracker keitaro-async
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # keitaro

keitaro is a simple and easy to use API wrapper library for [Keitaro](https://keitaro.io/) Admin API written in Python3 and [aiohttp](https://pypi.org/project/aiohttp/)

## 📄 Official Keitaro resources

-   [Keitaro Website](https://keitaro.io/)
-   [Admin API documentation](https://admin-api.docs.keitaro.io/)
-   [Technical Support](https://t.me/keitarobot)

## 📖 Getting Started

### Installation

Pypi package is not updated, you can build it using setup.py

### Keitaro tracker initialization

Begin by importing Keitaro class from aiokeitaro module and passing Admin API key and URL of Keitaro tracker to it

```python
from aiokeitaro import Keitaro

api = Keitaro('API KEY', 'URL with http or https (if is domain)')
```

## 📚 Examples

If API request was successful, status code 200 will be received and a response in the json format.

```python
import asyncio
from aiokeitaro import Keitaro, Offer

async def main():
    api = Keitaro('API KEY', 'URL with http or https (if is domain)')
    
    # Create an instance of the Offer class
    offer = Offer(api)
    
    # Call the get method on the instance
    ss = await offer.get()
    print(ss)

# run main.py
asyncio.run(main())

```

<details>
  <summary>
    <i>Click to see a response sample</i>
    <a href="https://admin-api.docs.keitaro.io/#tag/Affiliate-Networks/paths/~1affiliate_networks~1{id}/delete">
    Admin API reference</a>
  </summary>
  <p>
    {
      "id": 14,
      "name": "string",
      "postback_url": "string",
      "offer_param": "string",
      "state": "string",
      "template_name": "string",
      "notes": "string",
      "pull_api_options": "string",
      "created_at": "string",
      "updated_at": "string",
      "offers": "string"
    }
  </p>
</details>

### Get all offers or specific one

To get all offers call get() method without any arguments

```python
all_offers = await offer.get()
```

Let's try to get a specific offer by its id

```python
dummy_offer = await offer.get(21)
```

As a result you'll get a response in JSON format

<details>
  <summary>
    <i>Click to see a response sample</i>
  </summary>
  <p>
    [
      {
      "id": 21,
      "name": "string",
      "group_id": 0,
      "action_type": "string",
      "action_payload": "string",
      "action_options": [],
      "affiliate_network_id": 0,
      "payout_value": 0,
      "payout_currency": "string",
      "payout_type": "string",
      "state": "string",
      "created_at": {},
      "updated_at": {},
      "payout_auto": true,
      "payout_upsell": true,
      "country": [],
      "notes": "string",
      "affiliate_network": "string",
      "archive": "string",
      "local_path": "string",
      "preview_path": "string"
      }
    ]
  </p>
</details>

### Campaign creation

To create an advertising campaign, you can simply call create() method of the campaigns resource

```python
payload = {
  'name': 'Dummy campaign',
  'state': 'disabled',
  'cost_type': 'CPC',
  'cost_value': '5',
  'cost_currency': 'USD',
  'cost_auto': True
}

campaign = await campaigns.create(payload)
```

The non-asynchronous module is located here: https://github.com/ysomad/keitaro

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/developerreva/aiokeitaro",
    "name": "aiokeitaro",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "python python3 api-client aiohttp api-wrapper keitaro keitaro-tracker keitaro-async",
    "author": "Developereva",
    "author_email": "developereva@protonmail.com",
    "download_url": "https://files.pythonhosted.org/packages/1e/5c/6ba59b9c823f23940ddf564ec008b0c1cefbcc4d7ddfc8fa32ac2b993064/aiokeitaro-1.0.0.tar.gz",
    "platform": null,
    "description": "# keitaro\r\n\r\nkeitaro is a simple and easy to use API wrapper library for [Keitaro](https://keitaro.io/) Admin API written in Python3 and [aiohttp](https://pypi.org/project/aiohttp/)\r\n\r\n## \ud83d\udcc4 Official Keitaro resources\r\n\r\n-   [Keitaro Website](https://keitaro.io/)\r\n-   [Admin API documentation](https://admin-api.docs.keitaro.io/)\r\n-   [Technical Support](https://t.me/keitarobot)\r\n\r\n## \ud83d\udcd6 Getting Started\r\n\r\n### Installation\r\n\r\nPypi package is not updated, you can build it using setup.py\r\n\r\n### Keitaro tracker initialization\r\n\r\nBegin by importing Keitaro class from aiokeitaro module and passing Admin API key and URL of Keitaro tracker to it\r\n\r\n```python\r\nfrom aiokeitaro import Keitaro\r\n\r\napi = Keitaro('API KEY', 'URL with http or https (if is domain)')\r\n```\r\n\r\n## \ud83d\udcda Examples\r\n\r\nIf API request was successful, status code 200 will be received and a response in the json format.\r\n\r\n```python\r\nimport asyncio\r\nfrom aiokeitaro import Keitaro, Offer\r\n\r\nasync def main():\r\n    api = Keitaro('API KEY', 'URL with http or https (if is domain)')\r\n    \r\n    # Create an instance of the Offer class\r\n    offer = Offer(api)\r\n    \r\n    # Call the get method on the instance\r\n    ss = await offer.get()\r\n    print(ss)\r\n\r\n# run main.py\r\nasyncio.run(main())\r\n\r\n```\r\n\r\n<details>\r\n  <summary>\r\n    <i>Click to see a response sample</i>\r\n    <a href=\"https://admin-api.docs.keitaro.io/#tag/Affiliate-Networks/paths/~1affiliate_networks~1{id}/delete\">\r\n    Admin API reference</a>\r\n  </summary>\r\n  <p>\r\n    {\r\n      \"id\": 14,\r\n      \"name\": \"string\",\r\n      \"postback_url\": \"string\",\r\n      \"offer_param\": \"string\",\r\n      \"state\": \"string\",\r\n      \"template_name\": \"string\",\r\n      \"notes\": \"string\",\r\n      \"pull_api_options\": \"string\",\r\n      \"created_at\": \"string\",\r\n      \"updated_at\": \"string\",\r\n      \"offers\": \"string\"\r\n    }\r\n  </p>\r\n</details>\r\n\r\n### Get all offers or specific one\r\n\r\nTo get all offers call get() method without any arguments\r\n\r\n```python\r\nall_offers = await offer.get()\r\n```\r\n\r\nLet's try to get a specific offer by its id\r\n\r\n```python\r\ndummy_offer = await offer.get(21)\r\n```\r\n\r\nAs a result you'll get a response in JSON format\r\n\r\n<details>\r\n  <summary>\r\n    <i>Click to see a response sample</i>\r\n  </summary>\r\n  <p>\r\n    [\r\n      {\r\n      \"id\": 21,\r\n      \"name\": \"string\",\r\n      \"group_id\": 0,\r\n      \"action_type\": \"string\",\r\n      \"action_payload\": \"string\",\r\n      \"action_options\": [],\r\n      \"affiliate_network_id\": 0,\r\n      \"payout_value\": 0,\r\n      \"payout_currency\": \"string\",\r\n      \"payout_type\": \"string\",\r\n      \"state\": \"string\",\r\n      \"created_at\": {},\r\n      \"updated_at\": {},\r\n      \"payout_auto\": true,\r\n      \"payout_upsell\": true,\r\n      \"country\": [],\r\n      \"notes\": \"string\",\r\n      \"affiliate_network\": \"string\",\r\n      \"archive\": \"string\",\r\n      \"local_path\": \"string\",\r\n      \"preview_path\": \"string\"\r\n      }\r\n    ]\r\n  </p>\r\n</details>\r\n\r\n### Campaign creation\r\n\r\nTo create an advertising campaign, you can simply call create() method of the campaigns resource\r\n\r\n```python\r\npayload = {\r\n  'name': 'Dummy campaign',\r\n  'state': 'disabled',\r\n  'cost_type': 'CPC',\r\n  'cost_value': '5',\r\n  'cost_currency': 'USD',\r\n  'cost_auto': True\r\n}\r\n\r\ncampaign = await campaigns.create(payload)\r\n```\r\n\r\nThe non-asynchronous module is located here: https://github.com/ysomad/keitaro\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Unofficial Asynchronous Keitaro Admin API client",
    "version": "1.0.0",
    "project_urls": {
        "Documentation": "https://github.com/developerreva/aiokeitaro#-getting-started",
        "Homepage": "https://github.com/developerreva/aiokeitaro",
        "Keitaro Admin API Documentation": "https://admin-api.docs.keitaro.io/",
        "Source Code": "https://github.com/developerreva/aiokeitaro"
    },
    "split_keywords": [
        "python",
        "python3",
        "api-client",
        "aiohttp",
        "api-wrapper",
        "keitaro",
        "keitaro-tracker",
        "keitaro-async"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "304ccd5013de558d6703f846e8e8b976dfce6793772e5d4025248e3375caef5c",
                "md5": "194c13d58150be796830a977648603c9",
                "sha256": "936fa13baa8b8731e56331bf71ed964f01c66e5fef0ec8a7fb74cc4d38bbcb4a"
            },
            "downloads": -1,
            "filename": "aiokeitaro-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "194c13d58150be796830a977648603c9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 14639,
            "upload_time": "2024-04-23T10:57:33",
            "upload_time_iso_8601": "2024-04-23T10:57:33.789763Z",
            "url": "https://files.pythonhosted.org/packages/30/4c/cd5013de558d6703f846e8e8b976dfce6793772e5d4025248e3375caef5c/aiokeitaro-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1e5c6ba59b9c823f23940ddf564ec008b0c1cefbcc4d7ddfc8fa32ac2b993064",
                "md5": "4652b11de70e13c61039e94d68562ed8",
                "sha256": "23dcd6bd636495925da76d505f1a5a5225059aa56423a5a15da315f8031853b4"
            },
            "downloads": -1,
            "filename": "aiokeitaro-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "4652b11de70e13c61039e94d68562ed8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 10861,
            "upload_time": "2024-04-23T10:57:35",
            "upload_time_iso_8601": "2024-04-23T10:57:35.478279Z",
            "url": "https://files.pythonhosted.org/packages/1e/5c/6ba59b9c823f23940ddf564ec008b0c1cefbcc4d7ddfc8fa32ac2b993064/aiokeitaro-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-23 10:57:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "developerreva",
    "github_project": "aiokeitaro",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "aiokeitaro"
}
        
Elapsed time: 0.24853s