Add a section in the readme documenting how to change the root_url (#805)
This commit is contained in:
parent
cd99d79852
commit
95fecd04bb
16
README.md
16
README.md
|
@ -287,6 +287,22 @@ To set the logging level for the client:
|
|||
Google::Apis.logger.level = Logger::DEBUG
|
||||
```
|
||||
|
||||
## Customizing endpoints
|
||||
|
||||
By default, client objects will connect to the default Google endpoints for =
|
||||
their respective APIs. If you need to connect to a regional endpoint, a test
|
||||
endpoint, or other custom endpoint, modify the `root_url` attribute of the
|
||||
client object. For example:
|
||||
|
||||
```ruby
|
||||
require "google/apis/docs_v1"
|
||||
docs_service = Google::Apis::DocsV1::DocsService.new
|
||||
|
||||
docs_service.root_url = "https://my-custom-docs-endpoint.example.com/"
|
||||
|
||||
document = docs_service.get_document("my-document-id")
|
||||
```
|
||||
|
||||
## Samples
|
||||
|
||||
See the [samples](https://github.com/google/google-api-ruby-client/tree/master/samples) for examples on how to use the client library for various
|
||||
|
|
Loading…
Reference in New Issue