Skip to main content

K50 tracker ai wrapper

Installation

Install using pip...

pip install k50-tracker-api

Usage

from k50_tracker import K50Client

k50 = K50Client('<your access_token>')

# get projects
# doc - https://help.k50.ru/tracker-api/api-requests/get-counters-list/
k50.get_projects() # return dict

# get pool list
# doc - https://help.k50.ru/tracker-api/api-requests/get-pool/
k50.get_pool_list(counter_id=123) # optional page: int - default 1, items_per_page: int - default 1000

# get call stats
# doc - https://help.k50.ru/tracker-api/api-requests/get-calls-stat-v2/
k50.get_call_stats(counter=123, dimensions=['dimension1', 'dimension2'], csv=False) # csv True/False by return csv or json

# get order stats
# doc - https://help.k50.ru/tracker-api/api-requests/get-orders-stat-v2/
k50.get_order_stats(counter=123, dimensions=['dimension1', 'dimension2'], csv=False) # csv True/False by return csv or json

# get tags
# doc - https://help.k50.ru/tracker-api/api-requests/get-tags/
k50.get_tags(counter=123)

# get leads
# doc - https://help.k50.ru/tracker-api/api-requests/get-leads/
k50.get_leads(counter=123, dimensions=['dimension1', 'dimension2'], csv=False, is_show_inter_action_chain=False)


# get reports
# doc - https://help.k50.ru/tracker-api/api-requests/get-reports/
from datetime import datetime, timedelta
date_from = datetime.now() - timedelta(days=1)
k50.get_reports(
    counter=123,
    dimensions=['dimension1', 'dimension2'],
    metrics=['metric1'],
    date_from=date_from,
    date_to=date_to,
    limit=1000,
    offset=0,
    csv=False
)

# add call
# doc - https://help.k50.ru/tracker-api/api-requests/add-calls/
k50.add_call(counter=123, call_id=123, start_time=datetime.now(), caller_phone='79379992', called_phone='9389992')

# update_call
# doc - https://help.k50.ru/tracker-api/api-requests/update-calls/
k50.update_call(counter=123, call_id=123, start_time=datetime.now(), caller_phone='79379992', called_phone='9389992')

# add order
# doc - https://help.k50.ru/tracker-api/api-requests/add-orders-stat-v2/
k50.add_order(counter=123, order_id=123, date_time=datetime.now())

# update order
# doc - https://help.k50.ru/tracker-api/api-requests/update-orders-stat-v2/
k50.update_order(counter=123, order_id=123, date_time=(datetime.now() - timedelta(days=1)))

# add tags to call
# dod - https://help.k50.ru/tracker-api/api-requests/add-call-tags/
k50.add_tags_to_calls(counter=123, call_id=123, tags=['list of tags'])


# add tags to call
# dod - https://help.k50.ru/tracker-api/api-requests/add-call-tags/
k50.remove_tags_from_call(counter=123, call_id=123, tags=['list of tags'])

LICENSE

MIT

Metadata

Release files for k50-tracker-api 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for k50-tracker-api 0.0.4
File Size Uploaded
k50-tracker-api-0.0.4.tar.gz 4.3 kB Details

Release files / k50-tracker-api-0.0.4.tar.gz

Download URL k50-tracker-api-0.0.4.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
79c9201911fdebcd11138d3c3caf6a9d4cefbc2ab139df7cde48cc3ffb3fad2d
BLAKE2b-256 checksum
How to use checksums
35507ca58706a7d508d5076ecd161f0eae9ffb2b9aaa36f057bafbc1998411f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.5

Release history Release notifications | RSS feed

This release

0.0.4 This release

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page