Java 类com.google.api.client.http.json.JsonHttpRequestInitializer 实例源码

项目:io-wraps-usatoday-java    文件:Censusapi.java   
/**
 * Construct a Censusapi instance to connect to the Censusapi service.
 *
 * @param transport The transport to use for requests
 * @param jsonHttpRequestInitializer The initializer to use when creating an JSON HTTP request
 * @param httpRequestInitializer The initializer to use when creating an {@link HttpRequest}
 * @param jsonFactory A factory for creating JSON parsers and serializers
 * @param baseUrl The base url of the service on the server
 * @param applicationName The application name to be sent in the User-Agent header of requests
 */
Censusapi(
    HttpTransport transport,
    JsonHttpRequestInitializer jsonHttpRequestInitializer,
    HttpRequestInitializer httpRequestInitializer,
    JsonFactory jsonFactory,
    String baseUrl,
    String applicationName) {
    super(transport,
        jsonHttpRequestInitializer,
        httpRequestInitializer,
        jsonFactory,
        baseUrl,
        applicationName);
}
项目:io-wraps-usatoday-java    文件:Articlesapi.java   
/**
 * Construct a Articlesapi instance to connect to the Articlesapi service.
 *
 * @param transport The transport to use for requests
 * @param jsonHttpRequestInitializer The initializer to use when creating an JSON HTTP request
 * @param httpRequestInitializer The initializer to use when creating an {@link HttpRequest}
 * @param jsonFactory A factory for creating JSON parsers and serializers
 * @param baseUrl The base url of the service on the server
 * @param applicationName The application name to be sent in the User-Agent header of requests
 */
Articlesapi(
    HttpTransport transport,
    JsonHttpRequestInitializer jsonHttpRequestInitializer,
    HttpRequestInitializer httpRequestInitializer,
    JsonFactory jsonFactory,
    String baseUrl,
    String applicationName) {
    super(transport,
        jsonHttpRequestInitializer,
        httpRequestInitializer,
        jsonFactory,
        baseUrl,
        applicationName);
}
项目:io-wraps-usatoday-java    文件:Bestsellingbooksapi.java   
/**
 * Construct a Bestsellingbooksapi instance to connect to the Bestsellingbooksapi service.
 *
 * @param transport The transport to use for requests
 * @param jsonHttpRequestInitializer The initializer to use when creating an JSON HTTP request
 * @param httpRequestInitializer The initializer to use when creating an {@link HttpRequest}
 * @param jsonFactory A factory for creating JSON parsers and serializers
 * @param baseUrl The base url of the service on the server
 * @param applicationName The application name to be sent in the User-Agent header of requests
 */
Bestsellingbooksapi(
    HttpTransport transport,
    JsonHttpRequestInitializer jsonHttpRequestInitializer,
    HttpRequestInitializer httpRequestInitializer,
    JsonFactory jsonFactory,
    String baseUrl,
    String applicationName) {
    super(transport,
        jsonHttpRequestInitializer,
        httpRequestInitializer,
        jsonFactory,
        baseUrl,
        applicationName);
}
项目:google-iosched    文件:SocialStreamFragment.java   
@Override
public List<Activity> loadInBackground() {
    mIsLoading = true;

    // Set up the HTTP transport and JSON factory
    HttpTransport httpTransport = new NetHttpTransport();
    JsonFactory jsonFactory = new JacksonFactory();

    JsonHttpRequestInitializer initializer = new GoogleKeyInitializer(
            Config.API_KEY);

    // Set up the main Google+ class
    Plus plus = Plus.builder(httpTransport, jsonFactory)
            .setApplicationName(Config.APP_NAME)
            .setJsonHttpRequestInitializer(initializer)
            .build();

    ActivityFeed activities = null;
    try {
        activities = plus.activities().search(mSearchString)
                .setPageToken(mNextPageToken)
                .setMaxResults(MAX_RESULTS_PER_REQUEST)
                .execute();

        mHasError = false;
        mNextPageToken = activities.getNextPageToken();

    } catch (IOException e) {
        e.printStackTrace();
        mHasError = true;
        mNextPageToken = null;
    }

    return (activities != null) ? activities.getItems() : null;
}
项目:io-wraps-usatoday-java    文件:Censusapi.java   
@Override
public Builder setJsonHttpRequestInitializer(
    JsonHttpRequestInitializer jsonHttpRequestInitializer) {
  super.setJsonHttpRequestInitializer(jsonHttpRequestInitializer);
  return this;
}
项目:io-wraps-usatoday-java    文件:Articlesapi.java   
@Override
public Builder setJsonHttpRequestInitializer(
    JsonHttpRequestInitializer jsonHttpRequestInitializer) {
  super.setJsonHttpRequestInitializer(jsonHttpRequestInitializer);
  return this;
}
项目:io-wraps-usatoday-java    文件:Bestsellingbooksapi.java   
@Override
public Builder setJsonHttpRequestInitializer(
    JsonHttpRequestInitializer jsonHttpRequestInitializer) {
  super.setJsonHttpRequestInitializer(jsonHttpRequestInitializer);
  return this;
}