kollus/kollus-sdk

Kollus SDK for PHP

1.0.6 2017-07-20 04:14 UTC

This package is not auto-updated.

Last update: 2024-04-27 16:20:12 UTC


README

Build Status Coverage Status

Introduction

Unofficial Kollus SDK Library for PHP

Table of contents:

Requirement

  • PHP 5.5 above
  • PHP Module : curl
  • Composer

Installation

To use this library install it through Composer, run

php composer.phar require kollus/kollus-sdk

How to use

<?php

require('./vendor/autoload.php');

use Kollus\Component\KollusClient;

// Init library
$apiClient = KollusClient::getApiClientBy('kr.kollus.com', 0, 'korean', 'service_account_key', 'api_access_token');

// Get library media content list
$mediaContents = $apiClient->getLibraryMediaContents();
foreach ($mediaContents as $mediaContent) {
    echo $mediaContent->getUploadFileKey() . PHP_EOL;
}
...

For laravel

Add the service provider to config/app.php

    'providers' => [

        /*
         * Package Service Providers...
         */
        Kollus\Component\KollusServiceProvider::class,
    ]

publish the config:

php artisan vendor:publish

fix config's values in the config config/kollus.php:

return [
    'service_account' => [
        'key' => '[fill it]',
        'id' =>'[fill it]',
        'api_access_token' =>'[fill it]',
        'custom_key' => '[fill it]',
    ],
    'domain' => 'kr.kollus.com',
    'api_version' => '0',
    'language' => 'korean',
    'use_https' => 0,
];

More information

Please see Wiki

License

See LICENSE for more information