marketo-api-ruby¶ ↑
- home
- code
- bugs
- rdoc
- continuous integration
- test coverage
Description¶ ↑
MarketoAPI
(marketo-api-ruby) provides a native Ruby interface to the Marketo SOAP API, using savon. While understanding the Marketo SOAP API is necessary for using marketo-api-ruby, it is an explicit goal that working with MarketoAPI
not feel like working with a hinky Java port.
This is release 0.9.1, targeting Marketo API version 2.3, fixing a syncLead
problem where Id
, Email
, and ForeignSysPersonId
are inconsistent with other syncLead
parameters. This fixes an issue with Marketo campaign methods.
Please note that Ruby 1.9.2 is not officially supported, but MarketoAPI
will install on any version of Ruby 1.9.2 or later.
Features/Problems¶ ↑
The marketo-api-ruby implementation of the Marketo SOAP API is incomplete, but is scheduled to be complete against Marketo SOAP API 2.3 for the version 1.0 release; this will take some time.
-
Marketo Object (MObject) operations are 80% implemented.
-
Not implemented:
syncMObjects
-
Improvements will be made to the criteria-building interface and the association-building interface.
-
-
Marketo Custom Object operations are not yet implemented.
-
Marketo Lead operations are 37% implemented.
-
Not implemented:
getMultipleLeads
,mergeLeads
,getLeadActivity
,getLeadChanges
-
-
Marketo Campaign operations are 90% implemented.
-
The
requestCampaign
API is currently awkward around managing program tokens (programTokenList
in the SOAP API). -
The
scheduleCampaign
API is currently awkward around managing program tokens (programTokenList
in the SOAP API).
-
-
Marketo List opertions are 100% implemented.
Synopsis¶ ↑
require 'marketo_api' # Only required if not loaded by Bundler marketo = MarketoAPI.client( api_subdomain: '123-ABC-456', user_id: 'my-api-user-id', encryption_key: 'my-api-encryption-key' ) # Get a lead by email, and sync it back to Marketo. lead = marketo.leads.get_by_email('mork@ork.com') lead.email = 'mindy@ork.com' lead.sync! # Get campaigns for marketo (MKTOWS) puts marketo.campaigns.for_marketo # Delete Opportunity 75. marketo.mobjects.delete MarketoAPI::MObject.opportunity(75) # Get all Marketo programs
Install¶ ↑
Add to your application's Gemfile:
gem 'marketo-api-ruby'
Or install manually:
gem install marketo-api-ruby
Developers¶ ↑
After checking out the source, run:
$ rake newb
This task will install any missing dependencies, run the tests/specs, and generate the RDoc.
marketo-api-ruby Modified Semantic Versioning¶ ↑
The marketo-api-ruby library tracks an externally versioned API; this is not fully compatible with all aspects of Semantic Versioning.
-
MAJOR versions will be updated when targeting a new major version of the Marketo API, if Marketo makes incompatible changes to its API in minor versions, or when incompatible marketo-api-ruby API changes are made. The release notes will identify the cause of the update.
-
MINOR versions will be updated when targeting a new minor version of the Marketo API (e.g., Marketo version 2.2 to 2.3).
-
PATCH version when backwards-compatible bug fixes are made.
Additionally, each release will clearly identify which Marketo API it targets as its baseline. If a release is made without a PATCH level, it can be assumed to be zero.
In practical terms, MAJOR versions will only be updated if you cannot use an earlier API version for an existing query (such as +Marketo::Lead#sync+).
Contributing¶ ↑
I value any contribution to marketo-api-ruby you can provide: a bug report, a feature request, or code contributions. Here are a few guidelines:
-
Code changes will not be accepted without tests. The test suite is written with Minitest.
-
Match my coding style.
-
Use a thoughtfully-named topic branch that contains your change. Rebase your commits into logical chunks as necessary.
-
Do not change the version number; when your patch is accepted and a release is made, the version will be updated at that point.
-
Submit a GitHub pull request with your changes.
-
New or changed behaviours require new or updated documentation.
Test Dependencies¶ ↑
marketo-api-ruby uses Ryan Davis’s Hoe to manage the release process, and it adds a number of rake tasks. You will mostly be interested in:
$ rake
which runs the tests the same way that:
$ rake test $ rake travis
will do.
To assist with the installation of the development dependencies for marketo-api-ruby, I have provided the simplest possible Gemfile pointing to the (generated) marketo-api-ruby.gemspec
file. This will permit you to do:
$ bundle install
to get the development dependencies. If you aleady have hoe
installed, you can accomplish the same thing with:
$ rake newb
This task will install any missing dependencies, run the tests/specs, and generate the RDoc.
Workflow¶ ↑
Here's the most direct way to get your work merged into the project:
-
Fork the project.
-
Clone down your fork (
git clone git://github.com/<username>/marketo-api-ruby.git
). -
Create a topic branch to contain your change (
git checkout -b my_awesome_feature
). -
Hack away, add tests. Not necessarily in that order.
-
Make sure everything still passes by running
rake
. -
If necessary, rebase your commits into logical chunks, without errors.
-
Push the branch up (
git push origin my_awesome_feature
). -
Create a pull request against ClearFit/marketo-api-ruby and describe what your change does and the why you think it should be merged.
Contributors¶ ↑
-
Austin Ziegler (@halostatue) created and maintains marketo-api-ruby for ClearFit.
-
James O'Brien (@jeob32) created marketo_gem for Rapleaf.
-
Eddie Siegel (@eddiesiegel)
-
Sina Jahan (@sinajahan)
Licence¶ ↑
This software is available under the terms of the MIT license.
-
Copyright 2014 ClearFit, Inc.
-
Copyright 2013 Rapleaft, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.