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

Add a simple webservice to serve the converted schedules #43

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

AlbanBedel
Copy link

This series add a simple web service that can serve the schedules dynamicaly. It use the same config as the file exporter but instead of writing to files it serve the configured paths.

Using the demo data you can then get the json schedule at: http://localhost:8080/demo/gpn11.json and the extended xml at http://localhost:8080/demo/gpn11.xml.

Currently the export classes expose an `run` method that directly
write to a file given in the config. To allow using the exporter in a
web service rework the classes to also provide an `export` method that
only produce the data. The `run` method can then be provided by the
base class using the new `export` method.
The content type of the export is needed for the web service, let the
exporters report it.
Add a simple web service that can serve the schedules dynamicaly. It
use the same config as the file exporter but instead of writing to
files it serve the configured paths.

Using the demo data you can then get the json schedule at:
http://localhost:8080/demo/gpn11.json and the extended xml at
http://localhost:8080/demo/gpn11.xml.
Copy link
Member

@saerdnaer saerdnaer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

2 participants