Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010 Google Inc.
   *
   * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
   * in compliance with the License. You may obtain a copy of the License at
   *
   * http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software distributed under the License
  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
 /*
  * This code was generated by https://code.google.com/p/google-apis-client-generator/
  * (build: 2014-07-09 17:08:39 UTC)
  * on 2014-07-14 at 23:00:17 UTC 
  * Modify at your own risk.
  */
 
 package com.google.api.services.webfonts;

Service definition for Webfonts (v1).

The Google Fonts Developer API.

For more information about this service, see the API Documentation

This service uses WebfontsRequestInitializer to initialize global parameters via its Webfonts.Builder.

Author(s):
Google, Inc.
Since:
1.3
 
 @SuppressWarnings("javadoc")
 
   // Note: Leave this static initializer at the top of the file.
   static {
     com.google.api.client.util.Preconditions.checkState(
         "You are currently running with version %s of google-api-client. " +
         "You need at least version 1.15 of google-api-client to run version " +
         "1.15.0-rc of the Google Fonts Developer API library."......);
   }

  
The default encoded root URL of the service. This is determined when the library is generated and normally should not be changed.

Since:
1.7
 
   public static final String DEFAULT_ROOT_URL = "https://www.googleapis.com/";

  
The default encoded service path of the service. This is determined when the library is generated and normally should not be changed.

Since:
1.7
 
   public static final String DEFAULT_SERVICE_PATH = "webfonts/v1/";

  
The default encoded base URL of the service. This is determined when the library is generated and normally should not be changed.
 
   public static final String DEFAULT_BASE_URL =  + ;

  
Constructor.

Use Webfonts.Builder if you need to specify any of the optional parameters.

Parameters:
transport HTTP transport, which should normally be:
jsonFactory JSON factory, which may be:
  • Jackson: com.google.api.client.json.jackson2.JacksonFactory
  • Google GSON: com.google.api.client.json.gson.GsonFactory
  • Android Honeycomb or higher: com.google.api.client.extensions.android.json.AndroidJsonFactory
httpRequestInitializer HTTP request initializer or null for none
Since:
1.7
      com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
    this(new Builder(transportjsonFactoryhttpRequestInitializer));
  }

  

Parameters:
builder builder
  Webfonts(Builder builder) {
    super(builder);
  }
  protected void initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest<?> httpClientRequestthrows java.io.IOException {
    super.initialize(httpClientRequest);
  }

  
An accessor for creating requests from the WebfontsOperations collection.

The typical use is:

   Webfonts webfonts = new Webfonts(...);
   Webfonts.WebfontsOperations.List request = webfonts.webfonts().list(parameters ...)
 

Returns:
the resource collection
    return new WebfontsOperations();
  }

  
The "webfonts" collection of methods.
  public class WebfontsOperations {

    
Retrieves the list of fonts currently served by the Google Fonts Developer API Create a request for the method "webfonts.list". This request holds the parameters needed by the the webfonts server. After setting any optional parameters, call the com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute() method to invoke the remote operation.

Returns:
the request
    public List list() throws java.io.IOException {
      List result = new List();
      initialize(result);
      return result;
    }
    public class List extends WebfontsRequest<com.google.api.services.webfonts.model.WebfontList> {
      private static final String REST_PATH = "webfonts";

      
Retrieves the list of fonts currently served by the Google Fonts Developer API Create a request for the method "webfonts.list". This request holds the parameters needed by the the webfonts server. After setting any optional parameters, call the com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute() method to invoke the remote operation.

Webfonts.initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest) must be called to initialize this instance immediately after invoking the constructor.

Since:
1.13
      protected List() {
        super(Webfonts.this"GET"nullcom.google.api.services.webfonts.model.WebfontList.class);
      }
      @Override
        return super.executeUsingHead();
      }
      @Override
        return super.buildHttpRequestUsingHead();
      }
      @Override
      public List setAlt(java.lang.String alt) {
        return (Listsuper.setAlt(alt);
      }
      @Override
      public List setFields(java.lang.String fields) {
        return (Listsuper.setFields(fields);
      }
      @Override
      public List setKey(java.lang.String key) {
        return (Listsuper.setKey(key);
      }
      @Override
      public List setOauthToken(java.lang.String oauthToken) {
        return (Listsuper.setOauthToken(oauthToken);
      }
      @Override
      public List setPrettyPrint(java.lang.Boolean prettyPrint) {
        return (Listsuper.setPrettyPrint(prettyPrint);
      }
      @Override
      public List setQuotaUser(java.lang.String quotaUser) {
        return (Listsuper.setQuotaUser(quotaUser);
      }
      @Override
      public List setUserIp(java.lang.String userIp) {
        return (Listsuper.setUserIp(userIp);
      }

      
Enables sorting of the list
      private java.lang.String sort;

      
Enables sorting of the list
      public java.lang.String getSort() {
        return ;
      }

      
Enables sorting of the list
      public List setSort(java.lang.String sort) {
        this. = sort;
        return this;
      }
      @Override
      public List set(String parameterNameObject value) {
        return (Listsuper.set(parameterNamevalue);
      }
    }
  }

  
Builder for Webfonts.

Implementation is not thread-safe.

Since:
1.3.0
  public static final class Builder extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.Builder {

    
Returns an instance of a new builder.

Parameters:
transport HTTP transport, which should normally be:
jsonFactory JSON factory, which may be:
  • Jackson: com.google.api.client.json.jackson2.JacksonFactory
  • Google GSON: com.google.api.client.json.gson.GsonFactory
  • Android Honeycomb or higher: com.google.api.client.extensions.android.json.AndroidJsonFactory
httpRequestInitializer HTTP request initializer or null for none
Since:
1.7
    public Builder(com.google.api.client.http.HttpTransport transportcom.google.api.client.json.JsonFactory jsonFactory,
        com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
      super(
          transport,
          jsonFactory,
          ,
          ,
          httpRequestInitializer,
          false);
    }

    
Builds a new instance of Webfonts.
    @Override
    public Webfonts build() {
      return new Webfonts(this);
    }
    @Override
    public Builder setRootUrl(String rootUrl) {
      return (Buildersuper.setRootUrl(rootUrl);
    }
    @Override
    public Builder setServicePath(String servicePath) {
      return (Buildersuper.setServicePath(servicePath);
    }
    @Override
      return (Buildersuper.setHttpRequestInitializer(httpRequestInitializer);
    }
    @Override
    public Builder setApplicationName(String applicationName) {
      return (Buildersuper.setApplicationName(applicationName);
    }
    @Override
    public Builder setSuppressPatternChecks(boolean suppressPatternChecks) {
      return (Buildersuper.setSuppressPatternChecks(suppressPatternChecks);
    }
    @Override
    public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) {
      return (Buildersuper.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks);
    }
    @Override
    public Builder setSuppressAllChecks(boolean suppressAllChecks) {
      return (Buildersuper.setSuppressAllChecks(suppressAllChecks);
    }

    
Set the WebfontsRequestInitializer.

Since:
1.12
        WebfontsRequestInitializer webfontsRequestInitializer) {
      return (Buildersuper.setGoogleClientRequestInitializer(webfontsRequestInitializer);
    }
    @Override
        com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) {
      return (Buildersuper.setGoogleClientRequestInitializer(googleClientRequestInitializer);
    }
  }
New to GrepCode? Check out our FAQ X