class

Google::Apis::Core::BaseService

Inherits Reference < Object

Base class for all Google API services. Handles HTTP communication, authentication, retries, and file upload/download.

Constructors

new(root_url : String, base_path : String)
Source

Instance methods

access_token

OAuth2 access token for authenticated requests.

Source
access_token=(access_token : String | Nil)

OAuth2 access token for authenticated requests.

Source
base_path

The API base path (e.g. "youtube/v3/")

Source
base_path=(base_path : String)

The API base path (e.g. "youtube/v3/")

Source
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.

Source
key

API key for unauthenticated requests. Read from ENV["API_KEY"] by default.

Source
key=(key : String | Nil)

API key for unauthenticated requests. Read from ENV["API_KEY"] by default.

Source
max_retries

Maximum number of retries on 429/5xx errors (default: 3).

Source
max_retries=(max_retries : Int32)

Maximum number of retries on 429/5xx errors (default: 3).

Source
root_url

The API host (e.g. "www.googleapis.com")

Source
root_url=(root_url : String)

The API host (e.g. "www.googleapis.com")

Source