1.0.3 • Published 9 years ago
twitter-leads v1.0.3
twitter-leads
Pull list of leads from a Twitter Ads Lead Generation Card
Installation
$ npm install --save twitter-leadsUsage
The example shown below will pull a list of leads from Twitter Ads.
var leads = require('twitter-leads');
leads({ username, password, ads, card }, done);
function done (err, leads) {
  // handle response
}API
leads(options, done)
Posts an article on HN by making a series of requests against their website. Takes some options, detailed below.
| Property | Description | 
|---|---|
username | Your Twitter username, used to authenticate. | 
password | Your Twitter password, used to authenticate. | 
ads | Your Twitter Ads account ID. Find it by logging into ads.twitter.com. | 
card | The Twitter Card ID for the Lead Generation card you want to download leads for. | 
since | Optional. Leads generated before the since date won't be returned | 
When the requests against Twitter are done, the done callback will be invoked with two arguments.
errwill have an error if one occurred, andnullotherwiseleadswill be the lead data as an array, where each entry contains the following fields:timeis theDatewhen a user interacted with your cardemailis their email address, e.ghello@ponyfoo.comnameis their full user name, e.g:Nicolás Bevacquahandleis their handle, e.g:@nzgb
License
MIT