Skip to content
forked from venmo/VENCore

Core Objective-C client library for the Venmo API

License

Notifications You must be signed in to change notification settings

isabella232/VENCore

 
 

Repository files navigation

VENCore Build Status Coverage Status

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.

Usage

Initialization

// Create a VENCore instance
VENCore *core = [[VENCore alloc] init];

// Give it an access token
[core setAccessToken:accessToken];

// Set the default core
[VENCore setDefaultCore:core];

Sending a transaction

// Create a request
VENCreateTransactionRequest *transactionService = [[VENCreateTransactionRequest alloc] init];

// Add a note
transactionService.note = @"hi";

// Add a target
VENTransactionTarget *target = [[VENTransactionTarget alloc] initWithHandle:@"name@example.com" amount:30];
[transactionService addTransactionTarget:target];

// Send the request
[transactionService sendWithSuccess:^(NSArray *sentTransactions, VENHTTPResponse *response) {
    // :)
} failure:^(NSArray *sentTransactions, VENHTTPResponse *response, NSError *error) {
    // :(
}];

About

Core Objective-C client library for the Venmo API

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 97.9%
  • Ruby 2.1%