"This package makes it easy to manage information about your DacWin referral system."
Project description
DacWin API
The Python package dacwinapi makes it easy to manage information about your DacWin referral system. This package is specifically designed to interact with the DacWin API and allows you to manage information about an application's users, referral campaigns, rewards and events.
DacWin home page: https://referral-dev.dactechnologies.net
Installation
To install dacwinapi
, you can use pip:
pip install dacwinapi
How to use this package
1. Campaigns
from dacwinapi import CampaignService
campaignService = CampaignService(api_key="your_app_api_key)
# list of campaigns of the app
campaigns = campaignService.getAll()
# retrieve one campaign data
campaigns = campaignService.getOne(id=1)
2. App users
from dacwinapi import AppUserService
appUserService = AppUserService(api_key="your_app_api_key)
# list of app users of the app
app_users = appUserService.getAll()
# retieve one app user by her id
app_user = appUserService.getOne(id=1)
# retieve one app user by her reference
app_user = appUserService.getOne(reference="a2sddd")
3. Events
from dacwinapi import EventService
eventService = EventService(api_key="your_app_api_key)
# create a new event for specific app user and campaign
event_created = eventService.create(
name="ddd",
campaign_id=18,
app_user_id=14
)
print(event_created)
# list of events of the app
events = eventService.getAll()
# list of app's events of specific campaign
events = eventService.getAll(campaign_id=12)
# retrieve one event
event = eventService.getOne(id=12)
4. Rewards
from dacwinapi import RewardService
rewardService = RewardService(api_key="your_app_api_key)
# list of rewards of the app
rewards = rewardService.getAll()
# list of app's rewards of specific campaign
rewards = rewardService.getAll(campaign_id=12)
# retrieve one reward
reward = rewardService.getOne(id=12)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dacwinapi-2.1.7.tar.gz
(6.2 kB
view hashes)
Built Distribution
Close
Hashes for dacwinapi-2.1.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d39f38a3ef671ab227594f4af855317078049f8e610385e0562031200bf0b000 |
|
MD5 | a728b7577e7f27aaabc7a68e38c693a5 |
|
BLAKE2b-256 | 9e6ffcb60ee4022bd86a12cd6a43940f2fd44057e082dba8ee481feffea0fb2b |