Proba naprawienia
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
parent
11d21be627
commit
2320d66a35
@ -43,7 +43,7 @@ public class UsosApiService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* /services/users/user
|
* /services/users/user
|
||||||
*
|
*
|
||||||
* @param usosId user id in usos
|
* @param usosId user id in usos
|
||||||
* @return UserApiResponse modle contatining desired values
|
* @return UserApiResponse modle contatining desired values
|
||||||
*/
|
*/
|
||||||
@ -52,14 +52,16 @@ public class UsosApiService {
|
|||||||
try {
|
try {
|
||||||
final OAuth10aService service = new ServiceBuilder(apikey).apiSecret(apisecret)
|
final OAuth10aService service = new ServiceBuilder(apikey).apiSecret(apisecret)
|
||||||
.build(UsosOauth1Service.instance());
|
.build(UsosOauth1Service.instance());
|
||||||
|
|
||||||
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);
|
||||||
System.out.println("PRZED TRY");
|
System.out.println("PRZED TRY");
|
||||||
try (Response response = service.execute(request)) {
|
try (Response response = service.execute(request)) {
|
||||||
System.out.println("TRY");
|
System.out.println("TRY");
|
||||||
final String json = response.getBody();
|
final String json = response.getBody();
|
||||||
if (json != null){
|
System.out.println(json == null);
|
||||||
|
System.out.println(json == "null");
|
||||||
|
if (json != "null" && json != null){
|
||||||
System.out.println(json);
|
System.out.println(json);
|
||||||
System.out.println("Przed Object");
|
System.out.println("Przed Object");
|
||||||
final ObjectMapper mapper = new ObjectMapper();
|
final ObjectMapper mapper = new ObjectMapper();
|
||||||
|
Loading…
Reference in New Issue
Block a user