Skip to content

Commit

Permalink
feat(generator): Support for universe_domain in generated clients
Browse files Browse the repository at this point in the history
  • Loading branch information
dazuma committed Jan 17, 2024
1 parent ab48872 commit 79e6620
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ Gem::Specification.new do |gem|
gem.require_paths = ["lib"]

gem.required_ruby_version = '>= 2.5'
gem.add_runtime_dependency "google-apis-core", ">= 0.11.0", "< 2.a"
gem.add_runtime_dependency "google-apis-core", ">= 0.12.0", "< 2.a"
end
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,16 @@ module Google
# @see <%= api.documentation_link %>
<% end -%>
class <%= api.service_name %> < Google::Apis::Core::BaseService
DEFAULT_ENDPOINT_TEMPLATE = "<%= api.root_url.sub '.googleapis.com', '.$UNIVERSE_DOMAIN$' %>"

<% for param in api.parameters.values.reject {|p| p.name == 'fields'} -%>
# @return [<%= param.generated_type %>]
# <%= block_comment(param.description, 8, 2) %>
attr_accessor :<%= param.generated_name %>

<% end -%>
def initialize
super('<%= api.root_url %>', '<%= api.service_path %>',
super(DEFAULT_ENDPOINT_TEMPLATE, '<%= api.service_path %>',
client_name: '<%= api.gem_name %>',
client_version: <%= api.qualified_name %>::GEM_VERSION)
@batch_path = '<%= api.batch_path %>'
Expand Down

0 comments on commit 79e6620

Please sign in to comment.