Skip to main content

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


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)

Uploaded Source

Built Distribution

mobio_license_sdk-1.0.5-py3-none-any.whl (15.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page