Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: kylebrowning/drupal-ios-sdk
base: 3255ff6c64
...
head fork: kylebrowning/drupal-ios-sdk
compare: 5c7bb8cc18
  • 3 commits
  • 15 files changed
  • 0 commit comments
  • 2 contributors
View
12 DIOSComment.h
@@ -40,30 +40,30 @@
@interface DIOSComment : NSObject
-- (void)commentGet:(NSDictionary *)comment
++ (void)commentGet:(NSDictionary *)comment
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (void)commentSave:(NSDictionary *)comment
++ (void)commentSave:(NSDictionary *)comment
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (void)commentUpdate:(NSDictionary *)comment
++ (void)commentUpdate:(NSDictionary *)comment
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (void)commentDelete:(NSDictionary *)comment
++ (void)commentDelete:(NSDictionary *)comment
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (void)commentIndexWithPage:(NSString *)page
++ (void)commentIndexWithPage:(NSString *)page
fields:(NSString *)fields
parameters:(NSArray *)parameteres
pageSize:(NSString *)pageSize
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (void)commentIndex:(NSDictionary *)params
++ (void)commentIndex:(NSDictionary *)params
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
@end
View
12 DIOSComment.m
@@ -42,7 +42,7 @@ @implementation DIOSComment
#pragma mark CommentGet
-- (void)commentGet:(NSDictionary *)comment
++ (void)commentGet:(NSDictionary *)comment
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
@@ -53,7 +53,7 @@ - (void)commentGet:(NSDictionary *)comment
}
#pragma mark commentSave
-- (void)commentSave:(NSDictionary *)comment
++ (void)commentSave:(NSDictionary *)comment
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
[[DIOSSession sharedSession] postPath:[NSString stringWithFormat:@"%@/%@", kDiosEndpoint, kDiosBaseComment]
@@ -63,7 +63,7 @@ - (void)commentSave:(NSDictionary *)comment
}
#pragma mark commentUpdate
-- (void)commentUpdate:(NSDictionary *)comment
++ (void)commentUpdate:(NSDictionary *)comment
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
[[DIOSSession sharedSession] putPath:[NSString stringWithFormat:@"%@/%@/%@", kDiosEndpoint, kDiosBaseComment, [comment objectForKey:@"cid"]]
@@ -73,7 +73,7 @@ - (void)commentUpdate:(NSDictionary *)comment
}
#pragma mark CommentDelete
-- (void)commentDelete:(NSDictionary *)comment
++ (void)commentDelete:(NSDictionary *)comment
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure; {
[[DIOSSession sharedSession] deletePath:[NSString stringWithFormat:@"%@/%@/%@", kDiosEndpoint, kDiosBaseComment, [comment objectForKey:@"cid"]] parameters:comment success:success failure:failure];
@@ -81,7 +81,7 @@ - (void)commentDelete:(NSDictionary *)comment
#pragma mark commentIndex
//Simpler method if you didnt want to build the params :)
-- (void)commentIndexWithPage:(NSString *)page
++ (void)commentIndexWithPage:(NSString *)page
fields:(NSString *)fields
parameters:(NSArray *)parameteres
pageSize:(NSString *)pageSize
@@ -96,7 +96,7 @@ - (void)commentIndexWithPage:(NSString *)page
[self commentIndex:commentIndexDict success:success failure:failure];
}
-- (void)commentIndex:(NSDictionary *)params
++ (void)commentIndex:(NSDictionary *)params
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure; {
View
4 DIOSFile.h
@@ -37,9 +37,9 @@
#import "AFHTTPRequestOperation.h"
@interface DIOSFile : NSObject
-- (void) fileGet:(NSDictionary *)params
++ (void) fileGet:(NSDictionary *)params
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (UIImageView *) getImageViewForFileImage:(NSDictionary *) file;
++ (UIImageView *) getImageViewForFileImage:(NSDictionary *) file;
@end
View
6 DIOSFile.m
@@ -40,7 +40,7 @@
#import "DIOSSession.h"
@implementation DIOSFile
-- (void) fileGet:(NSDictionary *)params
++ (void) fileGet:(NSDictionary *)params
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
@@ -50,10 +50,10 @@ - (void) fileGet:(NSDictionary *)params
failure:failure];
}
-- (void) fileSave:(NSDictionary *)params {
++ (void) fileSave:(NSDictionary *)params {
//currently doesnt work :(
}
-- (UIImageView *) getImageViewForFileImage:(NSDictionary *) file; {
++ (UIImageView *) getImageViewForFileImage:(NSDictionary *) file; {
NSURL *url = [NSURL URLWithString:[file objectForKey:@"uri_full"]];
UIImageView *remoteImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
[remoteImage setImageWithURL:url];
View
14 DIOSNode.h
@@ -39,31 +39,31 @@
@interface DIOSNode : NSObject {
}
-- (void)nodeGet:(NSDictionary *)node
++ (void)nodeGet:(NSDictionary *)node
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (void)nodeSave:(NSDictionary *)node
++ (void)nodeSave:(NSDictionary *)node
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (void)nodeUpdate:(NSDictionary *)node
++ (void)nodeUpdate:(NSDictionary *)node
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (void)nodeDelete:(NSDictionary *)node
++ (void)nodeDelete:(NSDictionary *)node
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (void)nodeIndexWithPage:(NSString *)page fields:(NSString *)fields parameters:(NSArray *)parameteres pageSize:(NSString *)pageSize
++ (void)nodeIndexWithPage:(NSString *)page fields:(NSString *)fields parameters:(NSArray *)parameteres pageSize:(NSString *)pageSize
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (void)nodeIndex:(NSDictionary *)params
++ (void)nodeIndex:(NSDictionary *)params
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (void)nodeAttachFile:(NSDictionary *)params
++ (void)nodeAttachFile:(NSDictionary *)params
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
@end
View
14 DIOSNode.m
@@ -40,7 +40,7 @@
@implementation DIOSNode
#pragma mark nodeGets
-- (void)nodeGet:(NSDictionary *)node
++ (void)nodeGet:(NSDictionary *)node
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
@@ -51,7 +51,7 @@ - (void)nodeGet:(NSDictionary *)node
}
#pragma mark nodeSave
- - (void)nodeSave:(NSDictionary *)node
++ (void)nodeSave:(NSDictionary *)node
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
@@ -62,7 +62,7 @@ - (void)nodeSave:(NSDictionary *)node
}
#pragma mark nodeUpdate
-- (void)nodeUpdate:(NSDictionary *)node
++ (void)nodeUpdate:(NSDictionary *)node
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
@@ -73,7 +73,7 @@ - (void)nodeUpdate:(NSDictionary *)node
}
#pragma mark nodeDelete
-- (void)nodeDelete:(NSDictionary *)node
++ (void)nodeDelete:(NSDictionary *)node
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
@@ -84,7 +84,7 @@ - (void)nodeDelete:(NSDictionary *)node
}
#pragma mark nodeIndex
//Simpler method if you didnt want to build the params :)
-- (void)nodeIndexWithPage:(NSString *)page fields:(NSString *)fields parameters:(NSArray *)parameteres pageSize:(NSString *)pageSize
++ (void)nodeIndexWithPage:(NSString *)page fields:(NSString *)fields parameters:(NSArray *)parameteres pageSize:(NSString *)pageSize
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
NSMutableDictionary *nodeIndexDict = [NSMutableDictionary new];
@@ -95,7 +95,7 @@ - (void)nodeIndexWithPage:(NSString *)page fields:(NSString *)fields parameters:
[self nodeIndex:nodeIndexDict success:success failure:failure];
}
-- (void)nodeIndex:(NSDictionary *)params
++ (void)nodeIndex:(NSDictionary *)params
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
@@ -103,7 +103,7 @@ - (void)nodeIndex:(NSDictionary *)params
}
#pragma mark nodeAttachFile
-- (void)nodeAttachFile:(NSDictionary *)params
++ (void)nodeAttachFile:(NSDictionary *)params
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
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) {
View
2  DIOSSystem.h
@@ -40,7 +40,7 @@
@interface DIOSSystem : NSObject
-- (void)systemConnectwithSuccess: (void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
++ (void)systemConnectwithSuccess: (void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
@end
View
2  DIOSSystem.m
@@ -44,7 +44,7 @@
@implementation DIOSSystem
#pragma mark UserGets
-- (void)systemConnectwithSuccess: (void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
++ (void)systemConnectwithSuccess: (void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
[[DIOSSession sharedSession] postPath:[NSString stringWithFormat:@"%@/system/connect", kDiosEndpoint]
View
10 DIOSTaxonomy.h
@@ -39,28 +39,28 @@
@interface DIOSTaxonomy : NSObject
-- (void)getTreeWithParams:(NSDictionary *)params
++ (void)getTreeWithParams:(NSDictionary *)params
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (void)getTreeWithVid:(NSString *)vid
++ (void)getTreeWithVid:(NSString *)vid
withParent:(NSString *)parent
andMaxDepth:(NSString *)maxDepth
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (void)selectNodesWithParams:(NSDictionary *)params
++ (void)selectNodesWithParams:(NSDictionary *)params
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (void)selectNodesWithTid:(NSString *)tid
++ (void)selectNodesWithTid:(NSString *)tid
andLimit:(NSString *)limit
andPager:(NSString *)pager
andOrder:(NSString *)order
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (void)getTermWithTid:(NSString *)tid
++ (void)getTermWithTid:(NSString *)tid
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
@end
View
10 DIOSTaxonomy.m
@@ -40,7 +40,7 @@
@implementation DIOSTaxonomy
-- (void)getTreeWithVid:(NSString *)vid
++ (void)getTreeWithVid:(NSString *)vid
withParent:(NSString *)parent
andMaxDepth:(NSString *)maxDepth
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
@@ -51,7 +51,7 @@ - (void)getTreeWithVid:(NSString *)vid
[params setValue:maxDepth forKey:@"max_depth"];
[self getTreeWithParams:params success:success failure:failure];
}
-- (void)getTreeWithParams:(NSDictionary *)params
++ (void)getTreeWithParams:(NSDictionary *)params
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
@@ -60,7 +60,7 @@ - (void)getTreeWithParams:(NSDictionary *)params
success:success
failure:failure];
}
-- (void)selectNodesWithTid:(NSString *)tid
++ (void)selectNodesWithTid:(NSString *)tid
andLimit:(NSString *)limit
andPager:(NSString *)pager
andOrder:(NSString *)order
@@ -74,7 +74,7 @@ - (void)selectNodesWithTid:(NSString *)tid
[params setValue:order forKey:@"prder"];
[self selectNodesWithParams:params success:success failure:failure];
}
-- (void)selectNodesWithParams:(NSDictionary *)params
++ (void)selectNodesWithParams:(NSDictionary *)params
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
@@ -83,7 +83,7 @@ - (void)selectNodesWithParams:(NSDictionary *)params
success:success
failure:failure];
}
-- (void)getTermWithTid:(NSString *)tid
++ (void)getTermWithTid:(NSString *)tid
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
[[DIOSSession sharedSession] getPath:[NSString stringWithFormat:@"%@/%@/%@", kDiosEndpoint, kDiosBaseTaxonmyTerm, tid]
View
20 DIOSUser.h
@@ -38,45 +38,45 @@
#import "AFHTTPRequestOperation.h"
@interface DIOSUser : NSObject
-- (void)userGet:(NSDictionary *)user
++ (void)userGet:(NSDictionary *)user
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (void)userSave:(NSDictionary *)user
++ (void)userSave:(NSDictionary *)user
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (void)userRegister:(NSDictionary *)user
++ (void)userRegister:(NSDictionary *)user
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (void)userUpdate:(NSDictionary *)user
++ (void)userUpdate:(NSDictionary *)user
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (void)userDelete:(NSDictionary *)user
++ (void)userDelete:(NSDictionary *)user
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (void)userIndexWithPage:(NSString *)page
++ (void)userIndexWithPage:(NSString *)page
fields:(NSString *)fields
parameters:(NSArray *)parameteres
pageSize:(NSString *)pageSize
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (void)userIndex:(NSDictionary *)params
++ (void)userIndex:(NSDictionary *)params
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (void)userLogin:(NSDictionary *)user
++ (void)userLogin:(NSDictionary *)user
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (void)userLoginWithUsername:(NSString *)username andPassword:(NSString *)password
++ (void)userLoginWithUsername:(NSString *)username andPassword:(NSString *)password
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
-- (void)userLogoutWithSuccessBlock:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
++ (void)userLogoutWithSuccessBlock:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
@end
View
20 DIOSUser.m
@@ -41,7 +41,7 @@ @implementation DIOSUser
#pragma mark UserGets
-- (void)userGet:(NSDictionary *)user
++ (void)userGet:(NSDictionary *)user
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
@@ -53,7 +53,7 @@ - (void)userGet:(NSDictionary *)user
#pragma mark userSaves
-- (void)userSave:(NSDictionary *)user
++ (void)userSave:(NSDictionary *)user
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
@@ -64,7 +64,7 @@ - (void)userSave:(NSDictionary *)user
}
#pragma mark userRegister
-- (void)userRegister:(NSDictionary *)user
++ (void)userRegister:(NSDictionary *)user
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
@@ -75,7 +75,7 @@ - (void)userRegister:(NSDictionary *)user
}
#pragma mark userUpdate
-- (void)userUpdate:(NSDictionary *)user
++ (void)userUpdate:(NSDictionary *)user
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
@@ -86,7 +86,7 @@ - (void)userUpdate:(NSDictionary *)user
}
#pragma mark UserDelete
-- (void)userDelete:(NSDictionary *)user
++ (void)userDelete:(NSDictionary *)user
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
@@ -99,7 +99,7 @@ - (void)userDelete:(NSDictionary *)user
#pragma mark userIndex
//Simpler method if you didnt want to build the params :)
-- (void)userIndexWithPage:(NSString *)page
++ (void)userIndexWithPage:(NSString *)page
fields:(NSString *)fields
parameters:(NSArray *)parameteres
pageSize:(NSString *)pageSize
@@ -113,7 +113,7 @@ - (void)userIndexWithPage:(NSString *)page
[self userIndex:userIndexDict success:success failure:failure];
}
-- (void)userIndex:(NSDictionary *)params
++ (void)userIndex:(NSDictionary *)params
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
[[DIOSSession sharedSession] getPath:[NSString stringWithFormat:@"%@/%@", kDiosEndpoint, kDiosBaseUser]
@@ -123,7 +123,7 @@ - (void)userIndex:(NSDictionary *)params
}
#pragma mark userLogin
-- (void)userLoginWithUsername:(NSString *)username andPassword:(NSString *)password
++ (void)userLoginWithUsername:(NSString *)username andPassword:(NSString *)password
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
@@ -133,14 +133,14 @@ - (void)userLoginWithUsername:(NSString *)username andPassword:(NSString *)passw
success:success
failure:failure];
}
-- (void)userLogin:(NSDictionary *)user
++ (void)userLogin:(NSDictionary *)user
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
[self userLoginWithUsername:[user objectForKey:@"name"] andPassword:[user objectForKey:@"pass"] success:success failure:failure];
}
#pragma mark userLogout
-- (void)userLogoutWithSuccessBlock:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
++ (void)userLogoutWithSuccessBlock:(void (^)(AFHTTPRequestOperation *operation, id responseObject)) success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
[[DIOSSession sharedSession] postPath:[NSString stringWithFormat:@"%@/%@/logout", kDiosEndpoint, kDiosBaseUser]
parameters:nil
View
2  DIOSView.h
@@ -44,6 +44,6 @@
@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.
*/
-- (void)viewGet:(NSDictionary *)params success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
++ (void)viewGet:(NSDictionary *)params success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure;
@end
View
2  DIOSView.m
@@ -36,7 +36,7 @@
#import "DIOSView.h"
#import "DIOSSession.h"
@implementation DIOSView
-- (void)viewGet:(NSDictionary *)params success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
++ (void)viewGet:(NSDictionary *)params success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
NSMutableString *path = [NSMutableString stringWithFormat:@"%@/%@/%@?", kDiosEndpoint, kDiosBaseView, [params objectForKey:@"view_name"]];
for (NSString *key in params) {
View
3  README.md
@@ -7,10 +7,9 @@ If you wanted to get a node you can do so by instantiating a DIOSNode Object, cr
NSDictionairy and running the nodeGet method. Heres an example:
```obj-c
- DIOSNode *node = [[DIOSNode alloc] init];
NSMutableDictionary *nodeData = [NSMutableDictionary new];
[nodeData setValue:@"12" forKey:@"nid"];
- [node nodeGet:nodeData success:^(AFHTTPRequestOperation *operation, id responseObject) {
+ [DIOSNode nodeGet:nodeData success:^(AFHTTPRequestOperation *operation, id responseObject) {
//Do Something with the responseObject
NSLog(@"%@", responseObject);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {

No commit comments for this range

Something went wrong with that request. Please try again.