Created
May 25, 2013 05:09
-
-
Save evernotegists/5647972 to your computer and use it in GitHub Desktop.
Get user example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)getUserExample { | |
[[EvernoteUserStore userStore] getUserWithSuccess:^(EDAMUser *user) { | |
int64_t totalMonthlyQuota = [[user accounting] uploadLimit]; | |
[[EvernoteNoteStore noteStore] getSyncStateWithSuccess:^(EDAMSyncState *syncState) { | |
int64_t usedSoFar = [syncState uploaded]; | |
int64_t quotaRemaining = totalMonthlyQuota - usedSoFar; | |
NSDate* resetDate =[NSDate | |
endateFromEDAMTimestamp:[[user accounting] uploadLimitEnd]]; | |
NSLog(@"Quota remaining : %lld , reset date : %@",quotaRemaining,resetDate); | |
} failure:^(NSError *error) { | |
NSLog(@"Error : %@",error); | |
}]; | |
} failure:^(NSError *error) { | |
NSLog(@"Error : %@",error); | |
}]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment