juffalow/finstatclient 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

juffalow/finstatclient

最新稳定版本:1.0.1

Composer 安装命令:

composer require juffalow/finstatclient

包简介

FinStat API client

关键字:

README 文档

README

Packagist Packagist

API client for FinStat service.

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 :

<?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.

<?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.

统计信息

  • 总下载量: 9.5k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-01-09