Skip to content

Instantly share code, notes, and snippets.

@0x5d
Last active September 26, 2015 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0x5d/1782f00107870faaf0ce to your computer and use it in GitHub Desktop.
Save 0x5d/1782f00107870faaf0ce to your computer and use it in GitHub Desktop.
package com.mycompany.myfirstapp.api;
import com.mycompany.myfirstapp.model.weather.WeatherInfo;
import retrofit.Call;
import retrofit.http.GET;
import retrofit.http.Query;
public interface WeatherInfoApi {
@GET("/data/2.5/weather")
Call<WeatherInfo> getWeatherForName(@Query("q") String name);
@GET("/data/2.5/weather")
Call<WeatherInfo> getWeatherForCoords(@Query("lat") double lat, @Query("lon") double lon);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment