mirror of
https://github.com/wolfswolke/DeathGarden_API_Rebirth.git
synced 2026-04-16 18:21:04 -05:00
Did alot. idk anymore...
This commit is contained in:
parent
b2f07aa230
commit
79042d084d
|
|
@ -1,6 +1,3 @@
|
|||
import base64
|
||||
|
||||
import flask_definitions
|
||||
from flask_definitions import *
|
||||
import os
|
||||
|
||||
|
|
@ -67,7 +64,7 @@ def config_ver_latest_client_data():
|
|||
get_remote_ip()
|
||||
try:
|
||||
print("Responded to config ver latest client data api call GET")
|
||||
return jsonify({"status": "success", "value": "6.2.0"})
|
||||
return jsonify({"LatestSupportedVersion": "te-18f25613-36778-ue4-374f864b"})
|
||||
except TimeoutError:
|
||||
print("Timeout error")
|
||||
return jsonify({"status": "error"})
|
||||
|
|
@ -81,10 +78,7 @@ def content_version_latest(version):
|
|||
get_remote_ip()
|
||||
try:
|
||||
print("Responded to content version api call GET")
|
||||
return jsonify({"availableVersions": {
|
||||
"10.0.19045.1.256live": "te-18f25613-36778-ue4-374f864b",
|
||||
"3.3.0_241792live": "te-f9b4768a-26590-ue4-cefc1aee",
|
||||
"3.3.0_244688live": "3.3.0_244688live-1573508813"}})
|
||||
return jsonify({"LatestSupportedVersion": "te-18f25613-36778-ue4-374f864b"})
|
||||
except TimeoutError:
|
||||
print("Timeout error")
|
||||
return jsonify({"status": "error"})
|
||||
|
|
@ -136,7 +130,7 @@ def gameservers_live():
|
|||
logger.graylog_logger(level="error", handler="general-gameserver-dev", message=f"Error in gameservers_dev: {e}")
|
||||
|
||||
|
||||
@app.route("/api/v1/config/UseMirrorsMM_Steam", methods=["GET"])
|
||||
@app.route("/api/v1/config/UseMirrorsMM_Steam", methods=["GET"]) # What is this even???
|
||||
def config_use_mirrors_mm_steam():
|
||||
get_remote_ip()
|
||||
try:
|
||||
|
|
@ -191,7 +185,9 @@ def favicon():
|
|||
def healthcheck():
|
||||
get_remote_ip()
|
||||
try:
|
||||
return jsonify({"status": "success", "online": "true"})
|
||||
# return jsonify({"status": "success", "online": "true"})
|
||||
return jsonify({"PublicIp": "192.168.1.1", "KrakenVersion": "3.6.1", "Kraken": [{"Running": False, "Errors": {}}]})
|
||||
# {"Health": "Alive"}
|
||||
except TimeoutError:
|
||||
print("Timeout error")
|
||||
return jsonify({"status": "error"})
|
||||
|
|
@ -204,7 +200,7 @@ def services_tex():
|
|||
get_remote_ip()
|
||||
try:
|
||||
print("Responded to tex api call GET")
|
||||
return {"current-event": {"status": {"id": "live"}, "message": "Warning MSG 2"}} # Alpha 2 WARNING Msg text?!?!
|
||||
return {"current-event": {"status": {"id": "live"}, "message": ""}} # Alpha 2 WARNING Msg text?!?!
|
||||
# return jsonify({"status": "success", "online": "true", "Version": "te-18f25613-36778-ue4-374f864b",
|
||||
# "ProjectID": "F72FA5E64FA43E878DC72896AD677FB5",
|
||||
# "DefaultFactoryName": "HttpNetworkReplayStreaming", "ServeMatchDelayInMin": "30.0f"})
|
||||
|
|
@ -273,20 +269,6 @@ def privacy_policy():
|
|||
logger.graylog_logger(level="error", handler="general-privacy-policy", message=f"Error in consent_eula0: {e}")
|
||||
|
||||
|
||||
@app.route("/api/v1/utils/contentVersion/latest/2.5", methods=["GET"])
|
||||
def content_version2_5():
|
||||
get_remote_ip()
|
||||
try:
|
||||
print("Responded to content version api call GET")
|
||||
return jsonify({
|
||||
"latestSupportedVersion": "te-18f25613-36778-ue4-374f864b"}) # Don't know if this is correct. Just testing.
|
||||
except TimeoutError:
|
||||
print("Timeout error")
|
||||
return jsonify({"status": "error"})
|
||||
except Exception as e:
|
||||
logger.graylog_logger(level="error", handler="general-content-version2_5", message=f"Error in content_version2_5: {e}")
|
||||
|
||||
|
||||
@app.route("/file/<game_version>/<seed>/<map_name>", methods=["POST", "GET"])
|
||||
def file_gold_rush(seed, map_name, game_version):
|
||||
get_remote_ip()
|
||||
|
|
@ -319,7 +301,11 @@ def leaderboard_get_scores():
|
|||
if request.method == "POST":
|
||||
print("Responded to leaderboard getScores api call POST")
|
||||
logger.graylog_logger(level="info", handler="general-leaderboard-get-scores", message=f"Leaderboard getScores: {request.get_json()}")
|
||||
return jsonify({"playerID": "a-1-b-2", "PlayerName": "Hans", "Rank": 1, "Score": 10, "Percentile": 1})
|
||||
return jsonify([{"playerID": "a-1-b-2", "PlayerName": "Hans", "Rank": 1, "Score": 10, "Percentile": 1},
|
||||
{"playerID": "a-2-b-2", "PlayerName": "Peter", "Rank": 2, "Score": 9, "Percentile": 2},
|
||||
{"playerID": "a-3-b-3", "PlayerName": "Lukas", "Rank": 3, "Score": 8, "Percentile": 3},
|
||||
{"playerID": "a-4-b-4", "PlayerName": "Jonas", "Rank": 4, "Score": 7, "Percentile": 4},
|
||||
{"playerID": "a-5-b-5", "PlayerName": "Mark", "Rank": 5, "Score": 6, "Percentile": 5}])
|
||||
else:
|
||||
try:
|
||||
print("Responded to leaderboard getScores api call GET")
|
||||
|
|
@ -329,3 +315,22 @@ def leaderboard_get_scores():
|
|||
return jsonify({"status": "error"})
|
||||
except Exception as e:
|
||||
logger.graylog_logger(level="error", handler="general-leaderboard-get-scores", message=f"Error in leaderboard_get_scores: {e}")
|
||||
|
||||
|
||||
@app.route("/submit/", methods=["POST"])
|
||||
def submit():
|
||||
get_remote_ip()
|
||||
return jsonify({"status": "success"})
|
||||
|
||||
|
||||
@app.route("/api/v1/queue/info", methods=["GET"])
|
||||
def queue_info():
|
||||
# ?category=Steam-te-23ebf96c-27498-ue4-7172a3f5&gameMode=Default®ion=US&countA=1&countB=5
|
||||
get_remote_ip()
|
||||
category = request.args.get("category")
|
||||
game_mode = request.args.get("gameMode")
|
||||
region = request.args.get("region")
|
||||
count_a = request.args.get("countA") # Hunter Count
|
||||
count_b = request.args.get("countB") # Runner Count
|
||||
return {"A": {"Size": 1, "ETA": 1, "stable": True}, "B": {"Size": 5, "ETA": 1, "stable": True}, "SizeA": count_a, "SizeB": count_b}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,74 +6,25 @@ def catalog_get(game_version):
|
|||
print("Game Version of Catalog: " + game_version)
|
||||
get_remote_ip()
|
||||
try:
|
||||
return jsonify([
|
||||
{
|
||||
"Result":{
|
||||
"Id":"CompositeItemMetadata_0",
|
||||
"DisplayName":"Scavenger_SMOKE_Outfit_STR001_Black_NAME",
|
||||
"Purchasable":True,
|
||||
"Consumable":False,
|
||||
"IsWeapon":False,
|
||||
"InitialQuantity":1,
|
||||
"DefaultCost":{
|
||||
"CurrencyId":3,
|
||||
"Price":10
|
||||
},
|
||||
"EventCostList":{
|
||||
"Name":"Scavenger_SMOKE_Outfit_STR001_Black_NAME",
|
||||
"StartDate":1624038140,
|
||||
"EndDate":1718732540,
|
||||
"Cost":{
|
||||
"CurrencyId":3,
|
||||
"Price":10
|
||||
}
|
||||
},
|
||||
"MetaData":{
|
||||
"GameplayTags":{
|
||||
"TagName":"Class.Runner"
|
||||
},
|
||||
"BundleItems":[
|
||||
"RN_FOG_SMOKE_Head_STR004_Black_Item",
|
||||
"RN_FOG_SMOKE_UpperBody_STR004_Black_Item",
|
||||
"RN_FOG_SMOKE_LowerBody_STR004_Black_Item",
|
||||
"RN_FOG_SMOKE_Vambrace_STR004_Black_Item"
|
||||
],
|
||||
"RewardBundleItems":[
|
||||
""
|
||||
],
|
||||
"RequiredChallangesToComplete":[
|
||||
""
|
||||
],
|
||||
"BundlePartOf":"",
|
||||
"PrerequisiteItem":"",
|
||||
"FollowingItem":"",
|
||||
"BundleDiscountPercent":69,
|
||||
"MinPlayerLevel":1,
|
||||
"MinCharacterLevel":1,
|
||||
"Origin":2
|
||||
},
|
||||
"Faction":2,
|
||||
"GameplayTagContainer":{
|
||||
"GameplayTags":{
|
||||
"TagName":"Runner.Smoke"
|
||||
},
|
||||
"ParentTags":{
|
||||
"TagName":"Customization.RN.FullSet"
|
||||
}
|
||||
},
|
||||
"CustomizationGameplayTagByFaction":[
|
||||
2,
|
||||
""
|
||||
],
|
||||
"Gender":1
|
||||
}
|
||||
}
|
||||
])
|
||||
return jsonify({"Result":[{
|
||||
"Id":"56B7B6F6473712D0B7A2F992BB2C16CD",
|
||||
"DisplayName":"Ghost_Shimsmey1_Name ",
|
||||
"Purchasable":True,"Consumable":False,"IsWeapon":False,
|
||||
"InitialQuantity":1,"DefaultCost":{"CurrencyId":3,"Price":10},"EventCostList":{"Name":"","StartDate":1624038140,
|
||||
"EndDate":1718732540,"Cost":{"CurrencyId":3,"Price":10}},"MetaData":{"GameplayTags":{
|
||||
"TagName":"Class.Runner"
|
||||
},"BundleItems":[],"RewardBundleItems":[],"RequiredChallangesToComplete":[],"BundlePartOf":"","PrerequisiteItem":"",
|
||||
"FollowingItem":"","BundleDiscountPercent":69,"MinPlayerLevel":1,"MinCharacterLevel":1,"Origin":2},"Faction":2,
|
||||
"GameplayTagContainer":{"GameplayTags":{
|
||||
"TagName":"Class.Runner"},"ParentTags":{
|
||||
"TagName":"Class.Runner"}},
|
||||
"CustomizationGameplayTagByFaction":[2,""],"Gender":1}]})
|
||||
|
||||
except TimeoutError:
|
||||
print("Timeout error")
|
||||
return jsonify({"status": "error"})
|
||||
except Exception as e:
|
||||
logger.graylog_logger(level="error", handler="unknown_catalog", message=str(e))
|
||||
print(e)
|
||||
|
||||
|
||||
@app.errorhandler(404)
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user