2017 © Pedro Peláez
 

library mt-dataapi-php

image

jaxx2104/mt-dataapi-php

  • Wednesday, May 25, 2016
  • by jaxx2104
  • Repository
  • 1 Watchers
  • 0 Stars
  • 19 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

mt-dataapi-php

Simple PHP Wrapper for MT DataAPI v3, (*1)

Description

Installation

composer, (*2)

{
    "require": {
        "jaxx2104/mt-dataapi-php": "dev-master"
    }
}

Usage

<?php
require_once('vendor/autoload.php');
$url  = 'http://xxxxxxx.com/mt/mt-data-api.cgi';
$user = 'xxxxxxx@mail.com';
$pass = 'xxxxxxx';
$blogId = 1;

$mt = new MT\DataApi($url);

if (!$mt->login(["username" => $user, "password" => $pass])){
    var_dump("faild login");
    var_dump($mt->response);
    exit(1);
}
//success login
var_dump($mt->response);

if (!$mt->listCategory($blogId)) {
    var_dump("faild get category");
    var_dump($mt->response);
    exit(1);
}
//success get category
var_dump($mt->response);

The Versions

25/05 2016

dev-master

9999999-dev

  Sources   Download

19/04 2016

0.1.2

0.1.2.0

  Sources   Download

27/08 2015

0.1.1

0.1.1.0

  Sources   Download

26/08 2015

0.1

0.1.0.0

  Sources   Download