Commit e540a135 authored by Achilles's avatar Achilles

fix bugs

parent e0684865
This diff is collapsed.
//
// VankePassengerFlowAPI.h
// vanke
//
// Created by xiaomi on 15/10/9.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "VankeBaseAPI.h"
@class PassengerFlow;
@class PassengerFlowResponse;
@interface VankePassengerFlowAPI : VankeBaseAPI
// 项目ID等于
@property (nonatomic, strong) NSString *projectEquals;
// 客流日期,默认为今天
@property (nonatomic, strong) NSString *passengerFlowDateEquals;
@end
// 项目销量
@interface PassengerFlow : BeeActiveObject
// 项目标识
@property (nonatomic, strong) NSString *projectId;
// 项目名称
@property (nonatomic, strong) NSString *projectName;
// 客流量
@property (nonatomic, strong) NSNumber *passengerFlowVolume;
// 客流日期
@property (nonatomic, strong) NSString *passengerFlowDate;
// 客流位置
@property (nonatomic, strong) NSString *passengerFlowPosition;
@end
// 响应
@interface PassengerFlowResponse : VankeResponse
@property (nonatomic, strong) NSArray *data;
-(int) dataCount;
-(NSArray*) getChartValues;
@end
\ No newline at end of file
//
// VankePassengerFlowAPI.m
// vanke
//
// Created by xiaomi on 15/10/9.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "VankePassengerFlowAPI.h"
#import "VankeUtil.h"
#import "PNChart.h"
#pragma VankePassengerFlowAPI
@implementation VankePassengerFlowAPI
@synthesize projectEquals;
@synthesize passengerFlowDateEquals;
-(void) route:(BeeMessage *)msg {
if (self.sending)
{
if (![self checkToQuery]) {
return;
}
[self http_get:@"/passenger/querypassenger"].PARAM(@"passengerFlowDateEquals", self.passengerFlowDateEquals).PARAM(@"projectEquals", self.projectEquals).TIMEOUT(10);
}
else if (self.succeed)
{
NSLog(@"response: %@", self.responseString);
self.serverResp = [PassengerFlowResponse objectFromDictionary: self.responseJSONDictionary];
if ( nil == self.serverResp )
{
self.failed = YES;
return;
}
}
}
-(BOOL) checkToQuery {
if ([VankeUtil isBlankString:self.projectEquals]) {
[self setClientError: @"项目标识不能为空"];
return NO;
}
if ([VankeUtil isBlankString:self.passengerFlowDateEquals]) {
[self setClientError: @"客流日期不能为空"];
return NO;
}
return YES;
}
@end
#pragma PassengerFlow
@implementation PassengerFlow
@synthesize projectId;
@synthesize projectName;
@synthesize passengerFlowDate;
@synthesize passengerFlowVolume;
@synthesize passengerFlowPosition;
@end
#pragma PassengerFlowResponse
@implementation PassengerFlowResponse
CONVERT_PROPERTY_CLASS(data, PassengerFlow)
@synthesize data = _data;
-(int) dataCount {
if (nil == _data) {
return 0;
} else {
return [_data count];
}
}
-(NSArray*) getChartValues {
NSMutableArray *items = [[NSMutableArray alloc] init];
if (nil == self.data) {
return items;
}
for (NSInteger i = 0; i < [_data count]; ++i) {
PassengerFlow *obj = [_data objectAtIndex:i];
PNPieChartDataItem *item = [PNPieChartDataItem new];
item.value = [obj.passengerFlowVolume floatValue];
item.textDescription = obj.passengerFlowPosition;
[items addObject: item];
}
return items;
}
@end
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
@end @end
// 项目销量 // 项目销量
@interface ProjectSaleVolume: BeeActiveObject @interface ProjectSaleVolume : BeeActiveObject
// 项目标识 // 项目标识
@property (nonatomic, strong) NSString *projectId; @property (nonatomic, strong) NSString *projectId;
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
@end @end
// 响应 // 响应
@interface ProjectSaleVolumeResponse: VankeResponse @interface ProjectSaleVolumeResponse : VankeResponse
@property (nonatomic, strong) NSArray *data; @property (nonatomic, strong) NSArray *data;
...@@ -58,4 +58,6 @@ ...@@ -58,4 +58,6 @@
// 取得指定维度的销售总额 // 取得指定维度的销售总额
-(NSNumber*) getSalesTotalAmount: (NSString*) dimension; -(NSNumber*) getSalesTotalAmount: (NSString*) dimension;
-(NSArray*) getChartValues: (NSString*) dimension;
@end @end
\ No newline at end of file
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#import "VankeSaleVolumeAPI.h" #import "VankeSaleVolumeAPI.h"
#import "VankeUtil.h" #import "VankeUtil.h"
#import "PNChart.h"
#pragma VankeSaleVolumeAPI #pragma VankeSaleVolumeAPI
...@@ -130,6 +131,24 @@ NSMutableDictionary *dimValues; ...@@ -130,6 +131,24 @@ NSMutableDictionary *dimValues;
return [[NSNumber alloc] initWithDouble:total]; return [[NSNumber alloc] initWithDouble:total];
} }
-(NSArray*) getChartValues: (NSString*) dimension {
NSMutableArray *items = [[NSMutableArray alloc] init];
NSArray *ary = [self getSalesInfo:dimension];
if (nil == ary) {
return items;
}
for (NSInteger i = 0; i < [ary count]; ++i) {
ProjectSaleVolume *obj = [ary objectAtIndex:i];
PNPieChartDataItem *item = [PNPieChartDataItem new];
item.value = [obj.amount floatValue];
item.textDescription = obj.dimensionValue;
[items addObject: item];
}
return items;
}
@end @end
......
//
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/
//
//
//
// title: Dribbble
// author: http://dribbble.com/api
// date: 2014-01-23 08:47:42 +0000
//
#import "Bee.h"
#pragma mark - enums
#define LIST_EVERYONE @"everyone"
#define LIST_POPULAR @"popular"
#define LIST_DEBUTS @"debuts"
#pragma mark - models
@class COMMENT;
@class PLAYER;
@class SHOT;
@interface COMMENT : BeeActiveObject
@property (nonatomic, retain) NSString * body;
@property (nonatomic, retain) NSString * created_at;
@property (nonatomic, retain) NSNumber * likes_count;
@property (nonatomic, retain) PLAYER * player;
@property (nonatomic, retain) NSNumber * id;
@end
@interface PLAYER : BeeActiveObject
@property (nonatomic, retain) NSString * avatar_url;
@property (nonatomic, retain) NSNumber * comments_count;
@property (nonatomic, retain) NSNumber * comments_received_count;
@property (nonatomic, retain) NSString * created_at;
@property (nonatomic, retain) NSObject * drafted_by_player_id;
@property (nonatomic, retain) NSNumber * draftees_count;
@property (nonatomic, retain) NSNumber * followers_count;
@property (nonatomic, retain) NSNumber * following_count;
@property (nonatomic, retain) NSNumber * likes_count;
@property (nonatomic, retain) NSNumber * likes_received_count;
@property (nonatomic, retain) NSString * location;
@property (nonatomic, retain) NSString * name;
@property (nonatomic, retain) NSNumber * rebounds_count;
@property (nonatomic, retain) NSNumber * rebounds_received_count;
@property (nonatomic, retain) NSNumber * shots_count;
@property (nonatomic, retain) NSString * twitter_screen_name;
@property (nonatomic, retain) NSString * url;
@property (nonatomic, retain) NSString * username;
@property (nonatomic, retain) NSNumber * id;
@end
@interface SHOT : BeeActiveObject
@property (nonatomic, retain) NSNumber * comments_count;
@property (nonatomic, retain) NSString * created_at;
@property (nonatomic, retain) NSNumber * height;
@property (nonatomic, retain) NSString * image_teaser_url;
@property (nonatomic, retain) NSString * image_url;
@property (nonatomic, retain) NSNumber * likes_count;
@property (nonatomic, retain) PLAYER * player;
@property (nonatomic, retain) NSNumber * rebound_source_id;
@property (nonatomic, retain) NSNumber * rebounds_count;
@property (nonatomic, retain) NSString * short_url;
@property (nonatomic, retain) NSString * title;
@property (nonatomic, retain) NSString * url;
@property (nonatomic, retain) NSNumber * views_count;
@property (nonatomic, retain) NSNumber * width;
@property (nonatomic, retain) NSNumber * id;
@end
#pragma mark - controllers
#pragma mark - GET /players/:id
@interface API_PLAYERS_ID : BeeAPI
@property (nonatomic, retain) NSString * id;
@property (nonatomic, retain) PLAYER * resp;
@end
#pragma mark - GET /players/:id/draftees
@interface RESP_PLAYERS_ID_DRAFTEES : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * pages;
@property (nonatomic, retain) NSNumber * per_page;
@property (nonatomic, retain) NSArray * players;
@property (nonatomic, retain) NSNumber * total;
@end
@interface API_PLAYERS_ID_DRAFTEES : BeeAPI
@property (nonatomic, retain) NSString * id;
@property (nonatomic, retain) RESP_PLAYERS_ID_DRAFTEES * resp;
@end
#pragma mark - GET /players/:id/followers
@interface RESP_PLAYERS_ID_FOLLOWERS : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * pages;
@property (nonatomic, retain) NSNumber * per_page;
@property (nonatomic, retain) NSArray * players;
@property (nonatomic, retain) NSNumber * total;
@end
@interface API_PLAYERS_ID_FOLLOWERS : BeeAPI
@property (nonatomic, retain) NSString * id;
@property (nonatomic, retain) RESP_PLAYERS_ID_FOLLOWERS * resp;
@end
#pragma mark - GET /players/:id/following
@interface RESP_PLAYERS_ID_FOLLOWING : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * pages;
@property (nonatomic, retain) NSNumber * per_page;
@property (nonatomic, retain) NSArray * players;
@property (nonatomic, retain) NSNumber * total;
@end
@interface API_PLAYERS_ID_FOLLOWING : BeeAPI
@property (nonatomic, retain) NSString * id;
@property (nonatomic, retain) RESP_PLAYERS_ID_FOLLOWING * resp;
@end
#pragma mark - GET /players/:id/shots
@interface REQ_PLAYERS_ID_SHOTS : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * per_page;
@end
@interface RESP_PLAYERS_ID_SHOTS : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * pages;
@property (nonatomic, retain) NSNumber * per_page;
@property (nonatomic, retain) NSArray * shots;
@property (nonatomic, retain) NSNumber * total;
@end
@interface API_PLAYERS_ID_SHOTS : BeeAPI
@property (nonatomic, retain) NSString * id;
@property (nonatomic, retain) REQ_PLAYERS_ID_SHOTS * req;
@property (nonatomic, retain) RESP_PLAYERS_ID_SHOTS * resp;
@end
#pragma mark - GET /players/:id/shots/following
@interface REQ_PLAYERS_ID_SHOTS_FOLLOWING : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * per_page;
@end
@interface RESP_PLAYERS_ID_SHOTS_FOLLOWING : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * pages;
@property (nonatomic, retain) NSNumber * per_page;
@property (nonatomic, retain) NSArray * shots;
@property (nonatomic, retain) NSNumber * total;
@end
@interface API_PLAYERS_ID_SHOTS_FOLLOWING : BeeAPI
@property (nonatomic, retain) NSString * id;
@property (nonatomic, retain) REQ_PLAYERS_ID_SHOTS_FOLLOWING * req;
@property (nonatomic, retain) RESP_PLAYERS_ID_SHOTS_FOLLOWING * resp;
@end
#pragma mark - GET /players/:id/shots/likes
@interface REQ_PLAYERS_ID_SHOTS_LIKES : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * per_page;
@end
@interface RESP_PLAYERS_ID_SHOTS_LIKES : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * pages;
@property (nonatomic, retain) NSNumber * per_page;
@property (nonatomic, retain) NSArray * shots;
@property (nonatomic, retain) NSNumber * total;
@end
@interface API_PLAYERS_ID_SHOTS_LIKES : BeeAPI
@property (nonatomic, retain) NSString * id;
@property (nonatomic, retain) REQ_PLAYERS_ID_SHOTS_LIKES * req;
@property (nonatomic, retain) RESP_PLAYERS_ID_SHOTS_LIKES * resp;
@end
#pragma mark - GET /shots/:id
@interface API_SHOTS_ID : BeeAPI
@property (nonatomic, retain) NSString * id;
@property (nonatomic, retain) SHOT * resp;
@end
#pragma mark - GET /shots/:id/comments
@interface REQ_SHOTS_ID_COMMENTS : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * per_page;
@end
@interface RESP_SHOTS_ID_COMMENTS : BeeActiveObject
@property (nonatomic, retain) NSArray * comments;
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * pages;
@property (nonatomic, retain) NSNumber * per_page;
@property (nonatomic, retain) NSNumber * total;
@end
@interface API_SHOTS_ID_COMMENTS : BeeAPI
@property (nonatomic, retain) NSString * id;
@property (nonatomic, retain) REQ_SHOTS_ID_COMMENTS * req;
@property (nonatomic, retain) RESP_SHOTS_ID_COMMENTS * resp;
@end
#pragma mark - GET /shots/:id/rebounds
@interface RESP_SHOTS_ID_REBOUNDS : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * pages;
@property (nonatomic, retain) NSNumber * per_page;
@property (nonatomic, retain) NSArray * shots;
@property (nonatomic, retain) NSNumber * total;
@end
@interface API_SHOTS_ID_REBOUNDS : BeeAPI
@property (nonatomic, retain) NSString * id;
@property (nonatomic, retain) RESP_SHOTS_ID_REBOUNDS * resp;
@end
#pragma mark - GET /shots/:list
@interface REQ_SHOTS_LIST : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * per_page;
@end
@interface RESP_SHOTS_LIST : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * pages;
@property (nonatomic, retain) NSNumber * per_page;
@property (nonatomic, retain) NSArray * shots;
@property (nonatomic, retain) NSNumber * total;
@end
@interface API_SHOTS_LIST : BeeAPI
@property (nonatomic, retain) NSString * list;
@property (nonatomic, retain) REQ_SHOTS_LIST * req;
@property (nonatomic, retain) RESP_SHOTS_LIST * resp;
@end
#pragma mark - config
@interface ServerConfig : NSObject
AS_SINGLETON( ServerConfig )
AS_INT( CONFIG_DEVELOPMENT )
AS_INT( CONFIG_TEST )
AS_INT( CONFIG_PRODUCTION )
@property (nonatomic, assign) NSUInteger config;
@property (nonatomic, readonly) NSString * url;
@property (nonatomic, readonly) NSString * testUrl;
@property (nonatomic, readonly) NSString * productionUrl;
@property (nonatomic, readonly) NSString * developmentUrl;
@end
This diff is collapsed.
# Dribbble
====
Create date:|2014-01-23
-|-
Author:|http://dribbble.com/api
Website:|none
### Configuration
====
Environment|IP address
-|-
Development:|api.dribbble.com
Testing:|api.dribbble.com
Production:|api.dribbble.com
### API
====
#### Players
* __[/players/:id](/players/:id)__
___(null)___
+ ___Request___
Name|Type
-|-
+ ___Response___
Name|Type
-|-
RESP_PLAYERS_ID|___PLAYER*___
* __[/players/:id/draftees](/players/:id/draftees)__
___(null)___
+ ___Request___
Name|Type
-|-
+ ___Response___
Name|Type
-|-
page|___INT___
pages|___INT___
per_page|___INT___
players|___[PLAYER*]___
total|___INT___
* __[/players/:id/followers](/players/:id/followers)__
___(null)___
+ ___Request___
Name|Type
-|-
+ ___Response___
Name|Type
-|-
page|___INT___
pages|___INT___
per_page|___INT___
players|___[PLAYER*]___
total|___INT___
* __[/players/:id/following](/players/:id/following)__
___(null)___
+ ___Request___
Name|Type
-|-
+ ___Response___
Name|Type
-|-
page|___INT___
pages|___INT___
per_page|___INT___
players|___[PLAYER*]___
total|___INT___
* __[/players/:id/shots](/players/:id/shots)__
___(null)___
+ ___Request___
Name|Type
-|-
page|___INT___
per_page|___INT___
+ ___Response___
Name|Type
-|-
page|___INT___
pages|___INT___
per_page|___INT___
shots|___[SHOT*]___
total|___INT___
* __[/players/:id/shots/following](/players/:id/shots/following)__
___(null)___
+ ___Request___
Name|Type
-|-
page|___INT___
per_page|___INT___
+ ___Response___
Name|Type
-|-
page|___INT___
pages|___INT___
per_page|___INT___
shots|___[SHOT*]___
total|___INT___
* __[/players/:id/shots/likes](/players/:id/shots/likes)__
___(null)___
+ ___Request___
Name|Type
-|-
page|___INT___
per_page|___INT___
+ ___Response___
Name|Type
-|-
page|___INT___
pages|___INT___
per_page|___INT___
shots|___[SHOT*]___
total|___INT___
#### Shots
* __[/shots/:id](/shots/:id)__
___(null)___
+ ___Request___
Name|Type
-|-
+ ___Response___
Name|Type
-|-
RESP_SHOTS_ID|___SHOT*___
* __[/shots/:id/comments](/shots/:id/comments)__
___(null)___
+ ___Request___
Name|Type
-|-
page|___INT___
per_page|___INT___
+ ___Response___
Name|Type
-|-
comments|___[COMMENT*]___
page|___INT___
pages|___INT___
per_page|___INT___
total|___INT___
* __[/shots/:id/rebounds](/shots/:id/rebounds)__
___(null)___
+ ___Request___
Name|Type
-|-
+ ___Response___
Name|Type
-|-
page|___INT___
pages|___INT___
per_page|___INT___
shots|___[SHOT*]___
total|___INT___
* __[/shots/:list](/shots/:list)__
___(null)___
+ ___Request___
Name|Type
-|-
page|___INT___
per_page|___INT___
+ ___Response___
Name|Type
-|-
page|___INT___
pages|___INT___
per_page|___INT___
shots|___[SHOT*]___
total|___INT___
### Model
====
* __COMMENT__
Name|Type
-|-
body|___TEXT___
created_at|___TEXT___
likes_count|___INT___
player|___PLAYER*___
id|___INT___
* __PLAYER__
Name|Type
-|-
avatar_url|___TEXT___
comments_count|___INT___
comments_received_count|___INT___
created_at|___TEXT___
drafted_by_player_id|-
draftees_count|___INT___
followers_count|___INT___
following_count|___INT___
likes_count|___INT___
likes_received_count|___INT___
location|___TEXT___
name|___TEXT___
rebounds_count|___INT___
rebounds_received_count|___INT___
shots_count|___INT___
twitter_screen_name|___TEXT___
url|___TEXT___
username|___TEXT___
id|___INT___
* __SHOT__
Name|Type
-|-
comments_count|___INT___
created_at|___TEXT___
height|___INT___
image_teaser_url|___TEXT___
image_url|___TEXT___
likes_count|___INT___
player|___PLAYER*___
rebound_source_id|___INT___
rebounds_count|___INT___
short_url|___TEXT___
title|___TEXT___
url|___TEXT___
views_count|___INT___
width|___INT___
id|___INT___
digraph Protocol
{
graph
[
rankdir = LR;
label = "(null)";
ratio = "auto";
splines = curved;
];
node
[
fontname = melon;
fontsize = 14;
shape = box;
];
subgraph cluster_enums
{
label = "";
style = stroke;
color = white;
// @enum LIST
"LIST"
[
color = orange;
style = stroke;
shape = record;
label = "<name> 枚举 LIST| <EVERYONE> EVERYONE = \"everyone\"| <POPULAR> POPULAR = \"popular\"| <DEBUTS> DEBUTS = \"debuts\"";
];
};
subgraph cluster_models
{
label = "";
style = stroke;
color = white;
// @interface COMMENT
"COMMENT"
[
color = red;
style = stroke;
shape = record;
label = "<name> 数据表 COMMENT | <body> body TEXT| <created_at> created_at TEXT| <likes_count> likes_count INT| <player> player (PLAYER*)| <id> id INT";
];
"COMMENT":player -> "PLAYER":name
[
color = "grey25";
fontcolor = grey20;
];
// @interface PLAYER
"PLAYER"
[
color = red;
style = stroke;
shape = record;
label = "<name> 数据表 PLAYER | <avatar_url> avatar_url TEXT| <comments_count> comments_count INT| <comments_received_count> comments_received_count INT| <created_at> created_at TEXT| <drafted_by_player_id> drafted_by_player_id *| <draftees_count> draftees_count INT| <followers_count> followers_count INT| <following_count> following_count INT| <likes_count> likes_count INT| <likes_received_count> likes_received_count INT| <location> location TEXT| <name> name TEXT| <rebounds_count> rebounds_count INT| <rebounds_received_count> rebounds_received_count INT| <shots_count> shots_count INT| <twitter_screen_name> twitter_screen_name TEXT| <url> url TEXT| <username> username TEXT| <id> id INT";
];
// @interface SHOT
"SHOT"
[
color = red;
style = stroke;
shape = record;
label = "<name> 数据表 SHOT | <comments_count> comments_count INT| <created_at> created_at TEXT| <height> height INT| <image_teaser_url> image_teaser_url TEXT| <image_url> image_url TEXT| <likes_count> likes_count INT| <player> player (PLAYER*)| <rebound_source_id> rebound_source_id INT| <rebounds_count> rebounds_count INT| <short_url> short_url TEXT| <title> title TEXT| <url> url TEXT| <views_count> views_count INT| <width> width INT| <id> id INT";
];
"SHOT":player -> "PLAYER":name
[
color = "grey25";
fontcolor = grey20;
];
}
}
//
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/
//
//
//
// title: Dribbble
// author: http://dribbble.com/api
// date: 2014-01-23 16:36:00 +0000
//
#import "Bee.h"
#pragma mark - enums
#define LIST_EVERYONE @"everyone"
#define LIST_POPULAR @"popular"
#define LIST_DEBUTS @"debuts"
#pragma mark - models
@class COMMENT;
@class PLAYER;
@class SHOT;
@interface COMMENT : BeeActiveObject
@property (nonatomic, retain) NSString * body;
@property (nonatomic, retain) NSString * created_at;
@property (nonatomic, retain) NSNumber * likes_count;
@property (nonatomic, retain) PLAYER * player;
@property (nonatomic, retain) NSNumber * id;
@end
@interface PLAYER : BeeActiveObject
@property (nonatomic, retain) NSString * avatar_url;
@property (nonatomic, retain) NSNumber * comments_count;
@property (nonatomic, retain) NSNumber * comments_received_count;
@property (nonatomic, retain) NSString * created_at;
@property (nonatomic, retain) NSObject * drafted_by_player_id;
@property (nonatomic, retain) NSNumber * draftees_count;
@property (nonatomic, retain) NSNumber * followers_count;
@property (nonatomic, retain) NSNumber * following_count;
@property (nonatomic, retain) NSNumber * likes_count;
@property (nonatomic, retain) NSNumber * likes_received_count;
@property (nonatomic, retain) NSString * location;
@property (nonatomic, retain) NSString * name;
@property (nonatomic, retain) NSNumber * rebounds_count;
@property (nonatomic, retain) NSNumber * rebounds_received_count;
@property (nonatomic, retain) NSNumber * shots_count;
@property (nonatomic, retain) NSString * twitter_screen_name;
@property (nonatomic, retain) NSString * url;
@property (nonatomic, retain) NSString * username;
@property (nonatomic, retain) NSNumber * id;
@end
@interface SHOT : BeeActiveObject
@property (nonatomic, retain) NSNumber * comments_count;
@property (nonatomic, retain) NSString * created_at;
@property (nonatomic, retain) NSNumber * height;
@property (nonatomic, retain) NSString * image_teaser_url;
@property (nonatomic, retain) NSString * image_url;
@property (nonatomic, retain) NSNumber * likes_count;
@property (nonatomic, retain) PLAYER * player;
@property (nonatomic, retain) NSNumber * rebound_source_id;
@property (nonatomic, retain) NSNumber * rebounds_count;
@property (nonatomic, retain) NSString * short_url;
@property (nonatomic, retain) NSString * title;
@property (nonatomic, retain) NSString * url;
@property (nonatomic, retain) NSNumber * views_count;
@property (nonatomic, retain) NSNumber * width;
@property (nonatomic, retain) NSNumber * id;
@end
#pragma mark - controllers
#pragma mark - GET /players/:id
@interface API_PLAYERS_ID : BeeAPI
@property (nonatomic, retain) NSString * id;
@property (nonatomic, retain) PLAYER * resp;
@end
#pragma mark - GET /players/:id/draftees
@interface RESP_PLAYERS_ID_DRAFTEES : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * pages;
@property (nonatomic, retain) NSNumber * per_page;
@property (nonatomic, retain) NSArray * players;
@property (nonatomic, retain) NSNumber * total;
@end
@interface API_PLAYERS_ID_DRAFTEES : BeeAPI
@property (nonatomic, retain) NSString * id;
@property (nonatomic, retain) RESP_PLAYERS_ID_DRAFTEES * resp;
@end
#pragma mark - GET /players/:id/followers
@interface RESP_PLAYERS_ID_FOLLOWERS : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * pages;
@property (nonatomic, retain) NSNumber * per_page;
@property (nonatomic, retain) NSArray * players;
@property (nonatomic, retain) NSNumber * total;
@end
@interface API_PLAYERS_ID_FOLLOWERS : BeeAPI
@property (nonatomic, retain) NSString * id;
@property (nonatomic, retain) RESP_PLAYERS_ID_FOLLOWERS * resp;
@end
#pragma mark - GET /players/:id/following
@interface RESP_PLAYERS_ID_FOLLOWING : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * pages;
@property (nonatomic, retain) NSNumber * per_page;
@property (nonatomic, retain) NSArray * players;
@property (nonatomic, retain) NSNumber * total;
@end
@interface API_PLAYERS_ID_FOLLOWING : BeeAPI
@property (nonatomic, retain) NSString * id;
@property (nonatomic, retain) RESP_PLAYERS_ID_FOLLOWING * resp;
@end
#pragma mark - GET /players/:id/shots
@interface REQ_PLAYERS_ID_SHOTS : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * per_page;
@end
@interface RESP_PLAYERS_ID_SHOTS : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * pages;
@property (nonatomic, retain) NSNumber * per_page;
@property (nonatomic, retain) NSArray * shots;
@property (nonatomic, retain) NSNumber * total;
@end
@interface API_PLAYERS_ID_SHOTS : BeeAPI
@property (nonatomic, retain) NSString * id;
@property (nonatomic, retain) REQ_PLAYERS_ID_SHOTS * req;
@property (nonatomic, retain) RESP_PLAYERS_ID_SHOTS * resp;
@end
#pragma mark - GET /players/:id/shots/following
@interface REQ_PLAYERS_ID_SHOTS_FOLLOWING : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * per_page;
@end
@interface RESP_PLAYERS_ID_SHOTS_FOLLOWING : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * pages;
@property (nonatomic, retain) NSNumber * per_page;
@property (nonatomic, retain) NSArray * shots;
@property (nonatomic, retain) NSNumber * total;
@end
@interface API_PLAYERS_ID_SHOTS_FOLLOWING : BeeAPI
@property (nonatomic, retain) NSString * id;
@property (nonatomic, retain) REQ_PLAYERS_ID_SHOTS_FOLLOWING * req;
@property (nonatomic, retain) RESP_PLAYERS_ID_SHOTS_FOLLOWING * resp;
@end
#pragma mark - GET /players/:id/shots/likes
@interface REQ_PLAYERS_ID_SHOTS_LIKES : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * per_page;
@end
@interface RESP_PLAYERS_ID_SHOTS_LIKES : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * pages;
@property (nonatomic, retain) NSNumber * per_page;
@property (nonatomic, retain) NSArray * shots;
@property (nonatomic, retain) NSNumber * total;
@end
@interface API_PLAYERS_ID_SHOTS_LIKES : BeeAPI
@property (nonatomic, retain) NSString * id;
@property (nonatomic, retain) REQ_PLAYERS_ID_SHOTS_LIKES * req;
@property (nonatomic, retain) RESP_PLAYERS_ID_SHOTS_LIKES * resp;
@end
#pragma mark - GET /shots/:id
@interface API_SHOTS_ID : BeeAPI
@property (nonatomic, retain) NSString * id;
@property (nonatomic, retain) SHOT * resp;
@end
#pragma mark - GET /shots/:id/comments
@interface REQ_SHOTS_ID_COMMENTS : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * per_page;
@end
@interface RESP_SHOTS_ID_COMMENTS : BeeActiveObject
@property (nonatomic, retain) NSArray * comments;
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * pages;
@property (nonatomic, retain) NSNumber * per_page;
@property (nonatomic, retain) NSNumber * total;
@end
@interface API_SHOTS_ID_COMMENTS : BeeAPI
@property (nonatomic, retain) NSString * id;
@property (nonatomic, retain) REQ_SHOTS_ID_COMMENTS * req;
@property (nonatomic, retain) RESP_SHOTS_ID_COMMENTS * resp;
@end
#pragma mark - GET /shots/:id/rebounds
@interface RESP_SHOTS_ID_REBOUNDS : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * pages;
@property (nonatomic, retain) NSNumber * per_page;
@property (nonatomic, retain) NSArray * shots;
@property (nonatomic, retain) NSNumber * total;
@end
@interface API_SHOTS_ID_REBOUNDS : BeeAPI
@property (nonatomic, retain) NSString * id;
@property (nonatomic, retain) RESP_SHOTS_ID_REBOUNDS * resp;
@end
#pragma mark - GET /shots/:list
@interface REQ_SHOTS_LIST : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * per_page;
@end
@interface RESP_SHOTS_LIST : BeeActiveObject
@property (nonatomic, retain) NSNumber * page;
@property (nonatomic, retain) NSNumber * pages;
@property (nonatomic, retain) NSNumber * per_page;
@property (nonatomic, retain) NSArray * shots;
@property (nonatomic, retain) NSNumber * total;
@end
@interface API_SHOTS_LIST : BeeAPI
@property (nonatomic, retain) NSString * list;
@property (nonatomic, retain) REQ_SHOTS_LIST * req;
@property (nonatomic, retain) RESP_SHOTS_LIST * resp;
@end
#pragma mark - config
@interface ServerConfig : NSObject
AS_SINGLETON( ServerConfig )
AS_INT( CONFIG_DEVELOPMENT )
AS_INT( CONFIG_TEST )
AS_INT( CONFIG_PRODUCTION )
@property (nonatomic, assign) NSUInteger config;
@property (nonatomic, readonly) NSString * url;
@property (nonatomic, readonly) NSString * testUrl;
@property (nonatomic, readonly) NSString * productionUrl;
@property (nonatomic, readonly) NSString * developmentUrl;
@end
This diff is collapsed.
digraph Protocol
{
graph
[
rankdir = LR;
label = "(null)";
ratio = "auto";
splines = curved;
];
node
[
fontname = melon;
fontsize = 14;
shape = box;
];
subgraph cluster_enums
{
label = "";
style = stroke;
color = white;
// @enum LIST
"LIST"
[
color = orange;
style = stroke;
shape = record;
label = "<name> 枚举 LIST| <EVERYONE> EVERYONE = \"everyone\"| <POPULAR> POPULAR = \"popular\"| <DEBUTS> DEBUTS = \"debuts\"";
];
};
subgraph cluster_models
{
label = "";
style = stroke;
color = white;
// @interface COMMENT
"COMMENT"
[
color = red;
style = stroke;
shape = record;
label = "<name> 数据表 COMMENT | <body> body TEXT| <created_at> created_at TEXT| <likes_count> likes_count INT| <player> player (PLAYER*)| <id> id INT";
];
"COMMENT":player -> "PLAYER":name
[
color = "grey25";
fontcolor = grey20;
];
// @interface PLAYER
"PLAYER"
[
color = red;
style = stroke;
shape = record;
label = "<name> 数据表 PLAYER | <avatar_url> avatar_url TEXT| <comments_count> comments_count INT| <comments_received_count> comments_received_count INT| <created_at> created_at TEXT| <drafted_by_player_id> drafted_by_player_id *| <draftees_count> draftees_count INT| <followers_count> followers_count INT| <following_count> following_count INT| <likes_count> likes_count INT| <likes_received_count> likes_received_count INT| <location> location TEXT| <name> name TEXT| <rebounds_count> rebounds_count INT| <rebounds_received_count> rebounds_received_count INT| <shots_count> shots_count INT| <twitter_screen_name> twitter_screen_name TEXT| <url> url TEXT| <username> username TEXT| <id> id INT";
];
// @interface SHOT
"SHOT"
[
color = red;
style = stroke;
shape = record;
label = "<name> 数据表 SHOT | <comments_count> comments_count INT| <created_at> created_at TEXT| <height> height INT| <image_teaser_url> image_teaser_url TEXT| <image_url> image_url TEXT| <likes_count> likes_count INT| <player> player (PLAYER*)| <rebound_source_id> rebound_source_id INT| <rebounds_count> rebounds_count INT| <short_url> short_url TEXT| <title> title TEXT| <url> url TEXT| <views_count> views_count INT| <width> width INT| <id> id INT";
];
"SHOT":player -> "PLAYER":name
[
color = "grey25";
fontcolor = grey20;
];
}
}
This diff is collapsed.
//
// VankePassengerFlowModel.h
// vanke
//
// Created by xiaomi on 15/10/9.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "Bee.h"
#import "VankeServerModel.h"
#import "VankePassengerFlowAPI.h"
@interface VankePassengerFlowModel : VankeServerModel
// 项目ID等于
@property (nonatomic, strong) NSString *projectEquals;
// 销量日期,默认为昨天
@property (nonatomic, strong) NSString *passengerFlowDateEquals;
-(PassengerFlowResponse*) getServerResp;
@end
//
// VankePassengerFlowModel.m
// vanke
//
// Created by xiaomi on 15/10/9.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "VankePassengerFlowModel.h"
@implementation VankePassengerFlowModel
@synthesize projectEquals = _projectEquals;
@synthesize passengerFlowDateEquals = _passengerFlowDateEquals;
-(PassengerFlowResponse*) getServerResp {
return (PassengerFlowResponse*) self.serverResp;
}
-(void) reload {
[VankePassengerFlowAPI cancel];
VankePassengerFlowAPI *api = [VankePassengerFlowAPI api];
@weakify(api);
@weakify(self);
api.projectEquals = self.projectEquals;
api.passengerFlowDateEquals = self.passengerFlowDateEquals;
// 清空结果
self.serverResp = nil;
api.whenSucceed = ^{
@normalize(api);
@normalize(self);
if (api.sending) {
[self sendUISignal:self.RELOADING];
} else {
if (api.succeed) {
if (nil == api.serverResp) {
api.failed = YES;
} else {
self.serverResp = api.serverResp;
}
}
[self sendUISignal:self.RELOADED];
}
};
api.whenFailed = ^{
@normalize(api);
@normalize(self);
self.serverResp = [PassengerFlowResponse initWith:NO message:nil == api.errorDesc ? @"网络异常" : api.errorDesc];
[self sendUISignal:self.RELOADED];
};
[api send];
}
@end
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// // \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// // \/_____/ \/_____/ \/_____/
//
// Powered by BeeFramework
//
//
// NoDataCell_iPhoneCell.h
// vanke
//
// Created by xiaomi on 15/10/18.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "Bee.h"
#pragma mark -
@interface NoDataCell_iPhoneCell : BeeUICell
AS_OUTLET( BeeUILabel, lblMsg )
@end
This diff is collapsed.
This diff is collapsed.
#import "Bee.h"
#import "VankeBaseBoard.h"
#import "VankeProjectListAPI.h"
#import "VankePassengerFlowModel.h"
#pragma mark -
@interface VankePassengerDetailBoard_iPhone : VankeBaseBoard
@property (strong, nonatomic) ProjectCategory* data;
@property (strong, nonatomic) NSString *passengerFlowDate;
AS_MODEL( VankePassengerFlowModel, passengerFlowModel );
AS_OUTLET( BeeUIScrollView, list );
@end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment