API – [v2.17.1]

In this release, we add the X-Last-Updated header to many more routes. We are going to conditionally cache responses in the Costs to Expect App and need to know the last time the content changed, one day we will use the etag.

Changed

  • We have added the X-Last-Updated header to the resource-types, resources, categories, subcategories, items and resource items collection routes.
  • We have added the X-Last-Updated header to additional summary routes; the header was missing, and we are going to use it.
  • We have increased the coverage of our request test suite.
  • We have relocated our Transformer classes; we have moved them out of the Models namespace.

Fixed

  • We have updated the way we calculated the value for X-Last-Updated. We are using the max of the created at and updated at, not just looking at the created at time.

API – [v2.17.0]

In this release, we rework our item controllers, add a `complete` filter for the `game` item-type and reorganise all item-type classes.

Added 

  • We have added a `complete` parameter for the `game` item-type; when the parameter is included and set to true, only complete games will be returned in collections and summaries.

Changed

  • We have added item-type based response classes for all item collections and summaries. Item and resource type items are unique; there are no shared dependencies. The shared dependencies were a result of the first two item-types being similar, with the addition of the game item-type, we have learnt our lesson.
  • We have tweaked the TTL for permitted, and viewable resource types. The TTL for public viewable resource types is higher than for private users.
  • With the addition of more item-type classes, we have tweaked our collection TTLs for public and private users.
  • We have moved our ‘Method’ classes; it doesn’t make sense for them to sit inside the ‘Option’ namespace.
  • We have moved our ‘AllowedValue’ classes; it doesn’t make sense for them to sit inside the ‘Option’ namespace.
  • We have reorganised all the item-type classes; we are keeping all the classes for each item-type together.
  • We have tweaked our response classes; we will do slightly less work when reading from the cache.

Removed

  • We have removed all our interfaces; the interfaces were not useful, and we are going a slightly different way with the item-type classes, interfaces will return.

API – [v2.06.2]

In this release, we continue our long-term task of ensuring the API can handle all the different item-types we have planned. The initial version of the API focused on expenses; slowly, we are adjusting the API to a more modular system.

Added

  • We are now locally caching the permitted and viewable resource types; this change means we can skip a more expensive query per API request whilst the response is cached, we are experimenting with the TTL.

Changed

  • We have added item name and description fields to the partial-transfers collection.
  • We have updated the schema for partial-transfers.
  • We have updated the game item-type; the winner field will now be null or an object, the object will have an id and a name.
  • We have updated the OPTIONS request for the game item-type; the allowed values for the winner field will display if necessary.
  • We have tweaked our middleware; we use our Hash class rather than duplicating the effort.
  • We have created several new classes to generate the allowed values data; these new classes are specific to each of our supported item-type. This change will speed up the OPTIONS requests for the non allocated-expense item type as we will no longer query the database when we know there will be no results.
  • We have added a check to limit access to the partial-transfers route. The ‘allocated-expense’ item-type supports the partial-transfers feature, partial-transfers don’t make sense for the other item-types.
  • We have drastically simplified route validation. The API controls access to resources at the resource type level; we have updated all route checks to validate the requested resource type rather than validate specific access to the request entity.

Fixed

  • We have corrected several configuration file calls; our calls were looking at transfers, not partial transfers.
  • We have added localisation files for the simple-item and game item-type, several were missing.