Class WeatherResource


  • @Path("/weather")
    @ApplicationScoped
    public class WeatherResource
    extends Object
    • Field Detail

      • producerTemplate

        @Inject
        org.apache.camel.ProducerTemplate producerTemplate
      • consumerTemplate

        @Inject
        org.apache.camel.ConsumerTemplate consumerTemplate
      • weatherApiId

        String weatherApiId
    • Constructor Detail

      • WeatherResource

        public WeatherResource()
    • Method Detail

      • getWeatherByLocation

        @Path("location/{location}")
        @GET
        @Produces("application/json")
        public javax.ws.rs.core.Response getWeatherByLocation​(@PathParam("location")
                                                              String location)
      • getWeatherByCoordinate

        @Path("lat/{lat}/lon/{lon}")
        @GET
        @Produces("application/json")
        public javax.ws.rs.core.Response getWeatherByCoordinate​(@PathParam("lat")
                                                                String latitude,
                                                                @PathParam("lon")
                                                                String longitude)
      • getWeatherByZip

        @Path("zip/{zip}")
        @GET
        @Produces("application/json")
        public javax.ws.rs.core.Response getWeatherByZip​(@PathParam("zip")
                                                         String zip)
      • getWeatherByIds

        @Path("ids/{ids}")
        @GET
        @Produces("application/json")
        public javax.ws.rs.core.Response getWeatherByIds​(@PathParam("ids")
                                                         String ids)
      • getWeatherByPeriod

        @Path("location/{location}/period/{period}")
        @GET
        @Produces("application/json")
        public javax.ws.rs.core.Response getWeatherByPeriod​(@PathParam("location")
                                                            String location,
                                                            @PathParam("period")
                                                            String period)
      • getWeather

        @Path("{location}")
        @GET
        @Produces("application/json")
        public javax.ws.rs.core.Response getWeather​(@PathParam("location")
                                                    String location)
                                             throws Exception
        Throws:
        Exception