Skip to content
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

Basis for providing multiple data-sources. #115

Merged
merged 8 commits into from
Mar 21, 2020
Merged

Conversation

ExpDev07
Copy link
Owner

@ExpDev07 ExpDev07 commented Mar 21, 2020

This is some groundwork for providing multiple data-sources (#114). To use, simply add ?source=your_source_of_choice at the end of your requests: For example:
http GET /v2/locations?source=jhu

How it works

At the moment, the only available source is still jhu, however, this adds the basis for providing more. This is possible through a middleware that gets executed before every request, dynamically retrieving the service responsible for the source by looking at the query parameter source and attaches it to the request (available through request.source). Defaults to jhu if omitted.

Related

This allows for finally implementing features/fixes mentioned in issues such as #113, #111, #108, and #22.

@ExpDev07 ExpDev07 merged commit 7208fd0 into master Mar 21, 2020
@ExpDev07 ExpDev07 deleted the multiple-sources branch March 21, 2020 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant