class
Google::Apis::Core::BaseService
- Google::Apis::Core::BaseService
- Reference
- Object
Overview
Base class for all Google API services. Handles HTTP communication, authentication, retries, and file upload/download.
Direct Known Subclasses
Defined in:
google/apis/core/base_service.crConstructors
Instance Method Summary
-
#access_token : String | Nil
OAuth2 access token for authenticated requests.
-
#access_token=(access_token : String | Nil)
OAuth2 access token for authenticated requests.
-
#base_path : String
The API base path (e.g.
-
#base_path=(base_path : String)
The API base path (e.g.
-
#execute(method : String, path : String, query : Hash(String, String | Nil) = {} of String => String | ::Nil, body : String | Nil = nil, headers : HTTP::Headers | Nil = nil) : HTTP::Client::Response
Execute an HTTP request with automatic retry on transient errors.
-
#key : String | Nil
API key for unauthenticated requests.
-
#key=(key : String | Nil)
API key for unauthenticated requests.
-
#max_retries : Int32
Maximum number of retries on 429/5xx errors (default: 3).
-
#max_retries=(max_retries : Int32)
Maximum number of retries on 429/5xx errors (default: 3).
-
#root_url : String
The API host (e.g.
-
#root_url=(root_url : String)
The API host (e.g.
Constructor Detail
Instance Method Detail
def execute(method : String, path : String, query : Hash(String, String | Nil) = {} of String => String | ::Nil, body : String | Nil = nil, headers : HTTP::Headers | Nil = nil) : HTTP::Client::Response
#
Execute an HTTP request with automatic retry on transient errors.
def key=(key : String | Nil)
#
API key for unauthenticated requests. Read from ENV["API_KEY"] by default.