def __init__(
self,
credFile=None,
client_key=None,
proxy_url=None):
"""Initialize with your MuseScore application credentials"""
self.proxies = {'https': proxy_url} if proxy_url else None
auth_type='oAuth1'
if credFile and os.path.isfile(credFile):
with open("credentials.json") as json_file:
cred = json.load(json_file)
self.auth = OAuth1(cred["client_key"],
client_secret=cred["client_secret"],
resource_owner_key=cred["resource_owner_key"],
resource_owner_secret=cred["resource_owner_secret"])
elif client_key:
self.auth = None
self.client_key = client_key
else:
raise Exception('At least a client key is needed')
MuseScoreAPI.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录