// Path: github-api/src/main/java/com/dmitrymalkovich/android/githubapi/core/data/Clones.java
// @SuppressWarnings("all")
// public class Clones {
//     @SerializedName("count")
//     private String mCount;
// 
//     @SerializedName("uniques")
//     private String mUniques;
// 
//     @SerializedName("clones")
//     private List<Clone> mClones;
// 
//     public List<Clone> asList() {
//         return mClones;
//     }
// 
//     public static class Clone {
//         @SerializedName("timestamp")
//         private String mTimestamp;
// 
//         @SerializedName("count")
//         private String mCount;
// 
//         @SerializedName("uniques")
//         private String mUniques;
// 
//         public String getTimestamp() {
//             return mTimestamp;
//         }
// 
//         public String getCount() {
//             return mCount;
//         }
// 
//         public String getUniques() {
//             return mUniques;
//         }
//     }
// }
// 
// Path: github-api/src/main/java/com/dmitrymalkovich/android/githubapi/core/data/ReferringSite.java
// @SuppressWarnings("all")
// public class ReferringSite {
// 
//     @SerializedName("referrer")
//     private String mReferrer;
// 
//     @SerializedName("count")
//     private int mCount;
// 
//     @SerializedName("uniques")
//     private int mUniques;
// 
//     public String getReferrer() {
//         return mReferrer;
//     }
// 
//     public int getCount() {
//         return mCount;
//     }
// 
//     public int getUniques() {
//         return mUniques;
//     }
// }
// 
// Path: github-api/src/main/java/com/dmitrymalkovich/android/githubapi/core/data/Views.java
// @SuppressWarnings("all")
// public class Views {
//     @SerializedName("count")
//     private String mCount;
// 
//     @SerializedName("uniques")
//     private String mUniques;
// 
//     @SerializedName("views")
//     private List<View> mViews;
// 
//     public List<View> getViews() {
//         return mViews;
//     }
// 
//     public static class View {
//         @SerializedName("timestamp")
//         private String mTimestamp;
// 
//         @SerializedName("count")
//         private String mCount;
// 
//         @SerializedName("uniques")
//         private String mUniques;
// 
//         public String getTimestamp() {
//             return mTimestamp;
//         }
// 
//         public String getCount() {
//             return mCount;
//         }
// 
//         public String getUniques() {
//             return mUniques;
//         }
//     }
// }


import com.dmitrymalkovich.android.githubapi.core.data.Clones;
import com.dmitrymalkovich.android.githubapi.core.data.ReferringSite;
import com.dmitrymalkovich.android.githubapi.core.data.Views;
import org.eclipse.egit.github.core.Repository;
import java.io.IOException;
import java.util.List;
import retrofit2.Call;
import retrofit2.Response;
/*
 * Copyright 2017.  Dmitry Malkovich
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.dmitrymalkovich.android.githubapi.core;





public class TrafficService extends Service {
    private String mLogin;
    private String mRepositoryName;
    private String mPeriod;

    public TrafficService setToken(String token) {
        return (TrafficService) super.setToken(token);
    }

    public TrafficService setTokenType(String tokenType) {
        return (TrafficService) super.setTokenType(tokenType);
    }

    public TrafficService setRepository(Repository repository) {
        mRepositoryName = repository.getName();
        mLogin = repository.getOwner().getLogin();
        return this;
    }

    public TrafficService setPeriod(String period) {
        mPeriod = period;
        return this;
    }

    public Clones getClones() throws IOException {
        Call<Clones> call = createGithubService().getRepositoryClones(
                mLogin, mRepositoryName, mPeriod);

        Response<Clones> response = call.execute();
        if (response.isSuccessful()) {
// Path: github-api/src/main/java/com/dmitrymalkovich/android/githubapi/core/data/Clones.java
// @SuppressWarnings("all")
// public class Clones {
//     @SerializedName("count")
//     private String mCount;
// 
//     @SerializedName("uniques")
//     private String mUniques;
// 
//     @SerializedName("clones")
//     private List<Clone> mClones;
// 
//     public List<Clone> asList() {
//         return mClones;
//     }
// 
//     public static class Clone {
//         @SerializedName("timestamp")
//         private String mTimestamp;
// 
//         @SerializedName("count")
//         private String mCount;
// 
//         @SerializedName("uniques")
//         private String mUniques;
// 
//         public String getTimestamp() {
//             return mTimestamp;
//         }
// 
//         public String getCount() {
//             return mCount;
//         }
// 
//         public String getUniques() {
//             return mUniques;
//         }
//     }
// }
// 
// Path: github-api/src/main/java/com/dmitrymalkovich/android/githubapi/core/data/ReferringSite.java
// @SuppressWarnings("all")
// public class ReferringSite {
// 
//     @SerializedName("referrer")
//     private String mReferrer;
// 
//     @SerializedName("count")
//     private int mCount;
// 
//     @SerializedName("uniques")
//     private int mUniques;
// 
//     public String getReferrer() {
//         return mReferrer;
//     }
// 
//     public int getCount() {
//         return mCount;
//     }
// 
//     public int getUniques() {
//         return mUniques;
//     }
// }
// 
// Path: github-api/src/main/java/com/dmitrymalkovich/android/githubapi/core/data/Views.java
// @SuppressWarnings("all")
// public class Views {
//     @SerializedName("count")
//     private String mCount;
// 
//     @SerializedName("uniques")
//     private String mUniques;
// 
//     @SerializedName("views")
//     private List<View> mViews;
// 
//     public List<View> getViews() {
//         return mViews;
//     }
// 
//     public static class View {
//         @SerializedName("timestamp")
//         private String mTimestamp;
// 
//         @SerializedName("count")
//         private String mCount;
// 
//         @SerializedName("uniques")
//         private String mUniques;
// 
//         public String getTimestamp() {
//             return mTimestamp;
//         }
// 
//         public String getCount() {
//             return mCount;
//         }
// 
//         public String getUniques() {
//             return mUniques;
//         }
//     }
// }


// Path: github-api/src/main/java/com/dmitrymalkovich/android/githubapi/core/TrafficService.java
import com.dmitrymalkovich.android.githubapi.core.data.Clones;
import com.dmitrymalkovich.android.githubapi.core.data.ReferringSite;
import com.dmitrymalkovich.android.githubapi.core.data.Views;
import org.eclipse.egit.github.core.Repository;
import java.io.IOException;
import java.util.List;
import retrofit2.Call;
import retrofit2.Response;

/*
 * Copyright 2017.  Dmitry Malkovich
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.dmitrymalkovich.android.githubapi.core;





public class TrafficService extends Service {
    private String mLogin;
    private String mRepositoryName;
    private String mPeriod;

    public TrafficService setToken(String token) {
        return (TrafficService) super.setToken(token);
    }

    public TrafficService setTokenType(String tokenType) {
        return (TrafficService) super.setTokenType(tokenType);
    }

    public TrafficService setRepository(Repository repository) {
        mRepositoryName = repository.getName();
        mLogin = repository.getOwner().getLogin();
        return this;
    }

    public TrafficService setPeriod(String period) {
        mPeriod = period;
        return this;
    }

    public Clones getClones() throws IOException {
        Call<Clones> call = createGithubService().getRepositoryClones(
                mLogin, mRepositoryName, mPeriod);

        Response<Clones> response = call.execute();
        if (response.isSuccessful()) {
            Clones clones = response.body();