GithubHelp home page GithubHelp logo

wheniwork / marketo-rest-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marketo-api/marketo-rest-client

0.0 2.0 0.0 93 KB

PHP client for the Marketo.com REST API

License: MIT License

PHP 100.00%

marketo-rest-client's Introduction

Build Status

Marketo REST API Client

Unofficial PHP client for the Marketo.com REST API: http://developers.marketo.com/documentation/rest/. Requires PHP 5.3.3+

Installation

The recommended way of installing the client is via Composer. Simply run the following command to add the library to your composer.json file.

composer require marketo-api/marketo-rest-client

Setup

The client is built on Guzzle 3 and uses a factory method to create an instance. You must specify either a Munchkin ID or the full url.

####For Rest Api access:

use CSD\Marketo\Client;

$client = Client::factory(array(
    'client_id' => 'Marketo client ID',         // required
    'client_secret' => 'Marketo client secret', // required
    'munchkin_id' => '100-AEK-913' // alternatively, you can supply the full URL, e.g. 'url' => 'https://100-AEK-913.mktorest.com'
));

####For Bulk Api access:

use CSD\Marketo\Client;

$client = Client::factory(array(
    'client_id' => 'Marketo client ID',         // required
    'client_secret' => 'Marketo client secret', // required
    'munchkin_id' => '100-AEK-913' // alternatively, you can supply the full URL, e.g. 'url' => 'https://100-AEK-913.mktorest.com'
    'bulk' => true // if uploading leads via file upload (e.g. csv)
));

Usage

View the source of src/Client.php for all the available methods.

Contributing

Please create pull requests. Hopefully pull requests will be reviewed within a couple of days. In general don't merge your own pull requests. Operations will be available with just the addition of a the operation in the service.json file as long as you are using $client->getFoo()->getResult() but most of the operations have their own access methods with simplified argument handling. Operations do not need to have their own response class unless it does something special. Please respect semantic versioning in this project. That means no break in backwards compatibility unless a major version change is being planned.

Example of the simplest addition of a new operation:

{
    "operations": {
        "getFoo": {
            "httpMethod": "GET",
            "uri": "foo.json",
            "parameters": {},
            "responseModel": "baseResponse",
            "responseClass": "CSD\\Marketo\\Response"
        },
}

License

This source is licensed under an MIT License, see the LICENSE file for full details. If you use this code, it would be great to hear from you.

marketo-rest-client's People

Contributors

dchesterton avatar jaesin avatar nathanbrauer avatar duellj avatar itmayziii avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.