-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
first draft of v2 list API #234
Conversation
Alright, so this PR is now at a stage where I need some feedback on how to continue. Here is what has been done so far:
Tested so far with running a server on localhost, which can for example be started with the following command from within the
and can then be queried for example with
or
What does not yet work are the tests for
Option 2 and 3 require some time, so I wanted to get feedback, also considering that Pull Requests should not become too large to review. I also would like to mention the following decisions/issues that we might have to discuss:
|
OK, I have now made the server-tests work offline, by starting a server in the background. Works. I think this is ready to review now, which isn't terribly easy, unfortunately, because I had to factor out the Server code to a new module to be runnable from the test suite. I think from a perspective of a user, the main outstanding feature is now a necessary extension of our fetch- and forge-?) DSL to specify a version of a package. See also my notes above. |
to new server
The new server (from this branch) is now running on |
OK, live tests work. I think this is ready. Still can't figure out what's going on with stylish-haskell though |
OK, stylish-haskell was fixed by adapting the version on my computer. |
With
|
Ok - so there is one inconsistency we may want to reconsider: |
Imagine I have a package
If I want the latest version, then my only option is to append This feels a bit misleading. I think previously we just assumed that the directory names would be same and fetch could just safely overwrite with I'm not sure what the best interface would be. What is the default usecase? Having the latest package version, right? But we can not simply delete a user's packages... Here's an idea: If |
Fixed in latest commit |
Fixed in latest commit, as discussed. |
This is a first draft at the new Server List API. It will define four new APIs:
/v2/packages
-> Lists Package Info and replaces the previous/packages_all
/v2/groups
-> Lists Group Information and replaces the previous/groups_all
/v2/individuals
-> Lists Individual information, including extra-columns, replaces previous/individuals_all
/v2/janno
-> Lists the full Janno-Data, replaces previous/janno_all
Note that
/zip_file/:package_name
will remain as is.All
/v2/...
APIs will support the official query-string syntax for URIs. For example/v2/packages?client_version=1.1.8.5
will be possible, and theclient_version
parameter is in fact one of the parameters that will be used in all of these V2-APIs.All V2-APIs will return a data type that contains messages from the server to the client.
Another extra-parameters that will be supported is
/v2/individuals?extra_columns=Country,AgeBCAD,...
which will make it possible to query for additional Janno-information for all individuals without actually downloading the entire Janno. I think this will speed up significantly the communication time with the server.We could even add a
searchString
URI parameter to be able to filter return data for specific search terms, but that's an extra feature likely outside of this PR.