Browse Source

Api implementation

master
Apalak Dutta 1 year ago
parent
commit
7c8fa6e2c6
3 changed files with 5 additions and 4 deletions
  1. +1
    -1
      examples/example_bestshot/example/app/src/main/java/ru/visionlab/femdemo/api/CallApiService.java
  2. +3
    -2
      examples/example_bestshot/example/app/src/main/java/ru/visionlab/femdemo/api/JsonPlaceHolderApi.java
  3. +1
    -1
      examples/example_bestshot/example/app/src/main/java/ru/visionlab/femdemo/register/RegisterActivityNew.java

+ 1
- 1
examples/example_bestshot/example/app/src/main/java/ru/visionlab/femdemo/api/CallApiService.java View File

@ -10,7 +10,7 @@ public class CallApiService {
if(retrofit == null){
retrofit = new Retrofit.Builder()
.baseUrl("https://jsonplaceholder.typicode.com/")
.baseUrl("http://huaiglobal.com/api/")
.addConverterFactory(GsonConverterFactory.create())
.build();
}


+ 3
- 2
examples/example_bestshot/example/app/src/main/java/ru/visionlab/femdemo/api/JsonPlaceHolderApi.java View File

@ -3,6 +3,7 @@ package ru.visionlab.femdemo.api;
import java.util.Map;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
@ -12,8 +13,8 @@ import ru.visionlab.femdemo.models.Users;
public interface JsonPlaceHolderApi {
@FormUrlEncoded
@POST("posts")
Call<RegistrationNew> createpost(RegistrationNew registrationNew);
@POST("services/app/Employee/RegisterEmployee")
Call<RegistrationNew> createpost(@Body RegistrationNew registrationNew);
//Call<RegistrationNew> createpost(@FieldMap Map<String,String> fields);
@FormUrlEncoded


+ 1
- 1
examples/example_bestshot/example/app/src/main/java/ru/visionlab/femdemo/register/RegisterActivityNew.java View File

@ -59,7 +59,7 @@ public class RegisterActivityNew extends AppCompatActivity {
if(isAllFieldsChecked) {
/*Intent intent = new Intent(RegisterActivityNew.this, SavePhotoActivity.class);
startActivity(intent);*/
//saveInfo();
saveInfo();
}
}
});


Loading…
Cancel
Save