Class: Google::Apis::WebfontsV1::WebfontsService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::WebfontsV1::WebfontsService
- Defined in:
- generated/google/apis/webfonts_v1/service.rb
Overview
Google Fonts Developer API
Accesses the metadata for all families served by Google Fonts, providing a list of families currently available (including available styles and a list of supported script subsets).
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
An opaque string that represents a user for quota purposes.
-
#user_ip ⇒ String
Deprecated.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#initialize ⇒ WebfontsService
constructor
A new instance of WebfontsService.
-
#list_webfonts(sort: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WebfontsV1::WebfontList
Retrieves the list of fonts currently served by the Google Fonts Developer API.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ WebfontsService
Returns a new instance of WebfontsService
51 52 53 54 |
# File 'generated/google/apis/webfonts_v1/service.rb', line 51 def initialize super('https://www.googleapis.com/', 'webfonts/v1/') @batch_path = 'batch/webfonts/v1' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
40 41 42 |
# File 'generated/google/apis/webfonts_v1/service.rb', line 40 def key @key end |
#quota_user ⇒ String
Returns An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
45 46 47 |
# File 'generated/google/apis/webfonts_v1/service.rb', line 45 def quota_user @quota_user end |
#user_ip ⇒ String
Returns Deprecated. Please use quotaUser instead.
49 50 51 |
# File 'generated/google/apis/webfonts_v1/service.rb', line 49 def user_ip @user_ip end |
Instance Method Details
#list_webfonts(sort: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WebfontsV1::WebfontList
Retrieves the list of fonts currently served by the Google Fonts Developer API
78 79 80 81 82 83 84 85 86 87 |
# File 'generated/google/apis/webfonts_v1/service.rb', line 78 def list_webfonts(sort: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'webfonts', ) command.response_representation = Google::Apis::WebfontsV1::WebfontList::Representation command.response_class = Google::Apis::WebfontsV1::WebfontList command.query['sort'] = sort unless sort.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |