Skip to content

venmo/VENCore

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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) {
    // :(
}];