diff --git a/app/src/main/java/com/example/cosmosclient/entities/ToJoinGroupRetrofitMethods.java b/app/src/main/java/com/example/cosmosclient/entities/ToJoinGroupRetrofitMethods.java index 774a3f1..65bf3ae 100644 --- a/app/src/main/java/com/example/cosmosclient/entities/ToJoinGroupRetrofitMethods.java +++ b/app/src/main/java/com/example/cosmosclient/entities/ToJoinGroupRetrofitMethods.java @@ -26,56 +26,56 @@ public ToJoinGroupRetrofitMethods() { } - public String runRetrofit() { - //retrofitの処理 - final Retrofit retrofit = new Retrofit.Builder() - .baseUrl("http://nitta-lab-www.is.konan-u.ac.jp/cosmos/") - .addConverterFactory(JacksonConverterFactory.create()) - .build(); - //interfaceから実装を取得 - final JoinGroupRest joinGroupService = retrofit.create(JoinGroupRest.class); - - String gid="dnjewvhoirae"; - String uid="dnjewvhfgoirae"; - String token="dnjewvhoidgfrae"; - //API呼び出しのための値入力 - Call call = joinGroupService.JoinGroup(gid, uid, token); - - //サーバからデータ受け取り - call.enqueue(new Callback() { - //成功時 - @Override - public void onResponse(Call call, Response response) { - if (response.isSuccessful()) { - JoinGroupResponse result = response.body(); - - Cosmos app = (Cosmos) getApplication(); - Intent intent = new Intent(getApplication(), GroupListActivity.class); - - //test -// System.out.println(result.uId); -// System.out.println(result.name); -// System.out.println(result.uri); -// System.out.println(result.token); -// System.out.println(result.iconUri); -// System.out.println(result.pw); - - //ここで成功の処理を記述 - finish(); - - } else { - //onFailureでキャッチできないエラー用 - //ここでエラーの処理を記述 - } - } - - - //失敗時 - @Override - public void onFailure(Call call, Throwable t) { - String errertxt = "errer"; - return errertxt; - } - }); - } +// public String runRetrofit() { +// //retrofitの処理 +// final Retrofit retrofit = new Retrofit.Builder() +// .baseUrl("http://nitta-lab-www.is.konan-u.ac.jp/cosmos/") +// .addConverterFactory(JacksonConverterFactory.create()) +// .build(); +// //interfaceから実装を取得 +// final JoinGroupRest joinGroupService = retrofit.create(JoinGroupRest.class); +// +// String gid="dnjewvhoirae"; +// String uid="dnjewvhfgoirae"; +// String token="dnjewvhoidgfrae"; +// //API呼び出しのための値入力 +// Call call = joinGroupService.JoinGroup(gid, uid, token); +// +// //サーバからデータ受け取り +// call.enqueue(new Callback() { +// //成功時 +// @Override +// public void onResponse(Call call, Response response) { +// if (response.isSuccessful()) { +// JoinGroupResponse result = response.body(); +// +// Cosmos app = (Cosmos) getApplication(); +// Intent intent = new Intent(getApplication(), GroupListActivity.class); +// +// //test +//// System.out.println(result.uId); +//// System.out.println(result.name); +//// System.out.println(result.uri); +//// System.out.println(result.token); +//// System.out.println(result.iconUri); +//// System.out.println(result.pw); +// +// //ここで成功の処理を記述 +// finish(); +// +// } else { +// //onFailureでキャッチできないエラー用 +// //ここでエラーの処理を記述 +// } +// } +// +// +// //失敗時 +// @Override +// public void onFailure(Call call, Throwable t) { +// String errertxt = "errer"; +// return errertxt; +// } +// }); +// } }