jaxx2104/mt-dataapi-php

There is no license information available for the latest version (0.1.2) of this package.

0.1.2 2016-04-19 08:31 UTC

This package is not auto-updated.

Last update: 2025-09-11 05:05:34 UTC


README

Simple PHP Wrapper for MT DataAPI v3

Description

Installation

composer

{
    "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);