Module: AdManagerApi::ApiConfig
- Extended by:
- AdsCommon::ApiConfig
- Defined in:
- lib/ad_manager_api/api_config.rb,
lib/ad_manager_api/version.rb
Overview
Contains helper methods for loading and managing the available services.
Constant Summary collapse
- CLIENT_LIB_VERSION =
'1.7.0'- DEFAULT_VERSION =
Set defaults
:v201905- LATEST_VERSION =
:v201905- API_NAME =
Set other constants
'AdManagerApi'- DEFAULT_CONFIG_FILENAME =
'ad_manager_api.yml'- @@service_config =
Configure the services available to each version
{ :v201808 => [:ActivityGroupService, :ActivityService, :AdExclusionRuleService, :AdRuleService, :AudienceSegmentService, :BaseRateService, :CompanyService, :CdnConfigurationService, :ContactService, :ContentBundleService, :ContentMetadataKeyHierarchyService, :ContentService, :CreativeService, :CreativeSetService, :CreativeTemplateService, :CreativeWrapperService, :CustomFieldService, :CustomTargetingService, :DaiAuthenticationKeyService, :ExchangeRateService, :ForecastService, :InventoryService, :LabelService, :LineItemCreativeAssociationService, :LineItemService, :LineItemTemplateService, :LiveStreamEventService, :MobileApplicationService, :NativeStyleService, :NetworkService, :OrderService, :PackageService, :ProductPackageService, :ProductPackageItemService, :PlacementService, :PremiumRateService, :ProductService, :ProductTemplateService, :ProposalLineItemService, :ProposalService, :PublisherQueryLanguageService, :RateCardService, :ReconciliationOrderReportService, :ReconciliationLineItemReportService, :ReconciliationReportRowService, :ReconciliationReportService, :ReportService, :SuggestedAdUnitService, :TeamService, :UserService, :UserTeamAssociationService, :WorkflowRequestService], :v201811 => [:ActivityGroupService, :ActivityService, :AdExclusionRuleService, :AdRuleService, :AudienceSegmentService, :BaseRateService, :CompanyService, :CdnConfigurationService, :ContactService, :ContentBundleService, :ContentService, :CreativeService, :CreativeSetService, :CreativeTemplateService, :CreativeWrapperService, :CustomFieldService, :CustomTargetingService, :DaiAuthenticationKeyService, :ExchangeRateService, :ForecastService, :InventoryService, :LabelService, :LineItemCreativeAssociationService, :LineItemService, :LineItemTemplateService, :LiveStreamEventService, :MobileApplicationService, :NativeStyleService, :NetworkService, :OrderService, :PackageService, :ProductPackageService, :ProductPackageItemService, :PlacementService, :PremiumRateService, :ProductService, :ProductTemplateService, :ProposalLineItemService, :ProposalService, :PublisherQueryLanguageService, :RateCardService, :ReconciliationOrderReportService, :ReconciliationLineItemReportService, :ReconciliationReportRowService, :ReconciliationReportService, :ReportService, :SuggestedAdUnitService, :TeamService, :UserService, :UserTeamAssociationService, :WorkflowRequestService], :v201902 => [:ActivityGroupService, :ActivityService, :AdExclusionRuleService, :AdjustmentService, :AdRuleService, :AudienceSegmentService, :BaseRateService, :CompanyService, :CdnConfigurationService, :CmsMetadataService, :ContactService, :ContentBundleService, :ContentService, :CreativeService, :CreativeSetService, :CreativeTemplateService, :CreativeWrapperService, :CustomFieldService, :CustomTargetingService, :DaiAuthenticationKeyService, :ExchangeRateService, :ForecastService, :InventoryService, :LabelService, :LineItemCreativeAssociationService, :LineItemService, :LineItemTemplateService, :LiveStreamEventService, :MobileApplicationService, :NativeStyleService, :NetworkService, :OrderService, :PackageService, :ProductPackageService, :ProductPackageItemService, :PlacementService, :PremiumRateService, :ProductService, :ProductTemplateService, :ProposalLineItemService, :ProposalService, :PublisherQueryLanguageService, :RateCardService, :ReconciliationOrderReportService, :ReconciliationLineItemReportService, :ReconciliationReportRowService, :ReconciliationReportService, :ReportService, :SuggestedAdUnitService, :TeamService, :UserService, :UserTeamAssociationService, :WorkflowRequestService], :v201905 => [:ActivityGroupService, :ActivityService, :AdExclusionRuleService, :AdjustmentService, :AdRuleService, :AudienceSegmentService, :BaseRateService, :CompanyService, :CdnConfigurationService, :CmsMetadataService, :ContactService, :ContentBundleService, :ContentService, :CreativeService, :CreativeSetService, :CreativeTemplateService, :CreativeWrapperService, :CustomFieldService, :CustomTargetingService, :DaiAuthenticationKeyService, :ExchangeRateService, :ForecastService, :InventoryService, :LabelService, :LineItemCreativeAssociationService, :LineItemService, :LineItemTemplateService, :LiveStreamEventService, :MobileApplicationService, :NativeStyleService, :NetworkService, :OrderService, :PackageService, :ProductPackageService, :ProductPackageItemService, :PlacementService, :PremiumRateService, :ProductService, :ProductTemplateService, :ProposalLineItemService, :ProposalService, :PublisherQueryLanguageService, :RateCardService, :ReconciliationOrderReportService, :ReconciliationLineItemReportService, :ReconciliationReportRowService, :ReconciliationReportService, :ReportService, :SuggestedAdUnitService, :TargetingPresetService, :TeamService, :UserService, :UserTeamAssociationService, :WorkflowRequestService] }
- @@config =
Configure the base URL for each version and scope.
{ :oauth_scope => 'https://www.googleapis.com/auth/dfp', :header_ns => 'https://www.google.com/apis/ads/publisher/', :v201808 => 'https://ads.google.com/apis/ads/publisher/', :v201811 => 'https://ads.google.com/apis/ads/publisher/', :v201902 => 'https://ads.google.com/apis/ads/publisher/', :v201905 => 'https://ads.google.com/apis/ads/publisher/' }
Class Method Summary collapse
- .api_name ⇒ Object
- .config(key) ⇒ Object
- .default_config_filename ⇒ Object
-
.default_version ⇒ Object
Getters for constants and module variables.
- .latest_version ⇒ Object
- .service_config ⇒ Object
- .subdir_config ⇒ Object
Class Method Details
.api_name ⇒ Object
163 164 165 |
# File 'lib/ad_manager_api/api_config.rb', line 163 def self.api_name API_NAME end |
.config(key) ⇒ Object
171 172 173 |
# File 'lib/ad_manager_api/api_config.rb', line 171 def self.config(key) @@config[key] end |
.default_config_filename ⇒ Object
179 180 181 |
# File 'lib/ad_manager_api/api_config.rb', line 179 def self.default_config_filename DEFAULT_CONFIG_FILENAME end |
.default_version ⇒ Object
Getters for constants and module variables.
155 156 157 |
# File 'lib/ad_manager_api/api_config.rb', line 155 def self.default_version DEFAULT_VERSION end |
.latest_version ⇒ Object
159 160 161 |
# File 'lib/ad_manager_api/api_config.rb', line 159 def self.latest_version LATEST_VERSION end |
.service_config ⇒ Object
167 168 169 |
# File 'lib/ad_manager_api/api_config.rb', line 167 def self.service_config @@service_config end |
.subdir_config ⇒ Object
175 176 177 |
# File 'lib/ad_manager_api/api_config.rb', line 175 def self.subdir_config nil end |