Code: Select all
34
35 OAuthRequest lobj_Request1 = new OAuthRequest(Verb.GET, "http://api.telldus.com/xml/sensors/list");
36 lobj_OAuthService.signRequest(lobj_AccessToken, lobj_Request1);
37 Response lobj_Response1 = lobj_Request1.send();
38
39
40 OAuthRequest lobj_Request2 = new OAuthRequest(Verb.GET, "http://api.telldus.com/explore/sensor/info");
41 lobj_OAuthService.signRequest(lobj_AccessToken, lobj_Request2);
42 Response lobj_Response2 = lobj_Request2.send();
43
44
45 System.out.println("Public Key: " + publicKey); //This line is only for testing purpose
46 System.out.println("Private Key: " + privateKey); //This line is only for testing purpose
47 System.out.println("Public Token: " + publicToken); //This line is only for testing purpose
48 System.out.println("Secret Token: " + secretToken); //This line is only for testing purpose
49 System.out.println("Lista över sensorer: " + lobj_Response1.getBody());
50 System.out.println("Sensorn värde: " + lobj_Response2.getBody());
51
52 }
53 }