getfokus / sentione-api
PHP SentiOne API 用于 PHP 5.3+
dev-devel
2013-11-06 23:38 UTC
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2024-09-24 01:46:09 UTC
README
这是一个 PHP 5.3+ 的 SentiOne API 包装器,用于SentiOne API
- 作者: Piotr 'Athlan' Pelczar
- 为项目创建: Fokus
##需求
- PHP 5.3+
- CURL
- API 凭证。要获取用户名和密码,请联系 SentiOne 开发者。
##安装
###Composer 将以下包添加到 composer.json
"getfokus/sentione-api": "*"
##基本用法
要调用 API,只需使用方法
$response = $sentione->apiCall($action, array $params);
您将收到 Response 对象
###示例
<?php
$username = 'USERNAME';
$password = '*****';
$sentione = new SentioneApi\Client($username, $password);
$response = $sentione->apiCall('sources sentiment', [
'keyword' => 'sentione',
]);
$data = $response->getData();
var_dump($data);