Hi, Thanks for the guidance.
Currently I am going ahead with creating two components approach as weather-uv and weather-airpollution. I will be pushing the common code in one package and extend the specific attributes in packages specific to weather,UV and pollution components. I was also trying to think is there any way we can write the enpoint side code decoupled to the actual vendor used for getting weather information i.e openweathermap currently? I see the configuration object(WeatherConfiguration) is coupled to the inputs required by the vendor filters required. I was thinking of creating a middleware i.e. a service say, WeatherService which fetches the data and client and specify the filters for the data which can then be added to the URI (http://api.openweathermap.org/data/2.5/). Maybe this is not how things work in camel. So any guidance will make things more clear to me. Regards, Vineet From: "Gandhi, Vineet" <[email protected]> Date: Thursday, 10 January 2019 at 5:00 PM To: "[email protected]" <[email protected]>, "[email protected]" <[email protected]> Subject: Re: Camel weather component Hi, While implementing the mentioned API’s I have a doubt in terms of design. 1. If we see the component it says component will provide weather details using some 3rd party API. Now UV Index and air pollution don’t exactly fit in the component description say as subcomponent of weather. 2. If we see the weatherConsumer example : from("weather:foo?location=Madrid,Spain&period=7 days&appid=APIKEY").to("jms:queue:weather"); here options signify filtering to be done for weather i.e. current location, zipcode, bbox. Now in order to support the new API’s for UV and air pollution it doesn’t sound right in my perspective to give them as an option parameter or even if we do we have to give something like “isUV=true”. URI for weather : api.openweathermap.org/data/2.5/weather?q={city name},{country code} URI for UV Index : http://api.openweathermap.org/data/2.5/uvi?appid={appid}&lat={lat}&lon={lon} As we see above the path is different. Please guide for the correct behaviour. Regards, Vineet From: Andrea Cosentino <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Wednesday, 9 January 2019 at 10:48 PM To: "[email protected]" <[email protected]>, "Gandhi, Vineet" <[email protected]>, "[email protected]" <[email protected]> Subject: R: Camel weather component Contributions are always welcome :-) Inviato da Yahoo Mail su Android<https://go.onelink.me/107872968?pid=InProduct&c=Global_Internal_YGrowth_AndroidEmailSig__AndroidUsers&af_wl=ym&af_sub1=Internal&af_sub2=Global_YGrowth&af_sub3=EmailSignature> Il mer, 9 gen, 2019 alle 17:54, Gandhi, Vineet <[email protected]> ha scritto: Hi, I was going through this component and checked the https://openweathermap.org/api. Some new API’s are introduced like https://openweathermap.org/api/uvi https://openweathermap.org/api/pollution/co I was thinking of adding those support. Also code can be made more robust I feel. Please revert back. Regards, Vineet This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately.
