Class: Google::Apis::DiscoveryV1::DiscoveryService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::DiscoveryV1::DiscoveryService
- Defined in:
- generated/google/apis/discovery_v1/service.rb
Overview
APIs Discovery Service
Provides information about other Google APIs, such as what APIs are available, the resource, and method details for each API.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
-
#user_ip ⇒ String
IP address of the site where the request originates.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#get_rest_api(api, version, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DiscoveryV1::RestDescription
Retrieve the description of a particular version of an api.
-
#initialize ⇒ DiscoveryService
constructor
A new instance of DiscoveryService.
-
#list_apis(name: nil, preferred: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DiscoveryV1::DirectoryList
Retrieve the list of APIs supported at this endpoint.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ DiscoveryService
Returns a new instance of DiscoveryService
52 53 54 55 |
# File 'generated/google/apis/discovery_v1/service.rb', line 52 def initialize super('https://www.googleapis.com/', 'discovery/v1/') @batch_path = 'batch/discovery/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.
39 40 41 |
# File 'generated/google/apis/discovery_v1/service.rb', line 39 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
45 46 47 |
# File 'generated/google/apis/discovery_v1/service.rb', line 45 def quota_user @quota_user end |
#user_ip ⇒ String
Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.
50 51 52 |
# File 'generated/google/apis/discovery_v1/service.rb', line 50 def user_ip @user_ip end |
Instance Method Details
#get_rest_api(api, version, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DiscoveryV1::RestDescription
Retrieve the description of a particular version of an api.
83 84 85 86 87 88 89 90 91 92 93 |
# File 'generated/google/apis/discovery_v1/service.rb', line 83 def get_rest_api(api, version, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'apis/{api}/{version}/rest', ) command.response_representation = Google::Apis::DiscoveryV1::RestDescription::Representation command.response_class = Google::Apis::DiscoveryV1::RestDescription command.params['api'] = api unless api.nil? command.params['version'] = version unless version.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 |
#list_apis(name: nil, preferred: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DiscoveryV1::DirectoryList
Retrieve the list of APIs supported at this endpoint.
121 122 123 124 125 126 127 128 129 130 131 |
# File 'generated/google/apis/discovery_v1/service.rb', line 121 def list_apis(name: nil, preferred: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'apis', ) command.response_representation = Google::Apis::DiscoveryV1::DirectoryList::Representation command.response_class = Google::Apis::DiscoveryV1::DirectoryList command.query['name'] = name unless name.nil? command.query['preferred'] = preferred unless preferred.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 |