Notice
Notice 는 OP Admin에 등록된 공지사항의 정보를 수신하여 출력하는 기능이다.
확장 프레임워크 파일을 추가하여 사용할 수 있으며 추가 방법은 iOS 개발 가이드 의 내용을 참조한다.
get
공지사항 정보 얻어오는 기능이며 호출 방법은 다음과 같다.
Example
///////////////
// 3.10.18 이상
///////////////
let api = DAPNotice()
let param = DAPNoticeGetParam()
api.execute(with: param, completion: { (dict) in
}) { (resultError) in
}
///////////////
// 3.10.18 이하
///////////////
let api = DAPNotice()
let params = Array<Any>()
api.execute(withActionName: "get", params: params, completion: { (dict) in
guard let resultDict = dict else {
return
}
}) { (resultError) in
guard let error = resultError else {
return
}
}
// 3.10.18 이상
///////////////
let api = DAPNotice()
let param = DAPNoticeGetParam()
api.execute(with: param, completion: { (dict) in
}) { (resultError) in
}
///////////////
// 3.10.18 이하
///////////////
let api = DAPNotice()
let params = Array<Any>()
api.execute(withActionName: "get", params: params, completion: { (dict) in
guard let resultDict = dict else {
return
}
}) { (resultError) in
guard let error = resultError else {
return
}
}
///////////////
// 3.10.18 이상
///////////////
DAPDeviceAPI *deviceAPI = [DAPNotice new];
DAPNoticeGetParam *infoParam = [DAPNoticeGetParam new];
[deviceAPI executeWithParam:infoParam completion:^(NSDictionary *resultDict) {
NSString *deviceResult = [resultDict objectForKey:kDeviceResult];
NSLog(@"deviceResult : %@", deviceResult);
} failure:^(NSError *error) {
NSLog(@"error : %@", [error userInfo]);
}];
///////////////
// 3.10.18 이하
///////////////
DAPDeviceAPI *deviceAPI = [DAPNotice new];
NSArray *params = [NSArray arrayWithObjects:[HMPCommonUtil deviceAPIWithServiceName:kNetwork], nil];
[deviceAPI executeWithActionName:@"get" params:params completion:^(NSDictionary *resultDict) {
NSLog(@"%s %d\nresultDict %@", __PRETTY_FUNCTION__, __LINE__, resultDict);
} failure:^(NSError *error) {
NSLog(@"%s %d\nerror %@", __PRETTY_FUNCTION__, __LINE__, error);
}];
// 3.10.18 이상
///////////////
DAPDeviceAPI *deviceAPI = [DAPNotice new];
DAPNoticeGetParam *infoParam = [DAPNoticeGetParam new];
[deviceAPI executeWithParam:infoParam completion:^(NSDictionary *resultDict) {
NSString *deviceResult = [resultDict objectForKey:kDeviceResult];
NSLog(@"deviceResult : %@", deviceResult);
} failure:^(NSError *error) {
NSLog(@"error : %@", [error userInfo]);
}];
///////////////
// 3.10.18 이하
///////////////
DAPDeviceAPI *deviceAPI = [DAPNotice new];
NSArray *params = [NSArray arrayWithObjects:[HMPCommonUtil deviceAPIWithServiceName:kNetwork], nil];
[deviceAPI executeWithActionName:@"get" params:params completion:^(NSDictionary *resultDict) {
NSLog(@"%s %d\nresultDict %@", __PRETTY_FUNCTION__, __LINE__, resultDict);
} failure:^(NSError *error) {
NSLog(@"%s %d\nerror %@", __PRETTY_FUNCTION__, __LINE__, error);
}];
show
공지사항 정보 츨력하는 기능이며 호출 방법은 다음과 같다.
Example
///////////////
// 3.10.18 이상
///////////////
let api = DAPNotice()
let param = DAPNoticeShowParam()
api.execute(with: param, completion: { (dict) in
}) { (resultError) in
}
///////////////
// 3.10.18 이하
///////////////
let api = DAPNotice()
let params = Array<Any>()
api.execute(withActionName: "show", params: params, completion: { (dict) in
guard let resultDict = dict else {
return
}
}) { (resultError) in
guard let error = resultError else {
return
}
}
// 3.10.18 이상
///////////////
let api = DAPNotice()
let param = DAPNoticeShowParam()
api.execute(with: param, completion: { (dict) in
}) { (resultError) in
}
///////////////
// 3.10.18 이하
///////////////
let api = DAPNotice()
let params = Array<Any>()
api.execute(withActionName: "show", params: params, completion: { (dict) in
guard let resultDict = dict else {
return
}
}) { (resultError) in
guard let error = resultError else {
return
}
}
///////////////
// 3.10.18 이상
///////////////
DAPDeviceAPI *deviceAPI = [DAPNotice new];
DAPNoticeShowParam *infoParam = [DAPNoticeShowParam new];
[deviceAPI executeWithParam:infoParam completion:^(NSDictionary *resultDict) {
NSString *deviceResult = [resultDict objectForKey:kDeviceResult];
NSLog(@"deviceResult : %@", deviceResult);
} failure:^(NSError *error) {
NSLog(@"error : %@", [error userInfo]);
}];
///////////////
// 3.10.18 이하
///////////////
DAPDeviceAPI *deviceAPI = [DAPNotice new];
NSArray *params = [NSArray arrayWithObjects:[HMPCommonUtil deviceAPIWithServiceName:kNetwork], nil];
[deviceAPI executeWithActionName:@"show" params:params completion:^(NSDictionary *resultDict) {
NSLog(@"%s %d\nresultDict %@", __PRETTY_FUNCTION__, __LINE__, resultDict);
} failure:^(NSError *error) {
NSLog(@"%s %d\nerror %@", __PRETTY_FUNCTION__, __LINE__, error);
}];
// 3.10.18 이상
///////////////
DAPDeviceAPI *deviceAPI = [DAPNotice new];
DAPNoticeShowParam *infoParam = [DAPNoticeShowParam new];
[deviceAPI executeWithParam:infoParam completion:^(NSDictionary *resultDict) {
NSString *deviceResult = [resultDict objectForKey:kDeviceResult];
NSLog(@"deviceResult : %@", deviceResult);
} failure:^(NSError *error) {
NSLog(@"error : %@", [error userInfo]);
}];
///////////////
// 3.10.18 이하
///////////////
DAPDeviceAPI *deviceAPI = [DAPNotice new];
NSArray *params = [NSArray arrayWithObjects:[HMPCommonUtil deviceAPIWithServiceName:kNetwork], nil];
[deviceAPI executeWithActionName:@"show" params:params completion:^(NSDictionary *resultDict) {
NSLog(@"%s %d\nresultDict %@", __PRETTY_FUNCTION__, __LINE__, resultDict);
} failure:^(NSError *error) {
NSLog(@"%s %d\nerror %@", __PRETTY_FUNCTION__, __LINE__, error);
}];