GitHubUser.h 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. //
  2. // GitHubUser.h
  3. // ModelBenchmark
  4. //
  5. // Created by ibireme on 15/9/18.
  6. // Copyright (c) 2015 ibireme. All rights reserved.
  7. //
  8. #import <YYModel/YYModel.h>
  9. #import <Mantle/Mantle.h>
  10. #import <JSONModel/JSONModelLib.h>
  11. #import <FastEasyMapping/FastEasyMapping.h>
  12. #import <MJExtension/MJExtension.h>
  13. // https://api.github.com/users/facebook
  14. /// manually GHUser
  15. @interface GHUser : NSObject <NSCoding>
  16. @property (nonatomic, strong) NSString *login;
  17. @property (nonatomic, assign) UInt64 userID;
  18. @property (nonatomic, strong) NSString *avatarURL;
  19. @property (nonatomic, strong) NSString *gravatarID;
  20. @property (nonatomic, strong) NSString *url;
  21. @property (nonatomic, strong) NSString *htmlURL;
  22. @property (nonatomic, strong) NSString *followersURL;
  23. @property (nonatomic, strong) NSString *followingURL;
  24. @property (nonatomic, strong) NSString *gistsURL;
  25. @property (nonatomic, strong) NSString *starredURL;
  26. @property (nonatomic, strong) NSString *subscriptionsURL;
  27. @property (nonatomic, strong) NSString *organizationsURL;
  28. @property (nonatomic, strong) NSString *reposURL;
  29. @property (nonatomic, strong) NSString *eventsURL;
  30. @property (nonatomic, strong) NSString *receivedEventsURL;
  31. @property (nonatomic, strong) NSString *type;
  32. @property (nonatomic, assign) BOOL siteAdmin;
  33. @property (nonatomic, strong) NSString *name;
  34. @property (nonatomic, strong) NSString *company;
  35. @property (nonatomic, strong) NSString *blog;
  36. @property (nonatomic, strong) NSString *location;
  37. @property (nonatomic, strong) NSString *email;
  38. @property (nonatomic, strong) NSString *hireable;
  39. @property (nonatomic, strong) NSString *bio;
  40. @property (nonatomic, assign) UInt32 publicRepos;
  41. @property (nonatomic, assign) UInt32 publicGists;
  42. @property (nonatomic, assign) UInt32 followers;
  43. @property (nonatomic, assign) UInt32 following;
  44. @property (nonatomic, strong) NSDate *createdAt;
  45. @property (nonatomic, strong) NSDate *updatedAt;
  46. @property (nonatomic, strong) NSValue *test;
  47. - (instancetype)initWithJSONDictionary:(NSDictionary *)dictionary;
  48. - (NSDictionary *)convertToJSONDictionary;
  49. @end
  50. /// YYModel GHUser
  51. @interface YYGHUser : NSObject <NSCoding>
  52. @property (nonatomic, strong) NSString *login;
  53. @property (nonatomic, assign) UInt64 userID;
  54. @property (nonatomic, strong) NSString *avatarURL;
  55. @property (nonatomic, strong) NSString *gravatarID;
  56. @property (nonatomic, strong) NSString *url;
  57. @property (nonatomic, strong) NSString *htmlURL;
  58. @property (nonatomic, strong) NSString *followersURL;
  59. @property (nonatomic, strong) NSString *followingURL;
  60. @property (nonatomic, strong) NSString *gistsURL;
  61. @property (nonatomic, strong) NSString *starredURL;
  62. @property (nonatomic, strong) NSString *subscriptionsURL;
  63. @property (nonatomic, strong) NSString *organizationsURL;
  64. @property (nonatomic, strong) NSString *reposURL;
  65. @property (nonatomic, strong) NSString *eventsURL;
  66. @property (nonatomic, strong) NSString *receivedEventsURL;
  67. @property (nonatomic, strong) NSString *type;
  68. @property (nonatomic, assign) BOOL siteAdmin;
  69. @property (nonatomic, strong) NSString *name;
  70. @property (nonatomic, strong) NSString *company;
  71. @property (nonatomic, strong) NSString *blog;
  72. @property (nonatomic, strong) NSString *location;
  73. @property (nonatomic, strong) NSString *email;
  74. @property (nonatomic, strong) NSString *hireable;
  75. @property (nonatomic, strong) NSString *bio;
  76. @property (nonatomic, assign) UInt32 publicRepos;
  77. @property (nonatomic, assign) UInt32 publicGists;
  78. @property (nonatomic, assign) UInt32 followers;
  79. @property (nonatomic, assign) UInt32 following;
  80. @property (nonatomic, strong) NSDate *createdAt;
  81. @property (nonatomic, strong) NSDate *updatedAt;
  82. @property (nonatomic, strong) NSValue *test;
  83. @end
  84. /// JSONModel GHUser
  85. @interface JSGHUser : JSONModel
  86. @property (nonatomic, strong) NSString *login;
  87. @property (nonatomic, assign) UInt64 userID;
  88. @property (nonatomic, strong) NSString *avatarURL;
  89. @property (nonatomic, strong) NSString *gravatarID;
  90. @property (nonatomic, strong) NSString *url;
  91. @property (nonatomic, strong) NSString *htmlURL;
  92. @property (nonatomic, strong) NSString *followersURL;
  93. @property (nonatomic, strong) NSString *followingURL;
  94. @property (nonatomic, strong) NSString *gistsURL;
  95. @property (nonatomic, strong) NSString *starredURL;
  96. @property (nonatomic, strong) NSString *subscriptionsURL;
  97. @property (nonatomic, strong) NSString *organizationsURL;
  98. @property (nonatomic, strong) NSString *reposURL;
  99. @property (nonatomic, strong) NSString *eventsURL;
  100. @property (nonatomic, strong) NSString *receivedEventsURL;
  101. @property (nonatomic, strong) NSString *type;
  102. @property (nonatomic, assign) BOOL siteAdmin;
  103. @property (nonatomic, strong) NSString *name;
  104. @property (nonatomic, strong) NSString *company;
  105. @property (nonatomic, strong) NSString *blog;
  106. @property (nonatomic, strong) NSString *location;
  107. @property (nonatomic, strong) NSString *email;
  108. @property (nonatomic, strong) NSString *hireable;
  109. @property (nonatomic, strong) NSString *bio;
  110. @property (nonatomic, assign) unsigned publicRepos;
  111. @property (nonatomic, assign) unsigned publicGists;
  112. @property (nonatomic, assign) unsigned followers;
  113. @property (nonatomic, assign) unsigned following;
  114. @property (nonatomic, strong) NSDate *createdAt;
  115. @property (nonatomic, strong) NSDate *updatedAt;
  116. @property (nonatomic, strong) NSValue *test;
  117. // JSONModel doesn't support UInt32 in armv7... Replace UInt32 with unsigned
  118. @end
  119. /// Mantle GHUser
  120. @interface MTGHUser : MTLModel <MTLJSONSerializing>
  121. @property (nonatomic, strong) NSString *login;
  122. @property (nonatomic, assign) UInt64 userID;
  123. @property (nonatomic, strong) NSString *avatarURL;
  124. @property (nonatomic, strong) NSString *gravatarID;
  125. @property (nonatomic, strong) NSString *url;
  126. @property (nonatomic, strong) NSString *htmlURL;
  127. @property (nonatomic, strong) NSString *followersURL;
  128. @property (nonatomic, strong) NSString *followingURL;
  129. @property (nonatomic, strong) NSString *gistsURL;
  130. @property (nonatomic, strong) NSString *starredURL;
  131. @property (nonatomic, strong) NSString *subscriptionsURL;
  132. @property (nonatomic, strong) NSString *organizationsURL;
  133. @property (nonatomic, strong) NSString *reposURL;
  134. @property (nonatomic, strong) NSString *eventsURL;
  135. @property (nonatomic, strong) NSString *receivedEventsURL;
  136. @property (nonatomic, strong) NSString *type;
  137. @property (nonatomic, assign) BOOL siteAdmin;
  138. @property (nonatomic, strong) NSString *name;
  139. @property (nonatomic, strong) NSString *company;
  140. @property (nonatomic, strong) NSString *blog;
  141. @property (nonatomic, strong) NSString *location;
  142. @property (nonatomic, strong) NSString *email;
  143. @property (nonatomic, strong) NSString *hireable;
  144. @property (nonatomic, strong) NSString *bio;
  145. @property (nonatomic, assign) UInt32 publicRepos;
  146. @property (nonatomic, assign) UInt32 publicGists;
  147. @property (nonatomic, assign) UInt32 followers;
  148. @property (nonatomic, assign) UInt32 following;
  149. @property (nonatomic, strong) NSDate *createdAt;
  150. @property (nonatomic, strong) NSDate *updatedAt;
  151. @property (nonatomic, strong) NSValue *test;
  152. @end
  153. /// FastEasyMapping GHUser
  154. @interface FEGHUser : NSObject
  155. @property (nonatomic, strong) NSString *login;
  156. @property (nonatomic, assign) UInt64 userID;
  157. @property (nonatomic, strong) NSString *avatarURL;
  158. @property (nonatomic, strong) NSString *gravatarID;
  159. @property (nonatomic, strong) NSString *url;
  160. @property (nonatomic, strong) NSString *htmlURL;
  161. @property (nonatomic, strong) NSString *followersURL;
  162. @property (nonatomic, strong) NSString *followingURL;
  163. @property (nonatomic, strong) NSString *gistsURL;
  164. @property (nonatomic, strong) NSString *starredURL;
  165. @property (nonatomic, strong) NSString *subscriptionsURL;
  166. @property (nonatomic, strong) NSString *organizationsURL;
  167. @property (nonatomic, strong) NSString *reposURL;
  168. @property (nonatomic, strong) NSString *eventsURL;
  169. @property (nonatomic, strong) NSString *receivedEventsURL;
  170. @property (nonatomic, strong) NSString *type;
  171. @property (nonatomic, assign) BOOL siteAdmin;
  172. @property (nonatomic, strong) NSString *name;
  173. @property (nonatomic, strong) NSString *company;
  174. @property (nonatomic, strong) NSString *blog;
  175. @property (nonatomic, strong) NSString *location;
  176. @property (nonatomic, strong) NSString *email;
  177. @property (nonatomic, strong) NSString *hireable;
  178. @property (nonatomic, strong) NSString *bio;
  179. @property (nonatomic, assign) UInt32 publicRepos;
  180. @property (nonatomic, assign) UInt32 publicGists;
  181. @property (nonatomic, assign) UInt32 followers;
  182. @property (nonatomic, assign) UInt32 following;
  183. @property (nonatomic, strong) NSDate *createdAt;
  184. @property (nonatomic, strong) NSDate *updatedAt;
  185. @property (nonatomic, strong) NSValue *test;
  186. + (FEMMapping *)defaultMapping;
  187. @end
  188. /// MJExtension GHUser
  189. @interface MJGHUser : NSObject <NSCoding>
  190. @property (nonatomic, strong) NSString *login;
  191. @property (nonatomic, assign) UInt64 userID;
  192. @property (nonatomic, strong) NSString *avatarURL;
  193. @property (nonatomic, strong) NSString *gravatarID;
  194. @property (nonatomic, strong) NSString *url;
  195. @property (nonatomic, strong) NSString *htmlURL;
  196. @property (nonatomic, strong) NSString *followersURL;
  197. @property (nonatomic, strong) NSString *followingURL;
  198. @property (nonatomic, strong) NSString *gistsURL;
  199. @property (nonatomic, strong) NSString *starredURL;
  200. @property (nonatomic, strong) NSString *subscriptionsURL;
  201. @property (nonatomic, strong) NSString *organizationsURL;
  202. @property (nonatomic, strong) NSString *reposURL;
  203. @property (nonatomic, strong) NSString *eventsURL;
  204. @property (nonatomic, strong) NSString *receivedEventsURL;
  205. @property (nonatomic, strong) NSString *type;
  206. @property (nonatomic, assign) BOOL siteAdmin;
  207. @property (nonatomic, strong) NSString *name;
  208. @property (nonatomic, strong) NSString *company;
  209. @property (nonatomic, strong) NSString *blog;
  210. @property (nonatomic, strong) NSString *location;
  211. @property (nonatomic, strong) NSString *email;
  212. @property (nonatomic, strong) NSString *hireable;
  213. @property (nonatomic, strong) NSString *bio;
  214. @property (nonatomic, assign) UInt32 publicRepos;
  215. @property (nonatomic, assign) UInt32 publicGists;
  216. @property (nonatomic, assign) UInt32 followers;
  217. @property (nonatomic, assign) UInt32 following;
  218. @property (nonatomic, strong) NSDate *createdAt;
  219. @property (nonatomic, strong) NSDate *updatedAt;
  220. @property (nonatomic, strong) NSValue *test;
  221. @end