diff --git a/app/src/main/java/org/ntlab/acanthus_client/views/paint/InvitesConnectionModel.java b/app/src/main/java/org/ntlab/acanthus_client/views/paint/InvitesConnectionModel.java deleted file mode 100644 index 8a06abd..0000000 --- a/app/src/main/java/org/ntlab/acanthus_client/views/paint/InvitesConnectionModel.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.ntlab.acanthus_client.views.paint; - -import org.ntlab.acanthus_client.Acanthus; -import org.ntlab.acanthus_client.resources.gallery.InvitesRest; -import org.ntlab.acanthus_client.resources.gallery.StrokesRest; - -import retrofit2.Call; -import retrofit2.Callback; -import retrofit2.Response; -import retrofit2.Retrofit; -import retrofit2.converter.jackson.JacksonConverterFactory; -import retrofit2.converter.scalars.ScalarsConverterFactory; - -//----------------------------------------------------------------- -// 招待関係通信 -public class InvitesConnectionModel { - private Retrofit retrofit; - private Acanthus acanthus; - - //----------------------------------------------------------------- - // - public InvitesConnectionModel(Acanthus acanthus) { - init(acanthus); - } - - //----------------------------------------------------------------- - //----------------------------------------------------------------- - // init - public void init(Acanthus acanthus) { - this.acanthus = acanthus; - this.retrofit = new Retrofit.Builder() - .baseUrl("http://nitta-lab-www.is.konan-u.ac.jp/acanthus/") - .addConverterFactory(ScalarsConverterFactory.create()) - .addConverterFactory(JacksonConverterFactory.create()) - .build(); - } - - //----------------------------------------------------------------- - // 新しい編集者の追加(POST) - public void inviteNewEditor(Integer invitedUid) { - final InvitesRest invitesRest = retrofit.create(InvitesRest.class); - Integer owner = 1; - String token = "abc0"; - int dummy = 1111; - - //----------------------------------------------------------------- - // 招待リクエストを送るAPI - Call call = invitesRest.addInvite(dummy, owner.toString(), invitedUid.toString(), token); - call.enqueue(new Callback() { - @Override - public void onResponse(Call call, Response response) { - if(response.isSuccessful()); - } - - @Override - public void onFailure(Call call, Throwable t) { - - } - }); - } - //----------------------------------------------------------------- - -}