Skip to content

Commit a513f5e

Browse files
committed
Start on Get keys method (product)
1 parent bfcd2d1 commit a513f5e

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

licensing/methods.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,26 @@ def get_events(token, limit=10, starting_after=None):
4141

4242

4343
return arr
44+
45+
46+
"""
47+
class Product:
48+
49+
def get_keys(token, product_id, page = 1, order_by = "ID ascending", search_query = ""):
4450
45-
51+
response = HelperMethods.send_request("product/getkeys", \
52+
{"token":token,\
53+
"productId": product_id, \
54+
"orderby":order_by, \
55+
"searchquery": search_query})
56+
57+
jobj = json.loads(response)
58+
59+
if jobj == None or jobj["result"] == "1":
60+
return None
61+
62+
"""
63+
4664

4765
class Key:
4866

test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@
4343
print(Helpers.GetMachineCode())
4444

4545

46-
a = AI.get_events("WyIyOTk0Iiwid1ZZUUU4bVEyd2Z1VCtGL05aREpQb0p4VEkxYThRbEw1aGRpUHg3ZiJd")
46+
#a = AI.get_events("WyIyOTk0Iiwid1ZZUUU4bVEyd2Z1VCtGL05aREpQb0p4VEkxYThRbEw1aGRpUHg3ZiJd")

0 commit comments

Comments
 (0)