// Path: github-api/src/main/java/com/dmitrymalkovich/android/githubapi/core/time/TimeConverter.java
// public class TimeConverter {
//     private static final String LOG_TAG = TimeConverter.class.getSimpleName();
// 
//     public static long iso8601ToMilliseconds(String date) {
//         SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.US);
//         long timeInMilliseconds = 0;
//         try {
//             Date parsedDate = df.parse(date);
//             timeInMilliseconds = parsedDate.getTime();
//         } catch (ParseException e) {
//             Log.e(LOG_TAG, e.getMessage(), e);
//         }
//         return timeInMilliseconds;
//     }
// 
//     public static TimeZone getGitHubDefaultTimeZone() {
//         return TimeZone.getTimeZone("GMT");
//     }
// }
// 
// Path: github-api/src/main/java/com/dmitrymalkovich/android/githubapi/core/data/Star.java
// @SuppressWarnings("all")
// public class Star {
// 
//     @SerializedName("user")
//     public User mUser;
//     @SerializedName("starred_at")
//     private String mStarredAt;
// 
//     public String getStarredAt() {
//         return mStarredAt;
//     }
// 
//     private class User {
//         @SerializedName("id")
//         private long mId;
// 
//         @SerializedName("login")
//         private String mLogin;
// 
//         @SerializedName("url")
//         private String mUrl;
// 
//         public long getId() {
//             return mId;
//         }
// 
//         public String getLogin() {
//             return mLogin;
//         }
// 
//         public String getUrl() {
//             return mUrl;
//         }
//     }
// }


import android.support.annotation.WorkerThread;
import com.dmitrymalkovich.android.githubapi.core.time.TimeConverter;
import com.dmitrymalkovich.android.githubapi.core.data.Star;
import org.eclipse.egit.github.core.Repository;
import java.io.IOException;
import java.util.ArrayList;
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 StargazersService extends Service {
    private String mLogin;
    private String mRepositoryName;
    private String mPage;
    private long mDate;

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

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

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

    public StargazersService setPage(String page) {
        mPage = page;
        return this;
    }

    public StargazersService setDate(long date) {
        mDate = date;
        return this;
    }

    @WorkerThread
// Path: github-api/src/main/java/com/dmitrymalkovich/android/githubapi/core/time/TimeConverter.java
// public class TimeConverter {
//     private static final String LOG_TAG = TimeConverter.class.getSimpleName();
// 
//     public static long iso8601ToMilliseconds(String date) {
//         SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.US);
//         long timeInMilliseconds = 0;
//         try {
//             Date parsedDate = df.parse(date);
//             timeInMilliseconds = parsedDate.getTime();
//         } catch (ParseException e) {
//             Log.e(LOG_TAG, e.getMessage(), e);
//         }
//         return timeInMilliseconds;
//     }
// 
//     public static TimeZone getGitHubDefaultTimeZone() {
//         return TimeZone.getTimeZone("GMT");
//     }
// }
// 
// Path: github-api/src/main/java/com/dmitrymalkovich/android/githubapi/core/data/Star.java
// @SuppressWarnings("all")
// public class Star {
// 
//     @SerializedName("user")
//     public User mUser;
//     @SerializedName("starred_at")
//     private String mStarredAt;
// 
//     public String getStarredAt() {
//         return mStarredAt;
//     }
// 
//     private class User {
//         @SerializedName("id")
//         private long mId;
// 
//         @SerializedName("login")
//         private String mLogin;
// 
//         @SerializedName("url")
//         private String mUrl;
// 
//         public long getId() {
//             return mId;
//         }
// 
//         public String getLogin() {
//             return mLogin;
//         }
// 
//         public String getUrl() {
//             return mUrl;
//         }
//     }
// }


// Path: github-api/src/main/java/com/dmitrymalkovich/android/githubapi/core/StargazersService.java
import android.support.annotation.WorkerThread;
import com.dmitrymalkovich.android.githubapi.core.time.TimeConverter;
import com.dmitrymalkovich.android.githubapi.core.data.Star;
import org.eclipse.egit.github.core.Repository;
import java.io.IOException;
import java.util.ArrayList;
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 StargazersService extends Service {
    private String mLogin;
    private String mRepositoryName;
    private String mPage;
    private long mDate;

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

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

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

    public StargazersService setPage(String page) {
        mPage = page;
        return this;
    }

    public StargazersService setDate(long date) {
        mDate = date;
        return this;
    }

    @WorkerThread
    public List<Star> getStars() throws IOException {