| 测试已测试 | ✓ |
| Lang语言 | Obj-CObjective C |
| 许可证 | MIT |
| 发布最新发布 | 2015年6月 |
由Ayaka Nonaka、Dasmer Singh、Mark Adams、marklarr维护。
VENCore 是 Venmo API 的核心 Objective-C 客户端库。如果您想从 iOS 应用程序中以简单的方式发送 Venmo 付款和收费,则应使用 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) {
// :(
}];