Examples of signRequest()


Examples of org.scribe.oauth.OAuthService.signRequest()

        System.out.println("********Get my connections - going into a resource********");
        //This basic call gets all your connections each one will be in a person tag with some profile information
        //https://developer.linkedin.com/documents/connections-api
        url = "http://api.linkedin.com/v1/people/~/connections";
        request = new OAuthRequest(Verb.GET, url);
        service.signRequest(accessToken, request);
        response = request.send();
        System.out.println(response.getBody());
        System.out.println();System.out.println();


View Full Code Here

Examples of org.scribe.oauth.OAuthService.signRequest()

        //https://developer.linkedin.com/documents/connections-api
        //more basic about query strings in a URL here http://en.wikipedia.org/wiki/Query_string
        url = "http://api.linkedin.com/v1/people/~/connections";
        request = new OAuthRequest(Verb.GET, url);
        request.addQuerystringParameter("count", "10");
        service.signRequest(accessToken, request);
        response = request.send();
        System.out.println(response.getBody());
        System.out.println();System.out.println();

View Full Code Here

Examples of org.scribe.oauth.OAuthService.signRequest()

        url = "http://api.linkedin.com/v1/people/~/network/updates";
        request = new OAuthRequest(Verb.GET, url);
        request.addQuerystringParameter("type","SHAR");
        request.addQuerystringParameter("type","CONN");
        service.signRequest(accessToken, request);
        response = request.send();
        System.out.println(response.getBody());
        System.out.println();System.out.println();

View Full Code Here

Examples of org.scribe.oauth.OAuthService.signRequest()

        request = new OAuthRequest(Verb.GET, url);
        request.addQuerystringParameter("title", "Développeur");
        request.addQuerystringParameter("facet", "industry,4");
        request.addQuerystringParameter("facets", "location,industry");
        System.out.println(request.getUrl());
        service.signRequest(accessToken, request);
        response = request.send();
        System.out.println(response.getBody());
        System.out.println();System.out.println();

        /////////////////field selectors
View Full Code Here

Examples of org.scribe.oauth.OAuthService.signRequest()

        System.out.println("********A basic user profile call with field selectors********");
        //The ~ means yourself - so this should return the basic default information for your profile in XML format
        //https://developer.linkedin.com/documents/field-selectors
        url = "http://api.linkedin.com/v1/people/~:(first-name,last-name,positions)";
        request = new OAuthRequest(Verb.GET, url);
        service.signRequest(accessToken, request);
        response = request.send();
        System.out.println(response.getHeaders().toString());
        System.out.println(response.getBody());
        System.out.println();System.out.println();

View Full Code Here

Examples of org.scribe.oauth.OAuthService.signRequest()

        System.out.println("********A basic user profile call with field selectors going into a subresource********");
        //The ~ means yourself - so this should return the basic default information for your profile in XML format
        //https://developer.linkedin.com/documents/field-selectors
        url = "http://api.linkedin.com/v1/people/~:(first-name,last-name,positions:(company:(name)))";
        request = new OAuthRequest(Verb.GET, url);
        service.signRequest(accessToken, request);
        response = request.send();
        System.out.println(response.getHeaders().toString());
        System.out.println(response.getBody());
        System.out.println();System.out.println();

View Full Code Here

Examples of org.scribe.oauth.OAuthService.signRequest()

        System.out.println("********A basic user profile call into a subresource return data in JSON********");
        //The ~ means yourself - so this should return the basic default information for your profile
        //https://developer.linkedin.com/documents/field-selectors
        url = "https://api.linkedin.com/v1/people/~/connections:(first-name,last-name,headline)?format=json";
        request = new OAuthRequest(Verb.GET, url);
        service.signRequest(accessToken, request);
        response = request.send();
        System.out.println(response.getHeaders().toString());
        System.out.println(response.getBody());
        System.out.println();System.out.println();

View Full Code Here

Examples of org.scribe.oauth.OAuthService.signRequest()

        System.out.println("********A more complicated example using postings into groups********");
        //https://developer.linkedin.com/documents/field-selectors
        //https://developer.linkedin.com/documents/groups-api
        url = "http://api.linkedin.com/v1/groups/3297124/posts:(id,category,creator:(id,first-name,last-name),title,summary,creation-timestamp,site-group-post-url,comments,likes)";
        request = new OAuthRequest(Verb.GET, url);
        service.signRequest(accessToken, request);
        response = request.send();
        System.out.println(response.getHeaders().toString());
        System.out.println(response.getBody());
        System.out.println();System.out.println();

View Full Code Here

Examples of org.scribe.oauth.OAuthService.signRequest()

        System.out.println("********A basic user profile call and response dissected********");
        //This sample is mostly to help you debug and understand some of the scaffolding around the request-response cycle
        //https://developer.linkedin.com/documents/debugging-api-calls
        url = "https://api.linkedin.com/v1/people/~";
        request = new OAuthRequest(Verb.GET, url);
        service.signRequest(accessToken, request);
        response = request.send();
        //get all the headers
        System.out.println("Request headers: " + request.getHeaders().toString());
        System.out.println("Response headers: " + response.getHeaders().toString());
        //url requested
View Full Code Here

Examples of org.scribe.oauth.OAuthService.signRequest()

        // Now demonstrate how to make a logging function which provides us the info we need to
        // properly help debug issues. Please use the logged block from here when requesting
        // help in the forums.
        url = "https://api.linkedin.com/v1/people/FOOBARBAZ";
        request = new OAuthRequest(Verb.GET, url);
        service.signRequest(accessToken, request);
        response = request.send();

        responseNumber = response.getCode();

        if(responseNumber < 200 || responseNumber >= 300){
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.