Skip to content

Commit

Permalink
go to lon long
Browse files Browse the repository at this point in the history
  • Loading branch information
vdemay committed Jul 11, 2012
1 parent 203b848 commit 4d16b53
Show file tree
Hide file tree
Showing 12 changed files with 61 additions and 62 deletions.
24 changes: 12 additions & 12 deletions ScoopItFramework/Classes/Model/SIPost.h
Expand Up @@ -34,7 +34,7 @@ typedef enum actions {
@protocol SIPostActionDelegate;

@interface SIPost : SIModel {
int lid;
long long lid;
NSString* content;
NSString* title;
SISource* source;
Expand Down Expand Up @@ -70,7 +70,7 @@ typedef enum actions {

}

@property (nonatomic) int lid;
@property (nonatomic) long long lid;
@property (nonatomic, retain) NSString* content;
@property (nonatomic, retain) NSString* title;
@property (nonatomic) int thanksCount;
Expand Down Expand Up @@ -98,29 +98,29 @@ typedef enum actions {
@property (nonatomic, retain) NSArray* tags;
@property (nonatomic, assign) id<SIPostActionDelegate> actionDelegate;

- (id) init:(SIScoopIt*) _scoopIt withLid:(int) _lid;
- (id) init:(SIScoopIt*) _scoopIt withLid:(long long) _lid;
- (void) getFromDictionary:(NSDictionary*) dic;

/*
* Accept a Post into a Topic
* Edit properties of the post before calling this method
*/
- (void) acceptToTopic:(int) topicLid;
- (void) acceptToTopic:(long long) topicLid;

/*
* Accept a Post into a Topic
* Edit properties of the post before calling this method
* You can also set sharers : see http://www.scoop.it/dev/api/1/types#sharer
*/
- (void) acceptToTopic:(int) topicLid andSharers:(NSString *) shareOn;
- (void) acceptToTopic:(long long) topicLid andSharers:(NSString *) shareOn;

/*
* Accept a Post into a Topic
* Edit properties of the post before calling this method
* You can also set sharers via an Array
* You can set a specific texy using property "specificText" in sharer it self
*/
- (void) acceptToTopic:(int) topicLid andSharersArray:(NSArray *) sharers;
- (void) acceptToTopic:(long long) topicLid andSharersArray:(NSArray *) sharers;

/*
* Refuse this post
Expand All @@ -139,7 +139,7 @@ typedef enum actions {
* The post need to be populated first
* Usefull information are : title / url / content / imageUrl
*/
- (void) createOn:(int) topicLid;
- (void) createOn:(long long) topicLid;

/*
* Create this post from scratch
Expand All @@ -148,7 +148,7 @@ typedef enum actions {
* You can also set sharers via an Array
* You can set a specific texy using property "specificText" in sharer it self
*/
- (void) createOn:(int) topicLid andSharersArray:(NSArray*) sharers;
- (void) createOn:(long long) topicLid andSharersArray:(NSArray*) sharers;

/*
* Create this post from scratch
Expand All @@ -157,14 +157,14 @@ typedef enum actions {
* topic
* You can also set sharers : see http://www.scoop.it/dev/api/1/types#sharer
*/
- (void) createOn:(int) topicLid andSharers:(NSString *) sharerOn;
- (void) createOn:(long long) topicLid andSharers:(NSString *) sharerOn;

/*
* Forward this post to another topic
* this action is equivalent to Accept but to another
* topic
*/
- (void) forwardTo:(int) topicLid;
- (void) forwardTo:(long long) topicLid;

/*
* Forward this post to another topic
Expand All @@ -173,15 +173,15 @@ typedef enum actions {
* You can also set sharers via an Array
* You can set a specific texy using property "specificText" in sharer it self
*/
- (void) forwardTo:(int) topicLid andSharersArray:(NSArray *) sharers;
- (void) forwardTo:(long long) topicLid andSharersArray:(NSArray *) sharers;

/*
* Forward this post to another topic
* this action is equivalent to Accept but to another
* topic
* You can also set sharers : see http://www.scoop.it/dev/api/1/types#sharer
*/
- (void) forwardTo:(int) topicLid andSharers:(NSString *) sharerOn;
- (void) forwardTo:(long long) topicLid andSharers:(NSString *) sharerOn;


/*
Expand Down
50 changes: 25 additions & 25 deletions ScoopItFramework/Classes/Model/SIPost.m
Expand Up @@ -49,7 +49,7 @@ @implementation SIPost

@synthesize actionDelegate;

- (id) init:(SIScoopIt*) _scoopIt withLid:(int) _lid
- (id) init:(SIScoopIt*) _scoopIt withLid:(long long) _lid
{
self = [super init];
if (self != nil) {
Expand All @@ -62,7 +62,7 @@ - (id) init:(SIScoopIt*) _scoopIt withLid:(int) _lid

-(void) getFromDictionary:(NSDictionary*) dic {
if (dic != nil) {
self.lid = [[dic objectForKey:@"id"] intValue];
self.lid = [[dic objectForKey:@"id"] longLongValue];
self.content = [dic objectForKey:@"content"];
self.title = [dic objectForKey:@"title"];
self.thanksCount = [[dic objectForKey:@"thanksCount"] intValue];
Expand Down Expand Up @@ -154,7 +154,7 @@ - (void) thanks {
OARequestParameter *actionParam = [[OARequestParameter alloc] initWithName:@"action"
value:@"thank"];
OARequestParameter *idParam = [[OARequestParameter alloc] initWithName:@"id"
value:[NSString stringWithFormat:@"%d", self.lid]];
value:[NSString stringWithFormat:@"%lld", self.lid]];
NSArray *params = [NSArray arrayWithObjects:actionParam, idParam, nil];
TT_RELEASE_SAFELY(actionParam);
TT_RELEASE_SAFELY(idParam);
Expand All @@ -173,7 +173,7 @@ - (void) pin {
TT_RELEASE_SAFELY(actionParam);

OARequestParameter *idParam = [[OARequestParameter alloc] initWithName:@"id"
value:[NSString stringWithFormat:@"%d",self.lid]];
value:[NSString stringWithFormat:@"%lld",self.lid]];
[params addObject:idParam];
TT_RELEASE_SAFELY(idParam);

Expand All @@ -197,7 +197,7 @@ - (void) commentWithMessage:(NSString*) message {
TT_RELEASE_SAFELY(actionParam);

OARequestParameter *idParam = [[OARequestParameter alloc] initWithName:@"id"
value:[NSString stringWithFormat:@"%d",self.lid]];
value:[NSString stringWithFormat:@"%lld",self.lid]];
[params addObject:idParam];
TT_RELEASE_SAFELY(idParam);

Expand Down Expand Up @@ -226,7 +226,7 @@ - (void) edit {
TT_RELEASE_SAFELY(actionParam);

OARequestParameter *idParam = [[OARequestParameter alloc] initWithName:@"id"
value:[NSString stringWithFormat:@"%d",self.lid]];
value:[NSString stringWithFormat:@"%lld",self.lid]];
[params addObject:idParam];
TT_RELEASE_SAFELY(idParam);

Expand Down Expand Up @@ -268,7 +268,7 @@ - (void) saveTags {
TT_RELEASE_SAFELY(actionParam);

OARequestParameter *idParam = [[OARequestParameter alloc] initWithName:@"id"
value:[NSString stringWithFormat:@"%d",self.lid]];
value:[NSString stringWithFormat:@"%lld",self.lid]];
[params addObject:idParam];
TT_RELEASE_SAFELY(idParam);

Expand Down Expand Up @@ -312,7 +312,7 @@ - (void) shareOn:(NSString *) shareOn {
TT_RELEASE_SAFELY(actionParam);

OARequestParameter *idParam = [[OARequestParameter alloc] initWithName:@"id"
value:[NSString stringWithFormat:@"%d",self.lid]];
value:[NSString stringWithFormat:@"%lld",self.lid]];
[params addObject:idParam];
TT_RELEASE_SAFELY(idParam);

Expand Down Expand Up @@ -340,7 +340,7 @@ - (void) refuseWithReason:(NSString*) reason {
TT_RELEASE_SAFELY(actionParam);

OARequestParameter *idParam = [[OARequestParameter alloc] initWithName:@"id"
value:[NSString stringWithFormat:@"%d",self.lid]];
value:[NSString stringWithFormat:@"%lld",self.lid]];
[params addObject:idParam];
TT_RELEASE_SAFELY(idParam);

Expand All @@ -357,15 +357,15 @@ - (void) refuseWithReason:(NSString*) reason {

/////////////////////////////////////////////////////////////////////////////////////

- (void) acceptToTopic:(int) topicLid {
- (void) acceptToTopic:(long) topicLid {
[self acceptToTopic:topicLid andSharers:nil];
}

- (void) acceptToTopic:(int) topicLid andSharersArray:(NSArray*) sharers {
- (void) acceptToTopic:(long) topicLid andSharersArray:(NSArray*) sharers {
[self acceptToTopic:topicLid andSharers:[SISharer getSharerFragmentFor:sharers]];
}

- (void) acceptToTopic:(int) topicLid andSharers:(NSString*) shareOn {
- (void) acceptToTopic:(long) topicLid andSharers:(NSString*) shareOn {
NSMutableArray *params = [[[NSMutableArray alloc] init] autorelease];

OARequestParameter *actionParam = [[OARequestParameter alloc] initWithName:@"action"
Expand All @@ -374,13 +374,13 @@ - (void) acceptToTopic:(int) topicLid andSharers:(NSString*) shareOn {
TT_RELEASE_SAFELY(actionParam);

OARequestParameter *idParam = [[OARequestParameter alloc] initWithName:@"id"
value:[NSString stringWithFormat:@"%d",self.lid]];
value:[NSString stringWithFormat:@"%lld",self.lid]];
[params addObject:idParam];
TT_RELEASE_SAFELY(idParam);


OARequestParameter *topicId = [[OARequestParameter alloc] initWithName:@"topicId"
value:[NSString stringWithFormat:@"%d",topicLid]];
value:[NSString stringWithFormat:@"%lld",topicLid]];
[params addObject:topicId];
TT_RELEASE_SAFELY(topicId);

Expand Down Expand Up @@ -417,15 +417,15 @@ - (void) acceptToTopic:(int) topicLid andSharers:(NSString*) shareOn {

/////////////////////////////////////////////////////////////////////////////////////

- (void) createOn:(int) topicLid {
- (void) createOn:(long long) topicLid {
[self createOn:topicLid andSharers:nil];
}

- (void) createOn:(int)topicLid andSharersArray:(NSArray *)sharers {
- (void) createOn:(long long)topicLid andSharersArray:(NSArray *)sharers {
[self createOn:topicLid andSharers:[SISharer getSharerFragmentFor:sharers]];
}

- (void) createOn:(int) topicLid andSharers:(NSString*) shareOn {
- (void) createOn:(long long) topicLid andSharers:(NSString*) shareOn {
NSMutableArray *params = [[[NSMutableArray alloc] init] autorelease];

OARequestParameter *actionParam = [[OARequestParameter alloc] initWithName:@"action"
Expand All @@ -435,14 +435,14 @@ - (void) createOn:(int) topicLid andSharers:(NSString*) shareOn {

if (self.lid) {
OARequestParameter *idParam = [[OARequestParameter alloc] initWithName:@"id"
value:[NSString stringWithFormat:@"%d",self.lid]];
value:[NSString stringWithFormat:@"%lld",self.lid]];
[params addObject:idParam];
TT_RELEASE_SAFELY(idParam);
}


OARequestParameter *topicId = [[OARequestParameter alloc] initWithName:@"topicId"
value:[NSString stringWithFormat:@"%d",topicLid]];
value:[NSString stringWithFormat:@"%lld",topicLid]];
[params addObject:topicId];
TT_RELEASE_SAFELY(topicId);

Expand Down Expand Up @@ -492,7 +492,7 @@ - (void) remove {
TT_RELEASE_SAFELY(actionParam);

OARequestParameter *idParam = [[OARequestParameter alloc] initWithName:@"id"
value:[NSString stringWithFormat:@"%d",self.lid]];
value:[NSString stringWithFormat:@"%lld",self.lid]];
[params addObject:idParam];
TT_RELEASE_SAFELY(idParam);

Expand All @@ -501,15 +501,15 @@ - (void) remove {

/////////////////////////////////////////////////////////////////////////////////////

- (void) forwardTo:(int) topicLid {
- (void) forwardTo:(long long) topicLid {
[self forwardTo:topicLid andSharers:nil];
}

- (void) forwardTo:(int)topicLid andSharersArray:(NSArray *)sharers {
- (void) forwardTo:(long long)topicLid andSharersArray:(NSArray *)sharers {
[self forwardTo:topicLid andSharers:[SISharer getSharerFragmentFor:sharers]];
}

- (void) forwardTo:(int) topicLid andSharers:(NSString*) shareOn {
- (void) forwardTo:(long long) topicLid andSharers:(NSString*) shareOn {
NSMutableArray *params = [[[NSMutableArray alloc] init] autorelease];

OARequestParameter *actionParam = [[OARequestParameter alloc] initWithName:@"action"
Expand All @@ -518,13 +518,13 @@ - (void) forwardTo:(int) topicLid andSharers:(NSString*) shareOn {
TT_RELEASE_SAFELY(actionParam);

OARequestParameter *idParam = [[OARequestParameter alloc] initWithName:@"id"
value:[NSString stringWithFormat:@"%d",self.lid]];
value:[NSString stringWithFormat:@"%lld",self.lid]];
[params addObject:idParam];
TT_RELEASE_SAFELY(idParam);


OARequestParameter *topicId = [[OARequestParameter alloc] initWithName:@"topicId"
value:[NSString stringWithFormat:@"%d",topicLid]];
value:[NSString stringWithFormat:@"%lld",topicLid]];
[params addObject:topicId];
TT_RELEASE_SAFELY(topicId);

Expand Down
4 changes: 2 additions & 2 deletions ScoopItFramework/Classes/Model/SIProfile.h
Expand Up @@ -15,7 +15,7 @@
@interface SIProfile : SIModel {
SIUser *_user;
SIStats *_stats;
int lid;
long long lid;


int nbCuratedPost;
Expand All @@ -26,7 +26,7 @@
}
@property (nonatomic, retain) SIUser* user;
@property (nonatomic, retain) SIStats* stats;
@property (nonatomic) int lid;
@property (nonatomic) long long lid;
@property (nonatomic) BOOL getCuratedTopics;
@property (nonatomic) BOOL getFollowedTopics;

Expand Down
4 changes: 2 additions & 2 deletions ScoopItFramework/Classes/Model/SIProfile.m
Expand Up @@ -22,7 +22,7 @@ @implementation SIProfile
@synthesize getFollowedTopics;


-(id) init:(SIScoopIt*)_scoopIt withLid:(int)_lid {
-(id) init:(SIScoopIt*)_scoopIt withLid:(long long)_lid {
self = [super init];
if (self != nil) {
self.scoopIt = _scoopIt;
Expand All @@ -46,7 +46,7 @@ - (void) setNbCuratedPost:(int)nb {

- (NSString*) generateUrl {
NSString *url = nil;
url = [NSString stringWithFormat:@"%@api/1/profile?id=%d", BASE_URL, self.lid];
url = [NSString stringWithFormat:@"%@api/1/profile?id=%lld", BASE_URL, self.lid];

url = [NSString stringWithFormat:@"%@&curated=%d&curable=%d", url, self.nbCuratedPost, self.nbCurablePost];

Expand Down
4 changes: 2 additions & 2 deletions ScoopItFramework/Classes/Model/SISource.h
Expand Up @@ -11,15 +11,15 @@


@interface SISource : SIModel {
int lid;
long long lid;
NSString* name;
NSString* description;
NSString* type;
NSString* iconUrl;
NSString* url;
}

@property (nonatomic) int lid;
@property (nonatomic) long long lid;
@property (nonatomic, retain) NSString* name;
@property (nonatomic, retain) NSString* description;
@property (nonatomic, retain) NSString* type;
Expand Down
2 changes: 1 addition & 1 deletion ScoopItFramework/Classes/Model/SISource.m
Expand Up @@ -21,7 +21,7 @@ @implementation SISource

-(void) getFromDictionary:(NSDictionary*) dic {
if (dic != nil) {
self.lid = [[dic objectForKey:@"id"] intValue];
self.lid = [[dic objectForKey:@"id"] longLongValue];
self.type = [dic objectForKey:@"type"];
self.description = [dic objectForKey:@"description"];
self.name = [dic objectForKey:@"name"];
Expand Down
6 changes: 3 additions & 3 deletions ScoopItFramework/Classes/Model/SITopic.h
Expand Up @@ -24,7 +24,7 @@ typedef enum actions_topics {
} TopicAction;

@interface SITopic : SIModel {
int lid;
long long lid;
NSString* imageUrl;
NSString* smallImageUrl;
NSString* mediumImageUrl;
Expand All @@ -49,7 +49,7 @@ typedef enum actions_topics {
id<SITopicActionDelegate> actionDelegate;

}
@property (nonatomic) int lid;
@property (nonatomic) long long lid;
@property (nonatomic, retain) NSString* imageUrl;
@property (nonatomic, retain) NSString* smallImageUrl;
@property (nonatomic, retain) NSString* mediumImageUrl;
Expand All @@ -74,7 +74,7 @@ typedef enum actions_topics {
@property (nonatomic, assign) id<SITopicActionDelegate> actionDelegate;


-(id) init:(SIScoopIt*)_scoopIt withLid:(int)_lid;
-(id) init:(SIScoopIt*)_scoopIt withLid:(long long)_lid;

-(void) getFromDictionary:(NSDictionary*) dic;

Expand Down

0 comments on commit 4d16b53

Please sign in to comment.