Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions mysite/flask_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
)
from utils.template_filters import *

from w1.owl import runDynamicOwlCalc


logger = get_logger(__name__)

Expand Down Expand Up @@ -308,6 +310,13 @@ def logtest():
return "Hello, World!"


@app.route("/dynamic-owl-calc", methods=["GET"])

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REST-like API!

def dynamic_owl_calc() -> Response | str:
output = '\n'.join(runDynamicOwlCalc(request.args))

return output.replace('\n', '<br>')


def autoReviewBot(
capturedCharacterInput,
source_string
Expand Down
9 changes: 8 additions & 1 deletion mysite/models/account_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1235,10 +1235,17 @@ def _parse_w1_owl(account):
logger.warning(f"Owl data not present{', as expected' if account.version < 217 else ''}.")
account.owl = {
'Discovered': safer_get(account.raw_optlacc_dict, 265, False),
'Feathers': safer_get(account.raw_optlacc_dict, 253, 0),
'FeatherGeneration': safer_get(account.raw_optlacc_dict, 254, 0),
'BonusesOfOrion': safer_get(account.raw_optlacc_dict, 255, 0),
'FeatherMultiplier': safer_get(account.raw_optlacc_dict, 256, 0),
'FeatherCheapener': safer_get(account.raw_optlacc_dict, 257, 0),
'FeatherRestarts': safer_get(account.raw_optlacc_dict, 258, 0),
'MegaFeathersOwned': safer_get(account.raw_optlacc_dict, 262, 0)
'SuperFeatherProduction': safer_get(account.raw_optlacc_dict, 259, 0),
'ShinyFeatherLevel': safer_get(account.raw_optlacc_dict, 260, 0),
'SuperFeatherCheapener': safer_get(account.raw_optlacc_dict, 261, 0),
'MegaFeathersOwned': safer_get(account.raw_optlacc_dict, 262, 0),
'ShinyFeathers': safer_get(account.raw_optlacc_dict, 264, 0)
}

def _parse_w1_statues(account):
Expand Down
Loading