Skip to content

bmenking-wng/marketo_api

Repository files navigation

Marketo API for PHP

Wrapper for Marketo API

Software License

What Provides

This version has classes built for the following controllers:

  • Activities
  • BulkExportLead
  • Campaigns
  • CustomObjects (partial)
  • Leads
  • Opportunities
  • ProgramMembers
  • SalesPersons
  • SmartCampaigns
  • StaticLists
  • SmartList (partial)
  • Usage

Installation

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 update

Usage/Quickstart

use 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.

About

PHP library for Marketo API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages