neclimdul/marketo-rest
Marketo Rest API Library
This package provides a simple set of classes for interacting with Marketo's Rest API. Built using Swagger Codegen directly from Marketo's documentation.
Notes on versioning. I will do my best to start providing some sort of semversion-ish tags to releases. Marketo doesn't really provide any such versioning and just makes changes seemingly at random so this is the plan.
- Any major language or drastic template changes will be accompanied by a major version release.
- I will do my best to watch for signature changes to methods and treat those as "minor" releases. This would probably be a normal major release but they are generally "bug fixes" to APIs.
- Any documentation or other smaller fixes will be minor releases.
Install using composer
composer require neclimdul/marketo-rest
You can read more about Composer on its official webpage.
Usage
Laravel
This package comes with a provider to register all the API's and configuration.
Drupal
The 3.x release of the Drupal marketo_ma module will use and support this library.
Custom
<?php
$system_config = ;
$client = \NecLimDul\MarketoRest\ClientFactory::createOauthClient(new \NecLimDul\MarketoRest\Configuration([
'clientId' => 'ASDFASDF',
'clientSecret' => 'ASDFASDF',
'baseUrl' => 'https://example.mktorest.com',
]));
$config = \NecLimDul\MarketoRest\LeadConfiguration::getDefaultConfiguration();
$config->setHost('https://example.mktorest.com');
$service = new \NecLimDul\MarketoRest\LeadsApi($client, $config);
$service->getLeadByIdUsingGET(16);
?>
Contributing
Pull requests are welcome.
Updating
Updating the documenting from swagger are pretty straight forward using an included script.
$ ./build_swagger.sh
Requirements:
- An operating system that supports sudo for some permission hackery.
- Docker
Testing
Most of the autogenerated tests aren't doing a lot so please review the changes to make sure they make sense. There are some other tests in PHPUnit so please run those as well.
$ ./vendor/bin/phpunit
Credits
License
The MIT License (MIT). Please see License File for more information.
Related Packages
Hubspot for Laravel allows you to interact with the official hubspot PHP Api Cli...
Version History
| Version | Released | PHP | License |
|---|---|---|---|
| 4.0.1 | >=8.3 | MIT | |
| 4.0.0 | >=8.3 | MIT | |
| v1.1.4 | >=7.3 | MIT | |
| v1.1.3 | >=7.3 | MIT | |
| v1.1.2 | >=7.3 | MIT | |
| v1.1.1 | >=7.3 | MIT | |
| v1.1.0 | >=7.3 | MIT | |
| v1.0.2 | >=7.3 | MIT | |
| v1.0.1 | >=7.3 | MIT | |
| v1.0.0 | >=7.3 | MIT | |
| v0.1.10 | >=5.5 | MIT | |
| v0.1.9 | >=5.5 | MIT | |
| v0.1.8 | >=5.5 | MIT | |
| v0.1.7 | >=5.5 | MIT | |
| v0.1.6 | >=5.5 | MIT | |
| v0.1.5 | >=5.5 | MIT | |
| v0.1.4 | >=5.5 | MIT | |
| v0.1.3 | >=5.5 | MIT | |
| v0.1.2 | >=5.5 | MIT | |
| v0.1.1 | >=5.5 | MIT | |
| v0.1.0 | >=5.5 | MIT |
Pre-releases (7)
| Version | Released | PHP | License |
|---|---|---|---|
| 4.0.0-beta2 | >=8.3 | MIT | |
| 4.0.0-beta1 | >=8.3 | MIT | |
| 3.0.0-beta1 | >=8.1 | MIT | |
| v2.0.0-beta4 | >=8.0 | MIT | |
| v2.0.0-beta3 | >=7.4 | MIT | |
| v2.0.0-beta2 | >=7.4 | MIT | |
| v2.0.0-beta1 | >=7.3 | MIT |