Proof of concept and API for app-center-ratings#1
Open
ZoopOTheGoop wants to merge 26 commits into
Open
Conversation
added 14 commits
February 6, 2024 05:03
ZoopOTheGoop
force-pushed
the
framework
branch
from
February 6, 2024 13:04
527deb4 to
e5075b6
Compare
Open
ZoopOTheGoop
force-pushed
the
framework
branch
from
February 7, 2024 19:55
d375eb7 to
dcc42d7
Compare
added 7 commits
February 8, 2024 02:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For various reasons, this does not implement the entire Snapd API, that's a project and a half. However, after bounding between this and
app-center-ratingsthis is usable.Current limitations:
unwrap/expectcalls are intentional, but in a few places I needed to figure out how to handle values.snapdreturning a completely different response format for itpostendpointsfind- this is due to how many there aresnapderror-kinds, this needs more research to implementPositives:
JsonDecoderitself does allocate a buffer to collect all theResponsevalues, but everything downstream of that explicitly opts into allocations unless it decides to take ownership manually.However, as-is this is totally usable for our current purposes. It's also relatively easy to add new API endpoints, as long as they return JSON. Even implementing
postshouldn't be that hard (may require a minor refactor, but not too bad).The current API should be considered unstable.