/** * @throws MalformedURLException * @see AdsServiceDescriptor#getEndpointAddress(String) */ @Override public String getEndpointAddress(String endpointServer) throws MalformedURLException { String serviceName = getServiceName(); String endpointServerUrl = new URL(endpointServer).toString(); if (endpointServerUrl.endsWith("/")) { endpointServerUrl = endpointServerUrl.substring(0, endpointServerUrl.length() - 1); } return endpointServerUrl + "/api/adwords/" + apiConfig.getServiceUrlGroup(version, serviceName) + "/" + version + "/" + serviceName; }
@Override public String getNamespacePrefix() { return getString(NAMESPACE_PREFIX_KEY); }
AdWordsServiceDescriptor adWordsServiceDescriptor) { String requestHeaderNamespace = adWordsApiConfiguration.getNamespacePrefix() + "/" + adWordsServiceDescriptor.getPackageGroup() + "/" + adWordsServiceDescriptor.getVersion(); adWordsApiConfiguration.getNamespacePrefix() + "/cm/" + adWordsServiceDescriptor.getVersion();
@Test public void testJarApiPropertiesFileIncludedInConfig() throws Exception { AdWordsApiConfiguration config = Guice.createInjector( new AdWordsModule()).getInstance(AdWordsApiConfiguration.class); assertEquals("https://adwords.google.com/api/adwords", config.getNamespacePrefix()); } }
adWordsApiConfiguration.getNamespacePrefix() + "/" + adWordsServiceDescriptor.getPackageGroup() + "/" + adWordsServiceDescriptor.getVersion();
@Override public String getNamespacePrefix() { return getString(NAMESPACE_PREFIX_KEY); }
/** * @throws MalformedURLException * @see AdsServiceDescriptor#getEndpointAddress(String) */ @Override public String getEndpointAddress(String endpointServer) throws MalformedURLException { String serviceName = getServiceName(); String endpointServerUrl = new URL(endpointServer).toString(); if (endpointServerUrl.endsWith("/")) { endpointServerUrl = endpointServerUrl.substring(0, endpointServerUrl.length() - 1); } return endpointServerUrl + "/api/adwords/" + apiConfig.getServiceUrlGroup(version, serviceName) + "/" + version + "/" + serviceName; }
adWordsApiConfiguration.getNamespacePrefix() + "/" + adWordsServiceDescriptor.getPackageGroup() + "/" + adWordsServiceDescriptor.getVersion();