-
Notifications
You must be signed in to change notification settings - Fork 0
/
version.py
47 lines (33 loc) · 1.13 KB
/
version.py
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
import requests
import json
def getMainVersion():
test = requests.get("https://mason-dino.github.io/StudySync/")
decode = test.content.decode("utf-8")
res = json.loads(decode)
return res["stable"]["main"]
def getReleaseVersion():
test = requests.get("https://mason-dino.github.io/StudySync/")
decode = test.content.decode("utf-8")
res = json.loads(decode)
return res["release"]["version"]
def getLittleVersion():
test = requests.get("https://mason-dino.github.io/StudySync/")
decode = test.content.decode("utf-8")
res = json.loads(decode)
return res["stable"]["little"]
def getUserVersion():
with open("setup.json", "r") as f:
setupDir = json.load(f)
return setupDir["version"]
def checkIfBeta():
test = requests.get("https://mason-dino.github.io/StudySync/")
decode = test.content.decode("utf-8")
res = json.loads(decode)
return res["beta"]["active"]
def getJson():
test = requests.get("https://mason-dino.github.io/StudySync/")
decode = test.content.decode("utf-8")
res = json.loads(decode)
return res
if __name__ == "__main__":
print(getJson())