barisesen/hurriyet

Hürriyet公共API客户端,用于PHP

1.0.0 2017-07-26 07:23 UTC

This package is not auto-updated.

Last update: 2024-09-29 03:15:29 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

Hürriyet API客户端,用于PHP

安装

Composer json文件

{
    "require": {
        "barisesen/hurriyet": "^1"
    }
}

运行安装命令后。

$ composer install

或者直接运行以下命令。

$ composer require barisesen/hurriyet

示例

Hürriyet API客户端示例

用法

本文档提供以下网关

<?php

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

use Esen\Hurriyet;

// create a new client instance
$hurriyet = new Hurriyet('your-hurriyet-api-token');

// Filtered article list
$arr = [
    'select' => 'Title,Id',
    'top'  => '10'
];
$data = $hurriyet->get('articles', $arr);

// List id = 40530799 Article 
$arr = [
    'id' => '40530799'
];
$data = $hurriyet->get('articles', $arr);
var_dump($data);

许可证

MIT许可证(MIT)。请参阅许可证文件以获取更多信息。

贡献

  1. 将其分支(https://github.com/barisesen/Hurriyet-Php-Api-Client
  2. 创建您的功能分支(git checkout -b my-new-feature)
  3. 提交您的更改(git commit -am '添加一些功能')
  4. 推送到分支(git push origin my-new-feature)
  5. 创建一个新的Pull Request

贡献者