Sunday, February 26, 2017

Change Log: 2.4.268

This release addresses a couple of  long-standing back-end (i.e. invisible to users) issues re: new settlement creation and adds a couple of new features to the API (as well as a general update to API documentation).

In terms of general agenda for the near-term, the focus is on two things: getting the API to the point where it can create new settlements without the help of the legacy web app and adding the ability to update survivors.

Once that happens, we'll have a general overhaul of those aspects of the legacy app. The main impact of updating survivors via the API will be that I will have the ability to cut the number of page refreshes required on the Survivor Sheet (which is a major annoyance for a lot of users).

tl;dr This release doesn't really do anything major for the legacy webapp, but it's groundwork for some major enhancements and big progress on The Watcher.

Thanks for using the Manager!

Corrections and Fixes

  • Settlement Sheet "Population" increment arrow/paddle no longer decrements the population count. -samidy_68
  • The API-side models.monsters() method no longer fails when a handle is passed to the initialize_from_name() method; it backs off to trying to initialize by handle if it detects an underscore now, which should fix legacy settlement migration issues.
  • Creating a new settlement in the legacy app no longer adds all available nemesis monsters to the Settlement Sheet upon creation. 

Application Improvements

  • Updated/enhanced session.set_current_settlement() to update the user object via API call (using the new /user/set route: see below).
  • The api.post_JSON_to_route() method has been revised to include a custom JSON encoder for packaging up BSON object ID type python objects and transmitting them as JSON.
  • The api.post_JSON_to_Route() method has also been improved to transmit the JWT authorization info stored on the session (if the session is included in the call) via new kwarg 'Session'. (It adds an 'Authorization' header to the request, basically.)
  • New settlements are created using the new "settlement_sheet_init" overwrites stored in the API-side campaign definitions. Legacy app hard-coding (e.g. for Butcher and White Lion, etc.) has been deprecated.
  • Moved campaign expansions from the definition to the settlement_sheet_init; refactored the legacy app to use this, instead of hard-coding.
  • Keyed in a handful of new random survivor and settlement names (inspired by The Witcher, since I've been Witcher-ing a lot in my free time lately).

API Improvements

  • The /user/get route no longer returns OIDs of assets that have been removed.
  • Created documentation re: how to use the /user/set route and developed some quick CSS for embedding tables within rows of the documentation grid.
  • Created a new route for setting user attributes: /user/set/<user_id> accepts a JSON POST and will update supported parameters (and fail unsupported ones with a big, ugly, verbose 400).
  • Created a models.users.User method called set_current_settlement() that defaults a current_settlement attribute for a user if they haven't got one set. -ckester
  • Added a new attribute to campaign definitions: "settlement_sheet_defaults" is a mandatory dict that is used to overwrite default settlement object values upon creation.

No comments:

Post a Comment