Wrapper for Marketo API
This version has classes built for the following controllers:
- Activities
- BulkExportLead
- Campaigns
- CustomObjects (partial)
- Leads
- Opportunities
- ProgramMembers
- SalesPersons
- SmartCampaigns
- StaticLists
- SmartList (partial)
- Usage
Installation by Composer:
Modify your composer.json by adding the following section (if it doesn't already exist):
...
"require": {
...
"worldnewsgroup/marketo-api": "~0.1",
...
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/bmenking-wng/marketo_api"
}
],
...Then run composer update:
$ composer updateuse WorldNewsGroup\Marketo\Environment;
use WorldNewsGroup\Marketo\Model\Lead;
Environment::configure('client_id', 'client_secret', 'munchkin_id');
$result = Lead::getLeadById($leadId);
$lead = $result->leads();
echo "Hello, {$lead[0]->firstName}\n";A request will return a Result object. Depending on the call, response objects can be retrieved by calling the appropriate object name, i.e., for the above the Result object $result->leads() will return an array of any Lead objects generated by the requestion.