-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathWebServiceRequest.m
More file actions
41 lines (36 loc) · 1.1 KB
/
WebServiceRequest.m
File metadata and controls
41 lines (36 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// WebServiceRequest.m
//
// Created by Maxime Guilbot on 12/15/10.
// Copyright 2010 ekohe. All rights reserved.
//
#import "WebServiceRequest.h"
@implementation WebServiceRequest
+(NSString*) endPoint {
return @"http://your_own_webendpoint.com";
}
// - (void) jsonFinishedLoading:(NSDictionary*)json {
// if (delegate==nil)
// return;
//
// if (json==nil)
// return [delegate jsonDidFailWithError:nil jsonRequest:self];
//
// // Badges are handled there so they can be sent by the back-end at any point
// if (([json isKindOfClass:[NSDictionary class]]) &&
// ([json valueForKey:@"new_badges"]!=nil) &&
// ([json valueForKey:@"new_badges"]!=[NSNull null])) {
// // Example
// }
//
// if (([json isKindOfClass:[NSDictionary class]]) && ([json valueForKey:@"error"]!=nil)) {
// NSString *error = [json valueForKey:@"error"];
// if ([error isEqualToString:@"access_denied"]) {
// // Do something
// }
// [delegate jsonDidFinishLoading:json jsonRequest:self];
// } else {
// [delegate jsonDidFinishLoading:json jsonRequest:self];
// }
// }
@end