Skip to content

v1.6.0

Compare
Choose a tag to compare
@github-actions github-actions released this 12 Jul 00:58
· 1558 commits to main since this release
v1.6.0
c7dac96

Hello everyone! Today, we're releasing v1.6.0. v1.6.0 comes with a couple notable changes, mostly to the API and the website.

Website gains new functionality!

To start off, we've added some new features to the website. You'll notice the design has shifted a little bit, and things are a lot more dynamic as they load in:

2023-07-11.20-47-21.mp4.processed.mp4

We've implemented some loading indicators here and there, and started leveraging infinite scrolling for things like our levels, photos, and activity pages. Yep, that's right, we've introduced Recent Activity in this update. We've been tracking data for Recent Activity ever since v1.3.0, but we haven't made use of this data in any official projects yet. It's looking pretty sick in my opinion.

Preview of Recent Activity on a level

Redesigned navbar and categories

Additionally, we've implemented the groundwork for editing a profile. There's not much you can do with this yet (only being able to change your description) but in the future, you'll be able to change things like your password and avatar and such.

New profile settings page

Redesigned Notifications Page

Better CLI support

We switched to CommandLineParser for CLI interactions, meaning you'll have a better experience when interacting with Refresh through the CLI. Not much can be done at the moment, but we're sure it'll be a useful tool in the future:

$ ./Refresh.GameServer --help
Starting Refresh with NuGet Bunkum
Refresh.GameServer 1.0.0
Copyright (C) 2023 Refresh.GameServer

  -i, --import_assets    Re-import all assets from the datastore into the database. This is a destructive action, only use when upgrading to <=v1.5.0

  -I, --import_images    Convert all images in the database to .PNGs. Otherwise, images will be converted as they are used

  -d, --generate_docs    Generate API V3 Documentation

  -f, --force            Force all operations to happen, skipping user consent

  --help                 Display this help screen.

  --version              Display version information.

API v3

We've implemented a new version of the API, giving it a complete overhaul. The new API changes some routes for consistency with others, and removes PascalCase in favor of camelCase. Under the hood, we've added new types that map from our database types (the ones being sent with API v2) to have a consistent model to serialize with. This makes the back-end of things more flexible for us, and for you.

Additionally, everything gets wrapped in a new response like so:

/api/v3/users/name/jvyden420

{
  "success": true,
  "data": {
    "userId": "6457396956740973018b53e1",
    "username": "jvyden420",
    "iconHash": "170d64acc43dc6e195cbdf396fd27ca56bb2f69d",
    "description": "",
    "location": {
      "x": 17955,
      "y": 20863
    },
    "joinDate": "1970-01-01T00:00:00+00:00"
  }
}

We think this is a lot better, as the API can now return errors when something goes wrong:

/api/v3/users/name/nobody

{
  "success": false,
  "error": {
    "name": "ApiNotFoundError",
    "message": "The requested resource was not found",
    "statusCode": 404
  }
}

It can also be used to get extra context about lists (yes, we finally refactored this system!):

/api/v3/levels/newest?count=1

{
  "listInfo": {
    "nextPageIndex": 2,
    "totalItems": 20
  },
  "success": true,
  "data": [
    {
      "levelId": 20,
      "publisher": {
        "userId": "6457396956740973018b53e1",
        "username": "jvyden420",
        "iconHash": "170d64acc43dc6e195cbdf396fd27ca56bb2f69d",
        "description": "",
        "location": {
          "x": 17955,
          "y": 20863
        },
        "joinDate": "1970-01-01T00:00:00+00:00"
      },
      "title": "krank",
      "iconHash": "g10682",
      "description": "",
      "location": {
        "x": 19162,
        "y": 41328
      },
      "publishDate": "2023-06-11T02:35:43.486+00:00",
      "updateDate": "2023-06-11T02:35:43.486+00:00"
    }
  ]
}

This is all documented through the website (via the /api/v3/documentation endpoint), and you can access it via http://localhost:4200/documentation assuming you're running a copy of Refresh and refresh-web.

Preview of documentation page

Information about types isn't quite ready yet, but we expect to implement this eventually.

Warning
Naturally, this all means that APIv2 is deprecated. We expect to remove it entirely in v1.7.0, so be sure to migrate your applications (if any).

Conclusion

This ended up being a fairly small update functionality-wise for the server, but it's still a pretty important update regardless. Enjoy the new bits and bobs!

Commits

  • c58f555: Migrate CLI invocations to CommandLineParser (jvyden)
  • a1b018f: Fix XMLDoc syntax in source generator and enable doc file generation (jvyden)
  • c861a62: Update refresh-web artifact (jvyden)
  • 497949c: Rename current API implementation to ApiV2 (jvyden)
  • 5ec38f7: API V3 proof of concept (jvyden)
  • 85cef54: Document user API endpoints and improve error handling (jvyden)
  • 2d2cf05: Cache ApiNotFoundError (jvyden)
  • 1c9fc15: Parameter-based documentation? (jvyden)
  • 0724158: Documentation generation (jvyden)
  • 937c347: Add parameter type and required authentication (jvyden)
  • 122f523: Add API documentation to release artifacts (jvyden)
  • e82f9c3: Add paging to API and improve documentation support (jvyden)
  • 8c2b6bc: Implement DatabaseList for consistent paging and item counting (jvyden)
  • b724634: Adjust list info logic (jvyden)
  • dd0fcca: Remove unused constructor in DatabaseList (jvyden)
  • 381e0fd: Implement totals for GetRandomLevels (jvyden)
  • 577661e: Remove trailing periods from DocSummary and HelpText strings (jvyden)
  • 61a9524: Port photos API to v3 (jvyden)
  • 257816f: Cleanup docs (jvyden)
  • 79f08b2: Bump Bunkum from 3.3.10 to 3.3.11 (#62) (dependabot[bot]) #62
  • a6d63f8: Bump Microsoft.NET.Test.Sdk from 17.6.2 to 17.6.3 (#61) (dependabot[bot]) #61
  • 3a0aa1d: Merge branch 'main' into api-v3 (jvyden)
  • 9c9fa58: Port ResourceApiEndpoints to ApiV3 (jvyden)
  • 82e44be: Add proper conversion methods for V3 API data types (jvyden)
  • b9b266d: Document resources API (jvyden)
  • 1be0fb8: Port NotificationApiEndpoints to ApiV3, add request method to docs (jvyden)
  • 53318fd: Add missing DocSummary to router parameters in API methods (jvyden)
  • 0bb8c1d: Port MatchingApiEndpoints to ApiV3 (jvyden)
  • 9d32ccb: Make all base endpoints plural, port LeaderboardApiEndpoints to ApiV3 (jvyden)
  • 2d4e1f5: Fix missing implementation of ApiGameScoreResponse.FromOldList (jvyden)
  • 5ca6e05: Perform some organization, move authentication system to ApiV3 (jvyden)
  • 87f668a: Remove all authenticated endpoints from ApiV2 (jvyden)
  • a34ac53: Hastily port ActivityApiEndpoints to ApiV3 (jvyden)
  • eb7cba2: Point unit tests to new endpoints (jvyden)
  • ac6f643: Sort documentation entries by route name (jvyden)
  • f76d946: Rename some API endpoints for clarity (jvyden)
  • b8a5ed5: Switch to AttribDoc for documentation generation (jvyden)
  • 6433251: Update DocumentationService to use ApiRouteResponse (jvyden)
  • 51d7c0d: Restore API route sorting by route name (jvyden)
  • e716180: Change password reset and logout HTTP methods to PUT (jvyden)
  • 71b8620: Enforce camelcasing on authentication-related API requests (jvyden)
  • 3f64875: Refactor UpdateUserData method and add new API endpoint for updating user (jvyden)
  • cf93229: Remove colors from notifications (jvyden)
  • a80d1af: Add preview level feature to API level category response (jvyden)
  • 9a85369: Fix hearted/queued categories not using new DatabaseList (jvyden)
  • ad30104: Refactor ApiV3 recent activity to use proper responses (jvyden)
  • b205b2c: Add ApiV3 endpoint for retrieving a level's activity by ID (jvyden)
  • bc83d08: Change PhotosInLevelById route to subset of level (jvyden)
  • a857ef4: shit (jvyden)
  • 6056e43: Update ApiEventResponse and support pagination for activity fetch (jvyden)
  • 8616fe3: Order events by descending timestamp (jvyden)
  • 1f72261: Add missing UserId to ApiV3 event response (jvyden)
  • f822e18: Bump Realm from 11.1.2 to 11.2.0 (#63) (dependabot[bot]) #63
  • d1ebcbd: Bump JetBrains.Annotations from 2022.3.1 to 2023.2.0 (#64) (dependabot[bot]) #64
  • decf8f6: Fix JoinDate being missing from GameUser ApiV3 response (jvyden)
  • 8c9e082: Wait, it's supposed to be milliseconds (jvyden)
  • c7dac96: Add scores to ActivityPage response (jvyden)