// // FKAssistantRequest.m // FirstLink // // Created by ascii on 15/7/31. // Copyright (c) 2015年 FirstLink. All rights reserved. // #import "FKMessageRequest.h" @implementation FKMessageRequest + (void)requestAssistantPrivilege:(int)identify deleagate:(id)delegate { NSString *URLString = [NSString stringWithFormat:@"%@/link-site/api/get_my_vip_info.json", [[FKServerUtil sharedInstance] apiServer]]; [[FLDataCenter sharedDataCenter] POST:URLString para:[FLRequestHelper commonParamater] identify:identify delegate:delegate]; } + (void)requestHistoryMessage:(int)identify group:(NSString *)groupID timestamp:(NSInteger)timestamp count:(int)count deleagate:(id)delegate { NSArray *keys, *values; if (timestamp > 0) { keys = @[@"user_id", @"group_id", @"timestamp", @"limit"]; values = @[[FKUserManager sharedManager].user.userID, [FLStringHelper replaceNilWithEmpty:groupID], [NSString stringWithFormat:@"%lu", timestamp], [NSString stringWithFormat:@"%d", count]]; } else { // keys = @[@"user_id", @"group_id", @"limit"]; // values= @[[FKUserManager sharedManager].user.userID, // [FLStringHelper replaceNilWithEmpty:groupID], // [NSString stringWithFormat:@"%d", count]]; keys = @[@"user_id", @"group_id"]; values= @[[FKUserManager sharedManager].user.userID, [FLStringHelper replaceNilWithEmpty:groupID]]; } NSString *itemJSONString = [FLRequestHelper JSONStringWithKeys:keys values:values]; NSMutableDictionary *para = [NSMutableDictionary dictionary]; [para setValue:itemJSONString forKey:@"group_chat_json"]; [para addEntriesFromDictionary:[FLRequestHelper commonParamater]]; NSString *URLString = [NSString stringWithFormat:@"%@/link-site/api/chat_log/find_group_chat_logs.json", [[FKServerUtil sharedInstance] apiServer]]; [[FLDataCenter sharedDataCenter] POST:URLString para:para identify:identify delegate:delegate]; } @end