Nav apraksta

FKExploreRequest.m 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //
  2. // FKExploreRequest.m
  3. // FirstLink
  4. //
  5. // Created by ascii on 16/2/16.
  6. // Copyright © 2016年 FirstLink. All rights reserved.
  7. //
  8. #import "FKExploreRequest.h"
  9. @implementation FKExploreRequest
  10. + (void)requestExploreTopicTags:(int)identify
  11. delegate:(id<FLNetworkDelegate>)delegate {
  12. NSString *URLString = [NSString stringWithFormat:@"%@/link-site/api/tag/find_topic_tags.json", [[FKServerUtil sharedInstance] apiServer]];
  13. [[FLDataCenter sharedDataCenter] POST:URLString
  14. para:[FLRequestHelper commonParamaterForLogin]
  15. identify:identify
  16. delegate:delegate];
  17. }
  18. + (void)requestExploreTopicDetail:(int)identify
  19. tagID:(NSString *)tagID
  20. startRow:(NSString *)startRow
  21. pageSize:(NSString *)pageSize
  22. delegate:(id<FLNetworkDelegate>)delegate
  23. userInfo:(NSDictionary *)userInfo {
  24. if (!tagID || !startRow || !pageSize) {
  25. return;
  26. }
  27. NSString *urlString = [NSString stringWithFormat:@"%@/link-site/api/product/find_products_for_discovery.json", [[FKServerUtil sharedInstance] apiServer]];
  28. NSString *itemJson = [FLRequestHelper JSONStringWithKeys:@[@"id", @"start_row", @"page_size"]
  29. values:@[tagID, startRow, pageSize]];
  30. NSMutableDictionary *dictM = [NSMutableDictionary dictionary];
  31. [dictM setValue:itemJson forKey:@"tag_json"];
  32. [dictM addEntriesFromDictionary:[FLRequestHelper commonParamater]];
  33. [[FLDataCenter sharedDataCenter] POST:urlString para:dictM identify:identify delegate:delegate userInfo:userInfo];
  34. }
  35. @end