com.sdcalmes.sleeper.SleeperApi Maven / Gradle / Ivy
/*
* This Java source file was generated by the Gradle 'init' task.
*/
package com.sdcalmes.sleeper;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
import javax.annotation.concurrent.Immutable;
/**
* The type Sleeper api.
*/
@Immutable
public final class SleeperApi implements Sleeper {
private static final Retrofit RETROFIT =
new Retrofit.Builder()
.baseUrl("http://api.sleeper.app/v1/")
.addConverterFactory(GsonConverterFactory.create())
.build();
private final transient Retrofit retrofit;
/**
* Instantiates a new Sleeper api.
*/
public SleeperApi()
{
this(SleeperApi.RETROFIT);
}
private SleeperApi(final Retrofit retrofit) {
this.retrofit = retrofit;
}
@Override
public UsersImpl users(){
return new UsersImpl(this.retrofit);
}
@Override
public LeagueImpl leagues() {
return new LeagueImpl(this.retrofit);
}
@Override
public DraftImpl drafts() {
return new DraftImpl(this.retrofit);
}
@Override
public PlayerImpl players() {
return new PlayerImpl(this.retrofit);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy