Download the PHP package chrishardie/crowdtangle-api without Composer
On this page you can find all versions of the php package chrishardie/crowdtangle-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download chrishardie/crowdtangle-api
More information about chrishardie/crowdtangle-api
Files in chrishardie/crowdtangle-api
Package crowdtangle-api
Short Description A minimal PHP implementation of the CrowdTangle API
License MIT
Homepage https://github.com/chrishardie/crowdtangle-api
Informations about the package crowdtangle-api
A minimal PHP implementation of the CrowdTangle API
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:
View the full CrowdTangle API Documentation for details on available parameters and syntax.
Installation
You can install the package via composer:
Usage
Here are the API methods currently supported:
getLists()
- Retrieve the lists, saved searches and saved post lists for an accountgetAccountsForList($listId, $parameters, $maxRecords)
- Retrieve the accounts for a given listgetPosts($parameters, $maxRecords)
- Retrieve a set of posts for the given parametersgetPost($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
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
- Chris Hardie
- All Contributors
Inspired and structured after Spatie's Dropbox API.
License
The MIT License (MIT). Please see License File for more information.