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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| k50-tracker-api-0.0.4.tar.gz | 4.3 kB | Without provenance | Details for k50-tracker-api-0.0.4.tar.gz |
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
|
Security for k50-tracker-api 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.