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

Sync districts #16

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

Sync districts #16

wants to merge 9 commits into from

Conversation

leowroth
Copy link
Contributor

No description provided.

@leowroth leowroth linked an issue Jun 11, 2020 that may be closed by this pull request

interface WegliEndpoints {

@GET("/districts.json")
Copy link
Member

Choose a reason for hiding this comment

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

It would be better to use the Accept: application/json HTTP Header instead of the .json format.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know what that means. Care to elaborate?

private val client = OkHttpClient.Builder().build()

private val retrofit = Retrofit.Builder()
.baseUrl("https://www.weg-li.de/")
Copy link
Member

Choose a reason for hiding this comment

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

It would make sense to put this in some kind of configuration that can be overwritten for development purposes in order to test changes on the API.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea, but I would only do this, if we actually use this for tests later. I'm a fan of YAGNI

val zip: String,
val name: String,
val email: String,
val prefix: String
Copy link
Member

Choose a reason for hiding this comment

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

Instead of prefix i would add the aliases array, otherwise it's basically not possible to use the app in Munich.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What is aliases? Looking at the json most at the beginning are either [] or null

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just found an entry: [email protected]","[email protected]

Looks to me like the alternative email addresses? I'll add that.

If we have no use for the prefix, I can remove it. I only picked data, that seemed interesting.

Copy link
Member

Choose a reason for hiding this comment

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

Munich does not have a central e-mail address to handle charges. People have to know which police station they have to e-mail it to. At least, we can give a little guidance based on ZIPs.

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.

Sync districts
2 participants