TestsTested | ✓ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Jun 2015 |
Maintained by Ayaka Nonaka, Dasmer Singh, Mark Adams, marklarr.
VENCore is the core Objective-C client library for the Venmo API. If you're looking for a simple way to send Venmo payments & charges from your iOS app, you should use the Venmo iOS SDK.
// Create a VENCore instance
VENCore *core = [[VENCore alloc] init];
// Give it an access token
[core setAccessToken:accessToken];
// Set the default core
[VENCore setDefaultCore:core];
// Create a request
VENCreateTransactionRequest *transactionService = [[VENCreateTransactionRequest alloc] init];
// Add a note
transactionService.note = @"hi";
// Add a target
VENTransactionTarget *target = [[VENTransactionTarget alloc] initWithHandle:@"[email protected]" amount:30];
[transactionService addTransactionTarget:target];
// Send the request
[transactionService sendWithSuccess:^(NSArray *sentTransactions, VENHTTPResponse *response) {
// :)
} failure:^(NSArray *sentTransactions, VENHTTPResponse *response, NSError *error) {
// :(
}];