-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppStoreAcount.py
More file actions
97 lines (77 loc) · 2.45 KB
/
Copy pathAppStoreAcount.py
File metadata and controls
97 lines (77 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# 导入selenium的浏览器驱动接口
import datetime
from Common.File.FileUtil import FileUtil
# pip3 install connectcli
# from connectapi import ConnectApi
import gzip
import requests
import platform
if 'Darwin' not in platform.system():
import jwt
from Project.Resource import mainResource
import time
import sqlite3
import sys
import os
import json
import base64
from Common.File.FileUtil import FileUtil
o_path = os.getcwd() # 返回当前工作目录
sys.path.append(o_path) # 添加自己指定的搜索路径
class AppStoreAcount:
fileJosn = "AppStoreAcount.json"
dataRoot:None
def __init__(self):
self.LoadJson()
def GetPassword(self,appstore,name):
password = ""
for item in self.dataRoot[appstore]:
if name == item["name"]:
password = item["password"]
return password
def GetPrivacy(self,appstore,name):
password = ""
for item in self.dataRoot[appstore]:
if name == item["name"]:
password = item["privacy"]
return password
def GetClientId(self,appstore,name):
password = ""
for item in self.dataRoot[appstore]:
if name == item["name"]:
password = item["ClientId"]
return password
def GetClientSecret(self,appstore,name):
password = ""
for item in self.dataRoot[appstore]:
if name == item["name"]:
password = item["ClientSecret"]
return password
def GetiOSAPI_KEY_ID(self,name):
ret = ""
for item in self.dataRoot["appstore"]:
if name == item["name"]:
ret = item["API_KEY_ID"]
return ret
def GetiOSAPI_USER_ID(self,name):
ret = ""
for item in self.dataRoot["appstore"]:
if name == item["name"]:
ret = item["API_USER_ID"]
return ret
def GetiOSteamID(self,name):
ret = ""
for item in self.dataRoot["appstore"]:
if name == item["name"]:
ret = item["teamID"]
return ret
def GetiOSCertificateID(self,name):
ret = ""
for item in self.dataRoot["appstore"]:
if name == item["name"]:
ret = item["CertificateID"]
return ret
def LoadJson(self):
strjson = FileUtil.GetFileString(self.fileJosn)
self.dataRoot = json.loads(strjson)
mainAppStoreAcount = AppStoreAcount()