cedteg / tankerkoenig_api

https://pub.dev/packages/tankerkoenig_api
MIT License
1 stars 0 forks source link

Combine tankerkoenig dart packages #1

Open jayjah opened 2 years ago

jayjah commented 2 years ago

Hey @cedteg

I just noticed that I implemented another Tankerkönig dart package and published it on pub.dev. See here: tankerkoenig_dart

Afterwards I realized that your package address the old api. Mine one addresses the new V4 API.

So I thought it would make sense to combine those two packages to one. What do you think of it?

King regards, Markus

cedteg commented 2 years ago

Hey @jayjah thanks for your message.

Great Idea.

How we want to do it? Like to call?

jayjah commented 2 years ago

Yeah, of course. I'm open for a call!

Moreover I barely overlooked both codes, but at the first step we should choose wether the dart:http or chopper package is responsible to handle the requests itself. Therefore must one adapt their code to the corresponding dependency. Afterwards I think to merge the model classes itself is a quite no-brainer, because it looks as if those are more or less equal. And then I think it makes sense to introduce an enum which flags the api to choose, especially with the new dart 2.17 enum feature, this should be quite easy, because it should be manageable to inject the corresponding request handler inside the enum.

This is just an idea that pops into my head when I look think about a merge of those two packages.