// Path: app/src/main/java/com/lgvalle/beaufitulphotos/fivehundredpxs/model/Favorites.java
// public class Favorites implements Serializable{
// 	@JsonProperty("total_items")
// 	int totalItems;
// 
// 	public int getTotalItems() {
// 		return totalItems;
// 	}
// 
// 	public void setTotalItems(int totalItems) {
// 		this.totalItems = totalItems;
// 	}
// }
// 
// Path: app/src/main/java/com/lgvalle/beaufitulphotos/fivehundredpxs/model/PhotosResponse.java
// public class PhotosResponse implements Serializable{
// 
// 	@JsonProperty("current_page")
// 	private Integer currentPage;
// 	@JsonProperty("total_pages")
// 	private Integer totalPages;
// 	@JsonProperty("photos")
// 	private List<Photo500px> photos;
// 
// 	public PhotosResponse() {
// 		currentPage = 0;
// 		totalPages = 0;
// 		photos = new ArrayList<Photo500px>();
// 	}
// 
// 	public Integer getCurrentPage() {
// 		return currentPage;
// 	}
// 
// 	public void setCurrentPage(Integer currentPage) {
// 		this.currentPage = currentPage;
// 	}
// 
// 	public List<Photo500px> getPhotos() {
// 		return photos;
// 	}
// 
// 	public void setPhotos(List<Photo500px> photos) {
// 		this.photos = photos;
// 	}
// 
// 	public Integer getTotalPages() {
// 		return totalPages;
// 	}
// 
// 	public void setTotalPages(Integer totalPages) {
// 		this.totalPages = totalPages;
// 	}
// }


import com.lgvalle.beaufitulphotos.fivehundredpxs.model.Favorites;
import com.lgvalle.beaufitulphotos.fivehundredpxs.model.PhotosResponse;
import ly.apps.android.rest.cache.CachePolicy;
import ly.apps.android.rest.client.Callback;
import ly.apps.android.rest.client.annotations.*;
package com.lgvalle.beaufitulphotos.fivehundredpxs;



/**
 * Created by lgvalle on 22/07/14.
 * <p/>
 * Retrofit interface describing a 500px APi endpoint
 */
@RestService
public interface Api500pxService {
	/* Consumer key is app specific */
	public static final String CONSUMER_KEY_VALUE = "B2VtIGTPFrbg1YXUVujHhKIo5I9lVjBxgPIFk7A4";
	public final static int FIRST_PAGE = 1;
	public final static int SIZE_SMALL = 3;
	public final static int SIZE_BIG = 4;
	public final static int FIVE_MINUTES = 5 * 60 * 1000;

	/**
	 * Query for /photos and specify a image size and page
	 * Documentation: https://github.com/500px/api-documentation/blob/master/endpoints/photo/GET_photos.md
	 * <p/>
	 * For example, this creates a query like: https://api.500px.com/v1/photos?feature=popular&image_size[]=2&image_size[]=4&page=1
	 *
	 * @param feature   For example 'popular'
	 * @param sizeSmall Number between 1 and 4
	 * @param sizeLarge Number between 1 and 4
	 * @param page      Page to fetch, starts in 1
	 * @param callback  Callback to access response
	 */
	@GET("/photos")
	@Cached(policy = CachePolicy.ENABLED, timeToLive = FIVE_MINUTES)
	void getPhotos(@QueryParam("consumer_key") String key,
	               @QueryParam("image_size[]") int sizeSmall,
	               @QueryParam("image_size[]") int sizeLarge,
	               @QueryParam("feature") String feature,
	               @QueryParam("page") int page,
// Path: app/src/main/java/com/lgvalle/beaufitulphotos/fivehundredpxs/model/Favorites.java
// public class Favorites implements Serializable{
// 	@JsonProperty("total_items")
// 	int totalItems;
// 
// 	public int getTotalItems() {
// 		return totalItems;
// 	}
// 
// 	public void setTotalItems(int totalItems) {
// 		this.totalItems = totalItems;
// 	}
// }
// 
// Path: app/src/main/java/com/lgvalle/beaufitulphotos/fivehundredpxs/model/PhotosResponse.java
// public class PhotosResponse implements Serializable{
// 
// 	@JsonProperty("current_page")
// 	private Integer currentPage;
// 	@JsonProperty("total_pages")
// 	private Integer totalPages;
// 	@JsonProperty("photos")
// 	private List<Photo500px> photos;
// 
// 	public PhotosResponse() {
// 		currentPage = 0;
// 		totalPages = 0;
// 		photos = new ArrayList<Photo500px>();
// 	}
// 
// 	public Integer getCurrentPage() {
// 		return currentPage;
// 	}
// 
// 	public void setCurrentPage(Integer currentPage) {
// 		this.currentPage = currentPage;
// 	}
// 
// 	public List<Photo500px> getPhotos() {
// 		return photos;
// 	}
// 
// 	public void setPhotos(List<Photo500px> photos) {
// 		this.photos = photos;
// 	}
// 
// 	public Integer getTotalPages() {
// 		return totalPages;
// 	}
// 
// 	public void setTotalPages(Integer totalPages) {
// 		this.totalPages = totalPages;
// 	}
// }


// Path: app/src/main/java/com/lgvalle/beaufitulphotos/fivehundredpxs/Api500pxService.java
import com.lgvalle.beaufitulphotos.fivehundredpxs.model.Favorites;
import com.lgvalle.beaufitulphotos.fivehundredpxs.model.PhotosResponse;
import ly.apps.android.rest.cache.CachePolicy;
import ly.apps.android.rest.client.Callback;
import ly.apps.android.rest.client.annotations.*;

package com.lgvalle.beaufitulphotos.fivehundredpxs;



/**
 * Created by lgvalle on 22/07/14.
 * <p/>
 * Retrofit interface describing a 500px APi endpoint
 */
@RestService
public interface Api500pxService {
	/* Consumer key is app specific */
	public static final String CONSUMER_KEY_VALUE = "B2VtIGTPFrbg1YXUVujHhKIo5I9lVjBxgPIFk7A4";
	public final static int FIRST_PAGE = 1;
	public final static int SIZE_SMALL = 3;
	public final static int SIZE_BIG = 4;
	public final static int FIVE_MINUTES = 5 * 60 * 1000;

	/**
	 * Query for /photos and specify a image size and page
	 * Documentation: https://github.com/500px/api-documentation/blob/master/endpoints/photo/GET_photos.md
	 * <p/>
	 * For example, this creates a query like: https://api.500px.com/v1/photos?feature=popular&image_size[]=2&image_size[]=4&page=1
	 *
	 * @param feature   For example 'popular'
	 * @param sizeSmall Number between 1 and 4
	 * @param sizeLarge Number between 1 and 4
	 * @param page      Page to fetch, starts in 1
	 * @param callback  Callback to access response
	 */
	@GET("/photos")
	@Cached(policy = CachePolicy.ENABLED, timeToLive = FIVE_MINUTES)
	void getPhotos(@QueryParam("consumer_key") String key,
	               @QueryParam("image_size[]") int sizeSmall,
	               @QueryParam("image_size[]") int sizeLarge,
	               @QueryParam("feature") String feature,
	               @QueryParam("page") int page,
	               Callback<PhotosResponse> callback);