2017 © Pedro Peláez
 

library mpcl-connector-php

MyPClist PHP Connector

image

reprostar/mpcl-connector-php

MyPClist PHP Connector

  • Tuesday, April 18, 2017
  • by pfcode
  • Repository
  • 2 Watchers
  • 1 Stars
  • 53 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 2 % Grown

The README.md

MyPCList API connector library for PHP

Official implementation of MyPCList V1 API connector, compatible with PHP 5.6 and later. This library contains a connector class used to communicate with an endpoint and classes for all API-accessible MPCL entities., (*1)

Installation

Package can be easily installed via Composer:, (*2)

composer require reprostar/mpcl-connector-php

Authentication

In the legacy version of MyPCList, the API credentials were split into separate key and token. In the future version of the API there will be a single-string token for authorization, so usage of separate credentials is now discouraged., (*3)

The new format of API_TOKEN consists of key and token, joined by a colon ':', for example: YYY:XX**************************XXXX, (*4)

This combined token can be used as a first argument for MpclConnector or passed through 'api_token' parameter., (*5)

Sample usage

<?php
require_once __DIR__ . '/vendor/autoload.php';

$mpcl = new \Reprostar\MpclConnector\MpclConnector('API_TOKEN');

try{
    $user = $mpcl->getUser();
    print_r($user);
} catch (\Reprostar\MpclConnector\MpclConnectorException $e) {
    echo "Error received: " . $e->getMessage() . "\n";
}

Documentation of calls and models

This library is a wrapper for MyPCList V1 API. For more detailed documentation of the API, please refer to the official documentation, available at https://mypclist.net/apidocs. For usage of specific methods, please refer to PHPDoc comments in the source code., (*6)

The Versions

18/04 2017

dev-master

9999999-dev

MyPClist PHP Connector

  Sources   Download

MIT

18/04 2017

1.1.1

1.1.1.0

MyPClist PHP Connector

  Sources   Download

MIT

07/10 2016

v1.1

1.1.0.0

MyPClist PHP Connector

  Sources   Download

MIT