Package org.scribe.builder

Examples of org.scribe.builder.ServiceBuilder


        if (Constants.EVERNOTE_SERVICE == EvernoteService.PRODUCTION) {
          providerClass = org.scribe.builder.api.EvernoteApi.class;
        }


        OAuthService service = new ServiceBuilder()
            .provider(providerClass)
            .apiKey(Constants.EVERNOTE_CONSUMER_KEY)
            .apiSecret(Constants.EVERNOTE_CONSUMER_SECRET)
            .callback(cbUrl)
            .build();
View Full Code Here


        if (Constants.EVERNOTE_SERVICE == EvernoteService.PRODUCTION) {
          providerClass = org.scribe.builder.api.EvernoteApi.class;
        }


        OAuthService service = new ServiceBuilder()
            .provider(providerClass)
            .apiKey(Constants.EVERNOTE_CONSUMER_KEY)
            .apiSecret(Constants.EVERNOTE_CONSUMER_SECRET)
            .callback(cbUrl)
            .build();
View Full Code Here

        System.out.println("Paste the consumerSecret here");
        System.out.print(">>");
        String apiSecret = in.nextLine();

        OAuthService service = new ServiceBuilder()
            .provider(YammerApi.class)
            .apiKey(apiKey)
            .apiSecret(apiSecret)
            .build();
View Full Code Here

                String consumerKey = prop.getProperty("oauth.consumer.key");
                String consumerSecret = prop.getProperty("oauth.consumer.secret");
                in.close();

    System.setProperty("debug", "true");
    OAuthService service = new ServiceBuilder()
          .provider(KivaApi.class)
          .apiKey(consumerKey)
          .apiSecret(consumerSecret)
                .callback("oob")
          .debug()
View Full Code Here

    public String getName() {
        return name;
    }

    public ServiceBuilder getServiceBuilder() {
        return new ServiceBuilder()
            .provider(getProviderClass())
            .apiKey(apiKey)
            .apiSecret(apiSecret);
    }
View Full Code Here

    EntityManager em;

    @RequestMapping(value = "/token")
    public String getEvernoteToken(HttpServletRequest request) throws IOException, ServletException {
        final Boolean sandbox = Boolean.valueOf(env.get(EVERNOTE_SANDBOX_KEY));
        OAuthService service = new ServiceBuilder()
                .provider(sandbox?EvernoteApi.Sandbox.class:EvernoteApi.class)
                .apiKey(getConsumerKey())
                .apiSecret(getConsumerSecret())
                .callback(env.get("homeBaseUrl") + "evernote/upgradeToken")
                .build();
View Full Code Here

        return "redirect:" + authorizationUrl;
    }

    public OAuthService getOAuthService(HttpServletRequest request) {
        return new ServiceBuilder()
                .provider(RunKeeperApi.class)
                .apiKey(getConsumerKey())
                .apiSecret(getConsumerSecret())
                .callback(ControllerSupport.getLocationBase(request, env) + "runkeeper/upgradeToken")
                .build();
View Full Code Here

                .callback(ControllerSupport.getLocationBase(request, env) + "runkeeper/upgradeToken")
                .build();
    }

    public OAuthService getOAuthService() {
        return new ServiceBuilder()
                    .provider(RunKeeperApi.class)
                    .apiKey(getConsumerKey())
                    .apiSecret(getConsumerSecret())
                    .callback(env.get("homeBaseUrl") + "runkeeper/upgradeToken")
                    .build();
View Full Code Here

                                                    updateInfo.apiKey.getId());
        if (facets.size()==0) return 0;
        return facets.get(0).start + 1000;
    }
    public OAuthService getOAuthService(final ApiKey apiKey) {
        return new ServiceBuilder()
                .provider(WithingsApi.class)
                .apiKey(guestService.getApiKeyAttribute(apiKey, "withingsConsumerKey"))
                .apiSecret(guestService.getApiKeyAttribute(apiKey, "withingsConsumerSecret"))
                .signatureType(SignatureType.QueryString)
                .callback(env.get("homeBaseUrl") + "withings/upgradeToken")
View Full Code Here

  }

  public void connect(String clientId, String clientSecret, String callback) {
    this.apiKey = clientId;
    this.apiSecret = clientSecret;
    this.service = new ServiceBuilder().provider(this.genesysApi).apiKey(clientId).apiSecret(clientSecret).callback(callback).scope(SCOPE).build();
  }
View Full Code Here

TOP

Related Classes of org.scribe.builder.ServiceBuilder

Copyright © 2018 www.massapicom. 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.