AvatarBuilderApiV3.java 2.88 KB
package com.bitstrips.imoji.abv3.api;

import android.support.annotation.NonNull;
import com.bitstrips.imoji.abv3.AvatarBuilderGender;
import com.bitstrips.imoji.abv3.AvatarBuilderStyle;
import com.bitstrips.imoji.abv3.model.AvatarAssets;
import com.bitstrips.imoji.abv3.model.AvatarGetMappedOptionIdsResponse;
import com.bitstrips.imoji.abv3.model.AvatarGetV3;
import com.bitstrips.imoji.abv3.model.AvatarSaveResponseV3;
import com.bitstrips.imoji.abv3.model.AvatarSaveV3;
import com.bitstrips.imoji.api.BitmojiApi;
import java.util.HashMap;
import java.util.Map;
import retrofit.Callback;
import retrofit.RetrofitError;

public class AvatarBuilderApiV3
  implements AvatarBuilderApi
{
  private final BitmojiApi a;
  
  public AvatarBuilderApiV3(BitmojiApi paramBitmojiApi)
  {
    this.a = paramBitmojiApi;
  }
  
  public void getAssets(@NonNull final AvatarBuilderGetAssetsCallback paramAvatarBuilderGetAssetsCallback)
  {
    this.a.assetsV3(new Callback()
    {
      public final void failure(RetrofitError paramAnonymousRetrofitError)
      {
        paramAvatarBuilderGetAssetsCallback.failure(paramAnonymousRetrofitError);
      }
    });
  }
  
  public void getAvatar(@NonNull final AvatarBuilderGetAvatarCallback paramAvatarBuilderGetAvatarCallback)
  {
    this.a.getAvatarV3(new Callback()
    {
      public final void failure(RetrofitError paramAnonymousRetrofitError)
      {
        paramAvatarBuilderGetAvatarCallback.failure(paramAnonymousRetrofitError);
      }
    });
  }
  
  public void getMappedOptionIds(int paramInt, @NonNull final AvatarBuilderGetMappedOptionIdsCallback paramAvatarBuilderGetMappedOptionIdsCallback)
  {
    this.a.getMappedOptionIds(paramInt, new Callback()
    {
      public final void failure(RetrofitError paramAnonymousRetrofitError)
      {
        paramAvatarBuilderGetMappedOptionIdsCallback.failure(paramAnonymousRetrofitError);
      }
    });
  }
  
  public void saveAvatar(@NonNull AvatarBuilderGender paramAvatarBuilderGender, @NonNull AvatarBuilderStyle paramAvatarBuilderStyle, @NonNull Map<String, Integer> paramMap, @NonNull String paramString, @NonNull final AvatarBuilderSaveAvatarCallback paramAvatarBuilderSaveAvatarCallback)
  {
    HashMap localHashMap = new HashMap();
    localHashMap.putAll(paramMap);
    localHashMap.remove("style");
    localHashMap.remove("gender");
    paramAvatarBuilderGender = new AvatarSaveV3(paramAvatarBuilderGender.getValue(), paramAvatarBuilderStyle.getValue(), localHashMap, paramString);
    this.a.saveAvatarV3(paramAvatarBuilderGender, new Callback()
    {
      public final void failure(RetrofitError paramAnonymousRetrofitError)
      {
        paramAvatarBuilderSaveAvatarCallback.failure(paramAnonymousRetrofitError);
      }
    });
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/abv3/api/AvatarBuilderApiV3.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */