2017 © Pedro Peláez
 

library finstatclient

FinStat API client

image

juffalow/finstatclient

FinStat API client

  • Tuesday, August 1, 2017
  • by juffalow
  • Repository
  • 1 Watchers
  • 1 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 22 % Grown

The README.md

FinStat PHP Client

Packagist Packagist, (*1)

API client for FinStat service., (*2)

Tech

This solution is using CURL. But if you have to use something else to make HTTP POST, there is no problem to do that :, (*3)

<?php

require __DIR__ . '/vendor/autoload.php';

class NonCurlApiCall extends \juffalow\finstatclient\CurlApiCall {
    protected function httpPost($url, $params) {
        $options = array(
            'http' => array(
                'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
                'method'  => 'POST',
                'content' => http_build_query($params)
            )
        );
        $context  = stream_context_create($options);
        $result = file_get_contents($url, false, $context);
        if($result === false) {
            throw \Exception('Error!');
        }
        return $result;
    }
}

$client = new juffalow\finstatclient\Client('<your API key>', '<your private key>', null, null, new NonCurlApiCall());

Example

This is basic example how to request for company detail., (*4)

<?php

require __DIR__ . '/vendor/autoload.php';

$client = new juffalow\finstatclient\Client('<your api key>', '<your private key>');

try {
    $detail = $client->getCompanyDetail('35757442');
} catch(\Exception $e) {
    print_r($e);
}

You can see more in example page., (*5)

The Versions

01/08 2017

dev-master

9999999-dev

FinStat API client

  Sources   Download

MIT

The Development Requires

by Matej Jellus

finstat

11/01 2017

1.0.1

1.0.1.0

FinStat API client

  Sources   Download

MIT

The Development Requires

by Matej Jellus

finstat

09/01 2017

1.0.0

1.0.0.0

FinStat API client

  Sources   Download

MIT

The Development Requires

by Matej Jellus

finstat