// Path: app/src/main/java/com/adkdevelopment/earthquakesurvival/data/objects/earthquake/EarthquakeObject.java
// public class EarthquakeObject {
// 
//     @SerializedName("type")
//     @Expose
//     private String type;
//     @SerializedName("metadata")
//     @Expose
//     private Metadata metadata;
//     @SerializedName("features")
//     @Expose
//     private List<Feature> features = new ArrayList<>();
//     @SerializedName("bbox")
//     @Expose
//     private List<Double> bbox = new ArrayList<>();
// 
//     public static final int NOTIFICATION_ID_1 = 2001;
//     public static final int NOTIFICATION_ID_2 = 2000;
// 
//     public static final int SORT_TIME = 1;
//     public static final int SORT_MAGNITUDE = 2;
//     public static final int SORT_DISTANCE = 3;
// 
//     public static final String NOTIFICATION_GROUP = "earthquake_group";
// 
//     /**
//      *
//      * @return
//      * The type
//      */
//     public String getType() {
//         return type;
//     }
// 
//     /**
//      *
//      * @param type
//      * The type
//      */
//     public void setType(String type) {
//         this.type = type;
//     }
// 
//     /**
//      *
//      * @return
//      * The metadata
//      */
//     public Metadata getMetadata() {
//         return metadata;
//     }
// 
//     /**
//      *
//      * @param metadata
//      * The metadata
//      */
//     public void setMetadata(Metadata metadata) {
//         this.metadata = metadata;
//     }
// 
//     /**
//      *
//      * @return
//      * The features
//      */
//     public List<Feature> getFeatures() {
//         return features;
//     }
// 
//     /**
//      *
//      * @param features
//      * The features
//      */
//     public void setFeatures(List<Feature> features) {
//         this.features = features;
//     }
// 
//     /**
//      *
//      * @return
//      * The bbox
//      */
//     public List<Double> getBbox() {
//         return bbox;
//     }
// 
//     /**
//      *
//      * @param bbox
//      * The bbox
//      */
//     public void setBbox(List<Double> bbox) {
//         this.bbox = bbox;
//     }
// 
// }
// 
// Path: app/src/main/java/com/adkdevelopment/earthquakesurvival/data/objects/info/CountEarthquakes.java
// public class CountEarthquakes {
// 
//     @SerializedName("count")
//     @Expose
//     private int count;
//     @SerializedName("maxAllowed")
//     @Expose
//     private int maxAllowed;
// 
//     /**
//      * @return The count
//      */
//     public int getCount() {
//         return count;
//     }
// 
//     /**
//      * @param count The count
//      */
//     public void setCount(int count) {
//         this.count = count;
//     }
// 
//     /**
//      * @return The maxAllowed
//      */
//     public int getMaxAllowed() {
//         return maxAllowed;
//     }
// 
//     /**
//      * @param maxAllowed The maxAllowed
//      */
//     public void setMaxAllowed(int maxAllowed) {
//         this.maxAllowed = maxAllowed;
//     }
// 
// }
// 
// Path: app/src/main/java/com/adkdevelopment/earthquakesurvival/data/objects/news/Rss.java
// public class Rss
// {
//     @Element(required = false)
//     private Channel channel;
// 
//     @Attribute
//     private String version;
// 
//     public Channel getChannel ()
//     {
//         return channel;
//     }
// 
//     public void setChannel (Channel channel)
//     {
//         this.channel = channel;
//     }
// 
//     public String getVersion ()
//     {
//         return version;
//     }
// 
//     public void setVersion (String version)
//     {
//         this.version = version;
//     }
// 
//     @Override
//     public String toString()
//     {
//         return "ClassPojo [channel = "+channel+", version = "+version+"]";
//     }
// }


import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import com.adkdevelopment.earthquakesurvival.data.objects.earthquake.EarthquakeObject;
import com.adkdevelopment.earthquakesurvival.data.objects.info.CountEarthquakes;
import com.adkdevelopment.earthquakesurvival.data.objects.news.Rss;
import retrofit2.Call;
import retrofit2.http.Field;
/*
 * MIT License
 *
 * Copyright (c) 2016. Dmytro Karataiev
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

package com.adkdevelopment.earthquakesurvival.data.remote;



/**
 * Public interface with a link to the Endpoint
 */
public interface EarthquakeService {

    String sEarthquakeCount = "http://earthquake.usgs.gov/fdsnws/event/1/count?format=geojson";

    @GET("all_day.geojson")
    Call<EarthquakeObject> getData();

    @GET("https://news.google.com/news?q=earthquake&output=rss")
    Call<Rss> getNews();

    @GET(sEarthquakeCount)
    Call<CountEarthquakes> getEarthquakeStats(@Query("starttime") String starttime,
                                              @Query("endtime") String endtime,
                                              @Query("minmagnitude") String magnitude);

    @GET(sEarthquakeCount)
// Path: app/src/main/java/com/adkdevelopment/earthquakesurvival/data/objects/earthquake/EarthquakeObject.java
// public class EarthquakeObject {
// 
//     @SerializedName("type")
//     @Expose
//     private String type;
//     @SerializedName("metadata")
//     @Expose
//     private Metadata metadata;
//     @SerializedName("features")
//     @Expose
//     private List<Feature> features = new ArrayList<>();
//     @SerializedName("bbox")
//     @Expose
//     private List<Double> bbox = new ArrayList<>();
// 
//     public static final int NOTIFICATION_ID_1 = 2001;
//     public static final int NOTIFICATION_ID_2 = 2000;
// 
//     public static final int SORT_TIME = 1;
//     public static final int SORT_MAGNITUDE = 2;
//     public static final int SORT_DISTANCE = 3;
// 
//     public static final String NOTIFICATION_GROUP = "earthquake_group";
// 
//     /**
//      *
//      * @return
//      * The type
//      */
//     public String getType() {
//         return type;
//     }
// 
//     /**
//      *
//      * @param type
//      * The type
//      */
//     public void setType(String type) {
//         this.type = type;
//     }
// 
//     /**
//      *
//      * @return
//      * The metadata
//      */
//     public Metadata getMetadata() {
//         return metadata;
//     }
// 
//     /**
//      *
//      * @param metadata
//      * The metadata
//      */
//     public void setMetadata(Metadata metadata) {
//         this.metadata = metadata;
//     }
// 
//     /**
//      *
//      * @return
//      * The features
//      */
//     public List<Feature> getFeatures() {
//         return features;
//     }
// 
//     /**
//      *
//      * @param features
//      * The features
//      */
//     public void setFeatures(List<Feature> features) {
//         this.features = features;
//     }
// 
//     /**
//      *
//      * @return
//      * The bbox
//      */
//     public List<Double> getBbox() {
//         return bbox;
//     }
// 
//     /**
//      *
//      * @param bbox
//      * The bbox
//      */
//     public void setBbox(List<Double> bbox) {
//         this.bbox = bbox;
//     }
// 
// }
// 
// Path: app/src/main/java/com/adkdevelopment/earthquakesurvival/data/objects/info/CountEarthquakes.java
// public class CountEarthquakes {
// 
//     @SerializedName("count")
//     @Expose
//     private int count;
//     @SerializedName("maxAllowed")
//     @Expose
//     private int maxAllowed;
// 
//     /**
//      * @return The count
//      */
//     public int getCount() {
//         return count;
//     }
// 
//     /**
//      * @param count The count
//      */
//     public void setCount(int count) {
//         this.count = count;
//     }
// 
//     /**
//      * @return The maxAllowed
//      */
//     public int getMaxAllowed() {
//         return maxAllowed;
//     }
// 
//     /**
//      * @param maxAllowed The maxAllowed
//      */
//     public void setMaxAllowed(int maxAllowed) {
//         this.maxAllowed = maxAllowed;
//     }
// 
// }
// 
// Path: app/src/main/java/com/adkdevelopment/earthquakesurvival/data/objects/news/Rss.java
// public class Rss
// {
//     @Element(required = false)
//     private Channel channel;
// 
//     @Attribute
//     private String version;
// 
//     public Channel getChannel ()
//     {
//         return channel;
//     }
// 
//     public void setChannel (Channel channel)
//     {
//         this.channel = channel;
//     }
// 
//     public String getVersion ()
//     {
//         return version;
//     }
// 
//     public void setVersion (String version)
//     {
//         this.version = version;
//     }
// 
//     @Override
//     public String toString()
//     {
//         return "ClassPojo [channel = "+channel+", version = "+version+"]";
//     }
// }


// Path: app/src/main/java/com/adkdevelopment/earthquakesurvival/data/remote/EarthquakeService.java
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import com.adkdevelopment.earthquakesurvival.data.objects.earthquake.EarthquakeObject;
import com.adkdevelopment.earthquakesurvival.data.objects.info.CountEarthquakes;
import com.adkdevelopment.earthquakesurvival.data.objects.news.Rss;
import retrofit2.Call;
import retrofit2.http.Field;

/*
 * MIT License
 *
 * Copyright (c) 2016. Dmytro Karataiev
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

package com.adkdevelopment.earthquakesurvival.data.remote;



/**
 * Public interface with a link to the Endpoint
 */
public interface EarthquakeService {

    String sEarthquakeCount = "http://earthquake.usgs.gov/fdsnws/event/1/count?format=geojson";

    @GET("all_day.geojson")
    Call<EarthquakeObject> getData();

    @GET("https://news.google.com/news?q=earthquake&output=rss")
    Call<Rss> getNews();

    @GET(sEarthquakeCount)
    Call<CountEarthquakes> getEarthquakeStats(@Query("starttime") String starttime,
                                              @Query("endtime") String endtime,
                                              @Query("minmagnitude") String magnitude);

    @GET(sEarthquakeCount)
    Call<CountEarthquakes> getEarthquakeStats(@Query("starttime") String starttime,