PageRenderTime 38ms CodeModel.GetById 12ms app.highlight 23ms RepoModel.GetById 1ms app.codeStats 0ms

/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//
17//  GDataServiceGoogleWebmasterTools.m
18//
19
20#if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_WEBMASTERTOOLS_SERVICE
21
22#define GDATASERVICEGOOGLEWEBMASTERTOOLS_DEFINE_GLOBALS 1
23
24#import "GDataServiceGoogleWebmasterTools.h"
25#import "GDataWebmasterToolsConstants.h"
26
27@implementation GDataServiceGoogleWebmasterTools
28
29+ (NSURL *)webmasterToolsFeedURLForSiteID:(NSString *)siteID
30                                 feedType:(NSString *)feedType {
31  
32  NSString *encodedSiteID;
33  encodedSiteID = [GDataUtilities stringByURLEncodingForURI:siteID];
34  
35  NSString *const templateStr = @"%@%@/%@";
36  
37  NSString *rootURLStr = [self serviceRootURLString];
38  
39  NSString *urlString = [NSString stringWithFormat:templateStr, 
40                         rootURLStr, encodedSiteID, feedType];
41  
42  return [NSURL URLWithString:urlString];
43}
44
45#pragma mark -
46
47+ (NSString *)serviceID {
48  return @"sitemaps";
49}
50
51+ (NSString *)serviceRootURLString {
52  return @"https://www.google.com/webmasters/tools/feeds/"; 
53}
54
55+ (NSString *)defaultServiceVersion {
56  return kGDataWebmasterToolsDefaultServiceVersion;
57}
58
59+ (NSDictionary *)standardServiceNamespaces {
60  return [GDataWebmasterToolsConstants webmasterToolsNamespaces];
61}
62
63@end
64
65#endif // !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_WEBMASTERTOOLS_SERVICE