Download the PHP package get-stream/stream without Composer
On this page you can find all versions of the php package get-stream/stream. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download get-stream/stream
More information about get-stream/stream
Files in get-stream/stream
Package stream
Short Description A PHP client for Stream (https://getstream.io)
License BSD-3-Clause
Homepage https://getstream.io
Informations about the package stream
Official PHP SDK for Stream Feeds
Official PHP API client for Stream Feeds, a web service for building scalable newsfeeds and activity streams.
Explore the docs ยป
Laravel Feeds Library
ยท
Report Bug
ยท
Request Feature
๐ About Stream
๐ก Note: this is a library for the Feeds product. The Chat SDKs can be found here.
You can sign up for a Stream account at our Get Started page.
You can use this library to access Feeds API endpoints server-side.
For the client-side integrations (web and mobile) have a look at the JavaScript, iOS and Android SDK libraries (docs).
๐ก Note: there is also a higher level Laravel integration which hooks into the Eloquent ORM.
โ๏ธ Installation
Composer will install our latest version automatically.
PHP compatibility
Current releases require PHP 8.0
or higher, and depends on Guzzle version ^7.5.0
.
If you need to use the client with an old PHP or earlier versions of Guzzle, you can grab an earlier version of this package, for example:
See the action for details of how it is built and tested against different PHP versions.
๐ Documentation
Our full documentation for this package is available at https://getstream.io/docs/php/.
โจ Getting started
First, signup here for a free account and grab your API key and secret.
Initiating a Client and a Feed object:
By default, the Client will target the GetStream REST API at stream-io-api.com/api
.
If you want to change this for some reason you can set the STREAM_BASE_URL
environment variable.
Activities in a feed:
Following/follower relations of a feed:
Advanced activity operations:
Advanced batching:
Generating tokens for client-side usage:
RateLimits:
If your app hits a ratelimit, a StreamFeedException is thrown. You can get additional info by catching the exception and calling the following methods:
Reactions:
The reactions module has the following methods.
- add(string $kind, string $activityId, string $userId, array $data=null, array $targetFeeds=null)
- addChild(string $kind, string $parentId, string $userId, array $data=null, array $targetFeeds=null)
- delete(string $reactionId)
- filter(string $lookupField, string $lookupValue, string $kind=null, array $params=null)
- get(string $reactionId)
- update(string $reactionId, array $data=null, array $targetFeeds=null)
Also see documention on the reactions endpoint
Users:
The users module has the following methods.
- add(string $userId, array $data=null, bool $getOrCreate=false)
- createReference(string $userId)
- delete(string $userId)
- get(string $userId)
- update(string $userId, array $data=null)
Also see documention on the users endpoint
Again, our full documentation with all options and methods, is available at https://getstream.io/docs/php/.
โฏ๏ธ Framework integration
Laravel
There's a higher level integration with Laravel called get-stream/stream-laravel
.
The stream-laravel
integration helps you to hook into the Laravel's Eloquent ORM to sync data to Stream.
โ๏ธ Contributing
Project is licensed under the BSD 3-Clause.
We welcome code changes that improve this library or fix a problem, please make sure to follow all best practices and add tests if applicable before submitting a Pull Request on Github. We are very happy to merge your code in the official repository. Make sure to sign our Contributor License Agreement (CLA) first. See our license file for more details.
๐งโ๐ป We are hiring!
We've recently closed a $38 million Series B funding round and we keep actively growing. Our APIs are used by more than a billion end-users, and you'll have a chance to make a huge impact on the product within a team of the strongest engineers all over the world.
Check out our current openings and apply via Stream's website.