forked from kylebrowning/waterwheel.swift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DIOSNode.m
40 lines (34 loc) · 1.68 KB
/
DIOSNode.m
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
//
// DIOSNode.m
// dios
//
// Created by Kyle Browning on 9/5/14.
// Copyright (c) 2014 Kyle Browning. All rights reserved.
//
#import "DIOSNode.h"
#import "DIOSEntity.h"
@implementation DIOSNode
+ (void) getNodeWithID:(NSString*)eid
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
[DIOSEntity getEntityWithName:@"node" andID:eid success:success failure:failure];
}
+ (void) createNodeWithParams:(NSDictionary*)params
type:(NSString *)type
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
[DIOSEntity createEntityWithEntityName:@"node" type:type andParams:params success:success failure:failure];
}
+ (void) deleteNodeWithID:(NSString*)eid
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
[DIOSEntity deleteEntityWithEntityName:@"node" andID:eid success:success failure:failure];
}
+ (void) patchNodeWithID:(NSString*)eid
params:(NSDictionary*)params
type:(NSString *)type
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error)) failure {
[DIOSEntity patchEntityWithEntityName:@"node" type:type eid:eid andParams:params success:success failure:failure];
}
@end