Master mergerd
This commit is contained in:
commit
1506270dec
0
buisnesslogic/src/main/java/com/plannaplan/entities/Exchange.java
Normal file → Executable file
0
buisnesslogic/src/main/java/com/plannaplan/entities/Exchange.java
Normal file → Executable file
0
buisnesslogic/src/main/java/com/plannaplan/models/MatchData.java
Normal file → Executable file
0
buisnesslogic/src/main/java/com/plannaplan/models/MatchData.java
Normal file → Executable file
0
buisnesslogic/src/main/java/com/plannaplan/repositories/ExchangeRepository.java
Normal file → Executable file
0
buisnesslogic/src/main/java/com/plannaplan/repositories/ExchangeRepository.java
Normal file → Executable file
0
buisnesslogic/src/main/java/com/plannaplan/services/ExchangeService.java
Normal file → Executable file
0
buisnesslogic/src/main/java/com/plannaplan/services/ExchangeService.java
Normal file → Executable file
@ -55,15 +55,16 @@ public class UsosApiService {
|
|||||||
|
|
||||||
final OAuthRequest request = new OAuthRequest(Verb.GET, apiUrl + "/services/users/user?user_id=" + usosId);
|
final OAuthRequest request = new OAuthRequest(Verb.GET, apiUrl + "/services/users/user?user_id=" + usosId);
|
||||||
service.signRequest(new OAuth1AccessToken("", ""), request);
|
service.signRequest(new OAuth1AccessToken("", ""), request);
|
||||||
|
|
||||||
try (Response response = service.execute(request)) {
|
try (Response response = service.execute(request)) {
|
||||||
final String json = response.getBody();
|
final String json = response.getBody();
|
||||||
|
if (!json.equals("null")){
|
||||||
final ObjectMapper mapper = new ObjectMapper();
|
final ObjectMapper mapper = new ObjectMapper();
|
||||||
Map<String, String> map = mapper.readValue(json, new TypeReference<Map<String, String>>() {
|
Map<String, String> map = mapper.readValue(json, new TypeReference<Map<String, String>>() {
|
||||||
});
|
});
|
||||||
apiResponse.setName(map.get(NAME_FIELD));
|
apiResponse.setName(map.get(NAME_FIELD));
|
||||||
apiResponse.setSurname(map.get(SURNAME_FIELD));
|
apiResponse.setSurname(map.get(SURNAME_FIELD));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (IOException | InterruptedException | ExecutionException e) {
|
} catch (IOException | InterruptedException | ExecutionException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
0
buisnesslogic/src/test/java/com/plannaplan/repositories/ExchangeRepositoryTest.java
Normal file → Executable file
0
buisnesslogic/src/test/java/com/plannaplan/repositories/ExchangeRepositoryTest.java
Normal file → Executable file
0
buisnesslogic/src/test/java/com/plannaplan/services/ExchangeServiceTest.java
Normal file → Executable file
0
buisnesslogic/src/test/java/com/plannaplan/services/ExchangeServiceTest.java
Normal file → Executable file
0
restservice/src/main/java/com/plannaplan/controllers/ExchangeController.java
Normal file → Executable file
0
restservice/src/main/java/com/plannaplan/controllers/ExchangeController.java
Normal file → Executable file
0
restservice/src/main/java/com/plannaplan/responses/mappers/ExchangeResponseMappers.java
Normal file → Executable file
0
restservice/src/main/java/com/plannaplan/responses/mappers/ExchangeResponseMappers.java
Normal file → Executable file
0
restservice/src/main/java/com/plannaplan/responses/models/ExchangeResponse.java
Normal file → Executable file
0
restservice/src/main/java/com/plannaplan/responses/models/ExchangeResponse.java
Normal file → Executable file
0
restservice/src/test/java/com/plannaplan/controllers/ExchangeControllerTest.java
Normal file → Executable file
0
restservice/src/test/java/com/plannaplan/controllers/ExchangeControllerTest.java
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user