承接 chrishardie/crowdtangle-api 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

chrishardie/crowdtangle-api

Composer 安装命令:

composer require chrishardie/crowdtangle-api

包简介

A minimal PHP implementation of the CrowdTangle API

README 文档

README

Latest Version on Packagist Total Downloads

This is a minimal PHP implementation of the CrowdTangle API. It contains a subset of the methods available. I am open to PRs that add extra methods to the client.

Here are a few examples on how you can use the package:

$client = new ChrisHardie\CrowdtangleApi\Client($accessToken);

// get lists
$client->getLists();

// get accounts in a list
$client->getAccountsForList($listId);

// get posts
$client->getPosts([
    'accounts' => '12345678',
    'startDate' => '2022-03-01',
]);

// get a single post
$client->getPost($postId);

View the full CrowdTangle API Documentation for details on available parameters and syntax.

Installation

You can install the package via composer:

composer require chrishardie/crowdtangle-api

Usage

Here are the API methods currently supported:

  • getLists() - Retrieve the lists, saved searches and saved post lists for an account
  • getAccountsForList($listId, $parameters, $maxRecords) - Retrieve the accounts for a given list
  • getPosts($parameters, $maxRecords) - Retrieve a set of posts for the given parameters
  • getPost($postId) - Retrieves a specific post

In most cases the library is simply passing the required arguments to the CrowdTangle API.

In the case of methods that support pagination (currently, getAccountsForList() and getPosts()), by default this library will attempt to retrieve all records on all pages, 100 at a time up to 1000 maximum. You can change this by passing a lower value for $maxRecords. Note that CrowdTangle API throttling limits may apply.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

Inspired and structured after Spatie's Dropbox API.

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-04-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固