/core/externals/update-engine/externals/gdata-objectivec-client/Source/Clients/WebmasterTools/GDataServiceGoogleWebmasterTools.m

http://macfuse.googlecode.com/ · Objective C · 65 lines · 30 code · 18 blank · 17 comment · 1 complexity · 4eb8a350283efd32f3f9b0d60eb0b38b MD5 · raw file

  1. /* Copyright (c) 2008 Google Inc.
  2. *
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS,
  11. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and
  13. * limitations under the License.
  14. */
  15. //
  16. // GDataServiceGoogleWebmasterTools.m
  17. //
  18. #if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_WEBMASTERTOOLS_SERVICE
  19. #define GDATASERVICEGOOGLEWEBMASTERTOOLS_DEFINE_GLOBALS 1
  20. #import "GDataServiceGoogleWebmasterTools.h"
  21. #import "GDataWebmasterToolsConstants.h"
  22. @implementation GDataServiceGoogleWebmasterTools
  23. + (NSURL *)webmasterToolsFeedURLForSiteID:(NSString *)siteID
  24. feedType:(NSString *)feedType {
  25. NSString *encodedSiteID;
  26. encodedSiteID = [GDataUtilities stringByURLEncodingForURI:siteID];
  27. NSString *const templateStr = @"%@%@/%@";
  28. NSString *rootURLStr = [self serviceRootURLString];
  29. NSString *urlString = [NSString stringWithFormat:templateStr,
  30. rootURLStr, encodedSiteID, feedType];
  31. return [NSURL URLWithString:urlString];
  32. }
  33. #pragma mark -
  34. + (NSString *)serviceID {
  35. return @"sitemaps";
  36. }
  37. + (NSString *)serviceRootURLString {
  38. return @"https://www.google.com/webmasters/tools/feeds/";
  39. }
  40. + (NSString *)defaultServiceVersion {
  41. return kGDataWebmasterToolsDefaultServiceVersion;
  42. }
  43. + (NSDictionary *)standardServiceNamespaces {
  44. return [GDataWebmasterToolsConstants webmasterToolsNamespaces];
  45. }
  46. @end
  47. #endif // !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_WEBMASTERTOOLS_SERVICE