Sync districts#16
Conversation
…erving MainViewModel which get's districts via coroutines
|
|
||
| interface WegliEndpoints { | ||
|
|
||
| @GET("/districts.json") |
There was a problem hiding this comment.
It would be better to use the Accept: application/json HTTP Header instead of the .json format.
There was a problem hiding this comment.
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/") |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Instead of prefix i would add the aliases array, otherwise it's basically not possible to use the app in Munich.
There was a problem hiding this comment.
What is aliases? Looking at the json most at the beginning are either [] or null
There was a problem hiding this comment.
I just found an entry: pp-mue.muenchen.pi11@polizei.bayern.de","pp-mue.muenchen.pi12@polizei.bayern.de
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.
There was a problem hiding this comment.
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.
No description provided.