Lockness / whether-api

1 stars 0 forks source link

Need a DTO to help become less dependent on any external API #24

Open Jtcruthers opened 4 years ago

Jtcruthers commented 4 years ago

We should create some standard DTO between the api and fe. Right now we kinda just pass through the data from the weather api. If we standardized it and created an interface, we could use different APIs and strip out what we need only for the DTO. This will also help remove some of the noise and create a smaller, better defined response.

ryantomlinson95 commented 4 years ago

DTO? Got any articles or something?

Jtcruthers commented 4 years ago

Data Transfer Object. Just like some class that both FE and API implement. Then its ez to respond in json via api and cast from json in the fe.

The spirit of this was we should have a defined class and use that. Then when we change weather apis, we just have to map their api to the class's attributes.