Skip to content
This repository
  • 3 commits
  • 15 files changed
  • 0 comments
  • 2 contributors
12  DIOSComment.h
@@ -40,30 +40,30 @@
40 40
 
41 41
 @interface DIOSComment : NSObject
42 42
 
43  
-- (void)commentGet:(NSDictionary *)comment 
  43
++ (void)commentGet:(NSDictionary *)comment
44 44
            success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
45 45
            failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
46 46
 
47  
-- (void)commentSave:(NSDictionary *)comment 
  47
++ (void)commentSave:(NSDictionary *)comment
48 48
             success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
49 49
             failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
50 50
 
51  
-- (void)commentUpdate:(NSDictionary *)comment  
  51
++ (void)commentUpdate:(NSDictionary *)comment
52 52
               success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
53 53
               failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
54 54
 
55  
-- (void)commentDelete:(NSDictionary *)comment 
  55
++ (void)commentDelete:(NSDictionary *)comment
56 56
               success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
57 57
               failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
58 58
 
59  
-- (void)commentIndexWithPage:(NSString *)page 
  59
++ (void)commentIndexWithPage:(NSString *)page
60 60
                       fields:(NSString *)fields 
61 61
                   parameters:(NSArray *)parameteres 
62 62
                     pageSize:(NSString *)pageSize
63 63
                      success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
64 64
                      failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
65 65
 
66  
-- (void)commentIndex:(NSDictionary *)params 
  66
++ (void)commentIndex:(NSDictionary *)params
67 67
              success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
68 68
              failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
69 69
 @end
12  DIOSComment.m
@@ -42,7 +42,7 @@ @implementation DIOSComment
42 42
 
43 43
 
44 44
 #pragma mark CommentGet
45  
-- (void)commentGet:(NSDictionary *)comment 
  45
++ (void)commentGet:(NSDictionary *)comment
46 46
            success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
47 47
            failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
48 48
   
@@ -53,7 +53,7 @@ - (void)commentGet:(NSDictionary *)comment
53 53
 }
54 54
 
55 55
 #pragma mark commentSave
56  
-- (void)commentSave:(NSDictionary *)comment 
  56
++ (void)commentSave:(NSDictionary *)comment
57 57
             success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
58 58
             failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
59 59
   [[DIOSSession sharedSession] postPath:[NSString stringWithFormat:@"%@/%@", kDiosEndpoint, kDiosBaseComment] 
@@ -63,7 +63,7 @@ - (void)commentSave:(NSDictionary *)comment
63 63
 }
64 64
 
65 65
 #pragma mark commentUpdate
66  
-- (void)commentUpdate:(NSDictionary *)comment  
  66
++ (void)commentUpdate:(NSDictionary *)comment
67 67
               success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
68 68
               failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
69 69
   [[DIOSSession sharedSession] putPath:[NSString stringWithFormat:@"%@/%@/%@", kDiosEndpoint, kDiosBaseComment, [comment objectForKey:@"cid"]] 
@@ -73,7 +73,7 @@ - (void)commentUpdate:(NSDictionary *)comment
73 73
 }
74 74
 
75 75
 #pragma mark CommentDelete
76  
-- (void)commentDelete:(NSDictionary *)comment 
  76
++ (void)commentDelete:(NSDictionary *)comment
77 77
               success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
78 78
               failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure; {
79 79
   [[DIOSSession sharedSession] deletePath:[NSString stringWithFormat:@"%@/%@/%@", kDiosEndpoint, kDiosBaseComment, [comment objectForKey:@"cid"]] parameters:comment success:success failure:failure];
@@ -81,7 +81,7 @@ - (void)commentDelete:(NSDictionary *)comment
81 81
 
82 82
 #pragma mark commentIndex
83 83
 //Simpler method if you didnt want to build the params :)
84  
-- (void)commentIndexWithPage:(NSString *)page 
  84
++ (void)commentIndexWithPage:(NSString *)page
85 85
                       fields:(NSString *)fields 
86 86
                   parameters:(NSArray *)parameteres 
87 87
                     pageSize:(NSString *)pageSize
@@ -96,7 +96,7 @@ - (void)commentIndexWithPage:(NSString *)page
96 96
   [self commentIndex:commentIndexDict success:success failure:failure];
97 97
 }
98 98
 
99  
-- (void)commentIndex:(NSDictionary *)params 
  99
++ (void)commentIndex:(NSDictionary *)params
100 100
              success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
101 101
              failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure; {
102 102
   
4  DIOSFile.h
@@ -37,9 +37,9 @@
37 37
 #import "AFHTTPRequestOperation.h"
38 38
 
39 39
 @interface DIOSFile : NSObject
40  
-- (void) fileGet:(NSDictionary *)params  
  40
++ (void) fileGet:(NSDictionary *)params
41 41
          success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
42 42
          failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
43 43
 
44  
-- (UIImageView *) getImageViewForFileImage:(NSDictionary *) file;
  44
++ (UIImageView *) getImageViewForFileImage:(NSDictionary *) file;
45 45
 @end
6  DIOSFile.m
@@ -40,7 +40,7 @@
40 40
 #import "DIOSSession.h"
41 41
 @implementation DIOSFile
42 42
 
43  
-- (void) fileGet:(NSDictionary *)params  
  43
++ (void) fileGet:(NSDictionary *)params
44 44
          success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
45 45
          failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
46 46
   
@@ -50,10 +50,10 @@ - (void) fileGet:(NSDictionary *)params
50 50
                                failure:failure];
51 51
 }
52 52
 
53  
-- (void) fileSave:(NSDictionary *)params {
  53
++ (void) fileSave:(NSDictionary *)params {
54 54
   //currently doesnt work :(
55 55
 }
56  
-- (UIImageView *) getImageViewForFileImage:(NSDictionary *) file; { 
  56
++ (UIImageView *) getImageViewForFileImage:(NSDictionary *) file; {
57 57
   NSURL *url = [NSURL URLWithString:[file objectForKey:@"uri_full"]];
58 58
   UIImageView *remoteImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
59 59
   [remoteImage setImageWithURL:url];
14  DIOSNode.h
@@ -39,31 +39,31 @@
39 39
 
40 40
 @interface DIOSNode : NSObject {
41 41
 }
42  
-- (void)nodeGet:(NSDictionary *)node  
  42
++ (void)nodeGet:(NSDictionary *)node
43 43
         success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
44 44
         failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
45 45
 
46  
-- (void)nodeSave:(NSDictionary *)node  
  46
++ (void)nodeSave:(NSDictionary *)node
47 47
          success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
48 48
          failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
49 49
 
50  
-- (void)nodeUpdate:(NSDictionary *)node  
  50
++ (void)nodeUpdate:(NSDictionary *)node
51 51
            success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
52 52
            failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
53 53
 
54  
-- (void)nodeDelete:(NSDictionary *)node  
  54
++ (void)nodeDelete:(NSDictionary *)node
55 55
            success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
56 56
            failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
57 57
 
58  
-- (void)nodeIndexWithPage:(NSString *)page fields:(NSString *)fields parameters:(NSArray *)parameteres pageSize:(NSString *)pageSize  
  58
++ (void)nodeIndexWithPage:(NSString *)page fields:(NSString *)fields parameters:(NSArray *)parameteres pageSize:(NSString *)pageSize
59 59
                   success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
60 60
                   failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
61 61
 
62  
-- (void)nodeIndex:(NSDictionary *)params  
  62
++ (void)nodeIndex:(NSDictionary *)params
63 63
           success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
64 64
           failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
65 65
 
66  
-- (void)nodeAttachFile:(NSDictionary *)params  
  66
++ (void)nodeAttachFile:(NSDictionary *)params
67 67
                success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
68 68
                failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
69 69
 @end
14  DIOSNode.m
@@ -40,7 +40,7 @@
40 40
 @implementation DIOSNode
41 41
 
42 42
 #pragma mark nodeGets
43  
-- (void)nodeGet:(NSDictionary *)node  
  43
++ (void)nodeGet:(NSDictionary *)node
44 44
         success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
45 45
         failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
46 46
   
@@ -51,7 +51,7 @@ - (void)nodeGet:(NSDictionary *)node
51 51
 }
52 52
 
53 53
 #pragma mark nodeSave
54  
-   - (void)nodeSave:(NSDictionary *)node  
  54
++ (void)nodeSave:(NSDictionary *)node
55 55
                                success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
56 56
                                failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
57 57
 
@@ -62,7 +62,7 @@ - (void)nodeSave:(NSDictionary *)node
62 62
 }
63 63
 
64 64
 #pragma mark nodeUpdate
65  
-- (void)nodeUpdate:(NSDictionary *)node  
  65
++ (void)nodeUpdate:(NSDictionary *)node
66 66
            success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
67 67
            failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
68 68
   
@@ -73,7 +73,7 @@ - (void)nodeUpdate:(NSDictionary *)node
73 73
 }
74 74
 
75 75
 #pragma mark nodeDelete
76  
-- (void)nodeDelete:(NSDictionary *)node  
  76
++ (void)nodeDelete:(NSDictionary *)node
77 77
            success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
78 78
            failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
79 79
   
@@ -84,7 +84,7 @@ - (void)nodeDelete:(NSDictionary *)node
84 84
 }
85 85
 #pragma mark nodeIndex
86 86
 //Simpler method if you didnt want to build the params :)
87  
-- (void)nodeIndexWithPage:(NSString *)page fields:(NSString *)fields parameters:(NSArray *)parameteres pageSize:(NSString *)pageSize  
  87
++ (void)nodeIndexWithPage:(NSString *)page fields:(NSString *)fields parameters:(NSArray *)parameteres pageSize:(NSString *)pageSize
88 88
                   success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
89 89
                   failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
90 90
   NSMutableDictionary *nodeIndexDict = [NSMutableDictionary new];
@@ -95,7 +95,7 @@ - (void)nodeIndexWithPage:(NSString *)page fields:(NSString *)fields parameters:
95 95
   [self nodeIndex:nodeIndexDict success:success failure:failure];
96 96
 }
97 97
 
98  
-- (void)nodeIndex:(NSDictionary *)params  
  98
++ (void)nodeIndex:(NSDictionary *)params
99 99
           success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
100 100
           failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
101 101
   
@@ -103,7 +103,7 @@ - (void)nodeIndex:(NSDictionary *)params
103 103
 }
104 104
 
105 105
 #pragma mark nodeAttachFile
106  
-- (void)nodeAttachFile:(NSDictionary *)params  
  106
++ (void)nodeAttachFile:(NSDictionary *)params
107 107
                success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
108 108
                failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
109 109
   NSMutableURLRequest *request = [[DIOSSession sharedSession] multipartFormRequestWithMethod:@"POST" path:[NSString stringWithFormat:@"%@/%@/%@/attach_file?field_name=%@", kDiosEndpoint, kDiosBaseNode, [params objectForKey:@"nid"], [params objectForKey:@"field_name"]] parameters:params constructingBodyWithBlock: ^(id <AFMultipartFormData>formData) {
2  DIOSSystem.h
@@ -40,7 +40,7 @@
40 40
 
41 41
 @interface DIOSSystem : NSObject
42 42
 
43  
-- (void)systemConnectwithSuccess: (void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
  43
++ (void)systemConnectwithSuccess: (void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
44 44
             failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
45 45
 
46 46
 @end
2  DIOSSystem.m
@@ -44,7 +44,7 @@
44 44
 @implementation DIOSSystem
45 45
 
46 46
 #pragma mark UserGets
47  
-- (void)systemConnectwithSuccess: (void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
  47
++ (void)systemConnectwithSuccess: (void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
48 48
         failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
49 49
     
50 50
     [[DIOSSession sharedSession] postPath:[NSString stringWithFormat:@"%@/system/connect", kDiosEndpoint] 
10  DIOSTaxonomy.h
@@ -39,28 +39,28 @@
39 39
 
40 40
 @interface DIOSTaxonomy : NSObject 
41 41
 
42  
-- (void)getTreeWithParams:(NSDictionary *)params  
  42
++ (void)getTreeWithParams:(NSDictionary *)params
43 43
                   success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
44 44
                   failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
45 45
 
46  
-- (void)getTreeWithVid:(NSString *)vid 
  46
++ (void)getTreeWithVid:(NSString *)vid
47 47
             withParent:(NSString *)parent 
48 48
            andMaxDepth:(NSString *)maxDepth  
49 49
                success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
50 50
                failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
51 51
 
52  
-- (void)selectNodesWithParams:(NSDictionary *)params  
  52
++ (void)selectNodesWithParams:(NSDictionary *)params
53 53
                       success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
54 54
                       failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
55 55
 
56  
-- (void)selectNodesWithTid:(NSString *)tid 
  56
++ (void)selectNodesWithTid:(NSString *)tid
57 57
                   andLimit:(NSString *)limit 
58 58
                   andPager:(NSString *)pager
59 59
                   andOrder:(NSString *)order  
60 60
                    success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
61 61
                    failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
62 62
 
63  
-- (void)getTermWithTid:(NSString *)tid  
  63
++ (void)getTermWithTid:(NSString *)tid
64 64
                success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
65 65
                failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
66 66
 @end
10  DIOSTaxonomy.m
@@ -40,7 +40,7 @@
40 40
 @implementation DIOSTaxonomy
41 41
 
42 42
 
43  
-- (void)getTreeWithVid:(NSString *)vid 
  43
++ (void)getTreeWithVid:(NSString *)vid
44 44
             withParent:(NSString *)parent 
45 45
            andMaxDepth:(NSString *)maxDepth  
46 46
                success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
@@ -51,7 +51,7 @@ - (void)getTreeWithVid:(NSString *)vid
51 51
   [params setValue:maxDepth forKey:@"max_depth"];
52 52
   [self getTreeWithParams:params success:success failure:failure];
53 53
 }
54  
-- (void)getTreeWithParams:(NSDictionary *)params  
  54
++ (void)getTreeWithParams:(NSDictionary *)params
55 55
                   success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
56 56
                   failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
57 57
   
@@ -60,7 +60,7 @@ - (void)getTreeWithParams:(NSDictionary *)params
60 60
                                 success:success
61 61
                                 failure:failure];
62 62
 }
63  
-- (void)selectNodesWithTid:(NSString *)tid 
  63
++ (void)selectNodesWithTid:(NSString *)tid
64 64
                   andLimit:(NSString *)limit 
65 65
                   andPager:(NSString *)pager
66 66
                   andOrder:(NSString *)order  
@@ -74,7 +74,7 @@ - (void)selectNodesWithTid:(NSString *)tid
74 74
   [params setValue:order forKey:@"prder"];
75 75
   [self selectNodesWithParams:params success:success failure:failure];
76 76
 }
77  
-- (void)selectNodesWithParams:(NSDictionary *)params  
  77
++ (void)selectNodesWithParams:(NSDictionary *)params
78 78
                       success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
79 79
                       failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
80 80
   
@@ -83,7 +83,7 @@ - (void)selectNodesWithParams:(NSDictionary *)params
83 83
                                 success:success 
84 84
                                 failure:failure];
85 85
 }
86  
-- (void)getTermWithTid:(NSString *)tid  
  86
++ (void)getTermWithTid:(NSString *)tid
87 87
                success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
88 88
                failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
89 89
   [[DIOSSession sharedSession] getPath:[NSString stringWithFormat:@"%@/%@/%@", kDiosEndpoint, kDiosBaseTaxonmyTerm, tid] 
20  DIOSUser.h
@@ -38,45 +38,45 @@
38 38
 #import "AFHTTPRequestOperation.h"
39 39
 
40 40
 @interface DIOSUser : NSObject
41  
-- (void)userGet:(NSDictionary *)user  
  41
++ (void)userGet:(NSDictionary *)user
42 42
         success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
43 43
         failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
44 44
 
45  
-- (void)userSave:(NSDictionary *)user  
  45
++ (void)userSave:(NSDictionary *)user
46 46
          success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
47 47
          failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
48 48
 
49  
-- (void)userRegister:(NSDictionary *)user  
  49
++ (void)userRegister:(NSDictionary *)user
50 50
          success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
51 51
          failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
52 52
 
53  
-- (void)userUpdate:(NSDictionary *)user  
  53
++ (void)userUpdate:(NSDictionary *)user
54 54
            success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
55 55
            failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
56 56
 
57  
-- (void)userDelete:(NSDictionary *)user  
  57
++ (void)userDelete:(NSDictionary *)user
58 58
            success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
59 59
            failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
60 60
 
61  
-- (void)userIndexWithPage:(NSString *)page 
  61
++ (void)userIndexWithPage:(NSString *)page
62 62
                    fields:(NSString *)fields 
63 63
                parameters:(NSArray *)parameteres 
64 64
                  pageSize:(NSString *)pageSize  
65 65
                   success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
66 66
                   failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
67 67
 
68  
-- (void)userIndex:(NSDictionary *)params  
  68
++ (void)userIndex:(NSDictionary *)params
69 69
           success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
70 70
           failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
71 71
 
72  
-- (void)userLogin:(NSDictionary *)user  
  72
++ (void)userLogin:(NSDictionary *)user
73 73
           success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
74 74
           failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
75 75
 
76  
-- (void)userLoginWithUsername:(NSString *)username andPassword:(NSString *)password  
  76
++ (void)userLoginWithUsername:(NSString *)username andPassword:(NSString *)password
77 77
                       success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
78 78
                       failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
79 79
 
80  
-- (void)userLogoutWithSuccessBlock:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
  80
++ (void)userLogoutWithSuccessBlock:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
81 81
            failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
82 82
 @end
20  DIOSUser.m
@@ -41,7 +41,7 @@ @implementation DIOSUser
41 41
 
42 42
 
43 43
 #pragma mark UserGets
44  
-- (void)userGet:(NSDictionary *)user  
  44
++ (void)userGet:(NSDictionary *)user
45 45
         success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
46 46
         failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
47 47
   
@@ -53,7 +53,7 @@ - (void)userGet:(NSDictionary *)user
53 53
 
54 54
 
55 55
 #pragma mark userSaves
56  
-- (void)userSave:(NSDictionary *)user  
  56
++ (void)userSave:(NSDictionary *)user
57 57
          success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
58 58
          failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
59 59
   
@@ -64,7 +64,7 @@ - (void)userSave:(NSDictionary *)user
64 64
 }
65 65
 
66 66
 #pragma mark userRegister
67  
-- (void)userRegister:(NSDictionary *)user  
  67
++ (void)userRegister:(NSDictionary *)user
68 68
          success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
69 69
          failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
70 70
   
@@ -75,7 +75,7 @@ - (void)userRegister:(NSDictionary *)user
75 75
 }
76 76
 
77 77
 #pragma mark userUpdate
78  
-- (void)userUpdate:(NSDictionary *)user  
  78
++ (void)userUpdate:(NSDictionary *)user
79 79
            success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
80 80
            failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
81 81
   
@@ -86,7 +86,7 @@ - (void)userUpdate:(NSDictionary *)user
86 86
 }
87 87
 
88 88
 #pragma mark UserDelete
89  
-- (void)userDelete:(NSDictionary *)user  
  89
++ (void)userDelete:(NSDictionary *)user
90 90
            success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
91 91
            failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
92 92
   
@@ -99,7 +99,7 @@ - (void)userDelete:(NSDictionary *)user
99 99
 
100 100
 #pragma mark userIndex
101 101
 //Simpler method if you didnt want to build the params :)
102  
-- (void)userIndexWithPage:(NSString *)page 
  102
++ (void)userIndexWithPage:(NSString *)page
103 103
                    fields:(NSString *)fields 
104 104
                parameters:(NSArray *)parameteres 
105 105
                  pageSize:(NSString *)pageSize  
@@ -113,7 +113,7 @@ - (void)userIndexWithPage:(NSString *)page
113 113
   [self userIndex:userIndexDict success:success failure:failure];
114 114
 }
115 115
 
116  
-- (void)userIndex:(NSDictionary *)params  
  116
++ (void)userIndex:(NSDictionary *)params
117 117
           success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
118 118
           failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
119 119
   [[DIOSSession sharedSession] getPath:[NSString stringWithFormat:@"%@/%@", kDiosEndpoint, kDiosBaseUser] 
@@ -123,7 +123,7 @@ - (void)userIndex:(NSDictionary *)params
123 123
 }
124 124
 
125 125
 #pragma mark userLogin
126  
-- (void)userLoginWithUsername:(NSString *)username andPassword:(NSString *)password  
  126
++ (void)userLoginWithUsername:(NSString *)username andPassword:(NSString *)password
127 127
                       success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
128 128
                       failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
129 129
   
@@ -133,14 +133,14 @@ - (void)userLoginWithUsername:(NSString *)username andPassword:(NSString *)passw
133 133
                                 success:success 
134 134
                                 failure:failure];
135 135
 }
136  
-- (void)userLogin:(NSDictionary *)user  
  136
++ (void)userLogin:(NSDictionary *)user
137 137
           success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
138 138
           failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
139 139
   [self userLoginWithUsername:[user objectForKey:@"name"] andPassword:[user objectForKey:@"pass"] success:success failure:failure];
140 140
 }
141 141
 
142 142
 #pragma mark userLogout
143  
-- (void)userLogoutWithSuccessBlock:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
  143
++ (void)userLogoutWithSuccessBlock:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
144 144
                            failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
145 145
   [[DIOSSession sharedSession] postPath:[NSString stringWithFormat:@"%@/%@/logout", kDiosEndpoint, kDiosBaseUser] 
146 146
                              parameters:nil 
2  DIOSView.h
@@ -44,6 +44,6 @@
44 44
  @param failure The block to be executed on the completion of an unsuccessful request. This block has no return value and takes two arguments: the receiver operation and the error that occured during the request.
45 45
  
46 46
  */
47  
-- (void)viewGet:(NSDictionary *)params success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
  47
++ (void)viewGet:(NSDictionary *)params success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
48 48
         failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
49 49
 @end
2  DIOSView.m
@@ -36,7 +36,7 @@
36 36
 #import "DIOSView.h"
37 37
 #import "DIOSSession.h"
38 38
 @implementation DIOSView
39  
-- (void)viewGet:(NSDictionary *)params success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
  39
++ (void)viewGet:(NSDictionary *)params success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
40 40
         failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
41 41
 	NSMutableString *path = [NSMutableString stringWithFormat:@"%@/%@/%@?", kDiosEndpoint, kDiosBaseView, [params objectForKey:@"view_name"]];
42 42
 	for (NSString *key in params) {
3  README.md
Source Rendered
@@ -7,10 +7,9 @@ If you wanted to get a node you can do so by instantiating a DIOSNode Object, cr
7 7
 NSDictionairy and running the nodeGet method.  Heres an example:
8 8
 
9 9
 ```obj-c
10  
-    DIOSNode *node = [[DIOSNode alloc] init];
11 10
     NSMutableDictionary *nodeData = [NSMutableDictionary new];
12 11
     [nodeData setValue:@"12" forKey:@"nid"];
13  
-    [node nodeGet:nodeData success:^(AFHTTPRequestOperation *operation, id responseObject) {
  12
+    [DIOSNode nodeGet:nodeData success:^(AFHTTPRequestOperation *operation, id responseObject) {
14 13
       //Do Something with the responseObject
15 14
       NSLog(@"%@", responseObject);
16 15
     } failure:^(AFHTTPRequestOperation *operation, NSError *error) {

No commit comments for this range

Something went wrong with that request. Please try again.