Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gamebetr/api-client-js",
"version": "1.0.12",
"version": "1.0.13",
"description": "Gamebetr API client library",
"repository": {
"type": "git",
Expand Down
13 changes: 13 additions & 0 deletions src/Services/affiliate.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@ export default class Affiliate {
return token.getCookie('gamebetr_affiliate_id');
}

createConversion(domain_id, player_id, affiliate_id = 0, template_id = '', custom_id = '', promo_code = '') {
let client = new Client(this.config);
let data = {
'domain_id': domain_id,
'player_id': player_id,
'affiliate_id': affiliate_id,
'template_id': template_id,
'custom_id': custom_id,
'promo_code': promo_code
};
return client.request('POST', 'affiliate/conversions', data);
}

listClicks(date_start, date_end) {
let client = new Client(this.config);
return client.request('GET', 'affiliate/clicks?filter[created_at]=bt|' + date_start + ';' + date_end + '&page[size]=9999');
Expand Down