Mobio license SDK
Project description
Thư viện license Mobio
Cài đặt:
$ pip3 install mobio-license-sdk
Sử dụng:
1. Khởi tạo sdk:
from mobio.sdks.license import MobioLicenseSDK
MobioLicenseSDK().config(
admin_host="", # admin host
redis_uri="", # redis uri
module_use="", # liên hệ admin để khai báo tên của module
module_encrypt="", # liên hệ admin để lấy mã
license_key="", # key salt
)
2. Lấy thông tin license:
from mobio.sdks.license import MobioLicenseSDK
result = MobioLicenseSDK().get_json_license(
merchant_id,
)
"""
{
... # license info
}
"""
3. Lấy số lượng tài khoản tối đa:
from mobio.sdks.license import MobioLicenseSDK
result = MobioLicenseSDK().get_number_user(
merchant_id,
)
"""
{
"number": 12
}
"""
4. Lấy số lượng profile tối đa:
from mobio.sdks.license import MobioLicenseSDK
result = MobioLicenseSDK().get_number_profile(
merchant_id,
)
"""
{
"number": 50000
}
"""
5. Lấy số lượng profile ẩn danh tối đa:
from mobio.sdks.license import MobioLicenseSDK
result = MobioLicenseSDK().get_number_profile_anonymous(
merchant_id,
)
"""
{
"number": 100000
}
"""
6. Lấy số lượng page social tối đa:
from mobio.sdks.license import MobioLicenseSDK
result = MobioLicenseSDK().get_number_page_social(
merchant_id,
)
"""
{
"number": 6
}
"""
7. Lấy số lượng tin nhắn còn được gửi trong tháng:
from mobio.sdks.license import MobioLicenseSDK
result = MobioLicenseSDK().get_number_messages_allow_used(
merchant_id,
day_of_month=None # ngày kiểm tra YYYYmmdd (ITC), nếu None sdk tự động lấy ngày hiện tại
)
"""
{
"number": 1200,
"messages": "" # thông báo nếu có
}
"""
8. Kiểm tra lượng tin nhắn cần sử dụng cho chiến dịch:
from mobio.sdks.license import MobioLicenseSDK
result = MobioLicenseSDK().use_message_for_campaign(
merchant_id,
number_of_message, # số mess cần sử dụng
day_of_month=None # ngày kiểm tra YYYYmmdd (ITC), nếu None sdk tự động lấy ngày hiện tại
)
"""
{
"number": 12,
"messages": "" # thông báo nếu có
"success": 1 # trạng thái sử dụng, 1: thành công, 0: thất bại.
# nếu thành công dữ liệu số mess đã sử dụng sẽ lưu lại để tính toán cho lần tiếp theo.
}
"""
Log - 1.0.1
- tạo sdk
Log - 1.0.2
- init export class SDK
Log - 1.0.3
- thêm các hàm lấy thông số license
Log - 1.0.4
- thay đổi requirements
Log - 1.0.5
- sửa import sai
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
mobio-license-sdk-1.0.5.tar.gz
(16.1 kB
view hashes)
Built Distribution
Close
Hashes for mobio_license_sdk-1.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d59de589f7ae65416e1941a6938390dd945fcdd3d7063100e24b66ad6e8af0e9 |
|
MD5 | 6a058e8dc3379e05bd0f1c943aeb1b75 |
|
BLAKE2b-256 | 6bc1575da24b241b8fa9efd7acf98d7ef2920d4571cdb05a01ab14f13c4a261d |