Appearance
Php SDK - Feeds API
About 513 wordsAbout 2 min
Comprehensive code examples for the Stream feeds php SDK.
Quick Navigation
- Common (84 methods)
- Feeds (96 methods)
- Moderation (31 methods)
- Types Reference - interfaces for API requests/responses
Overview
This documentation covers 211 API methods across 3 categories.
Installation
composer require getstream/stream-phpBasic Setup
<?php
require_once __DIR__ . '/vendor/autoload.php';
use GetStream\ClientBuilder;
// Initialize the client using environment variables (STREAM_API_KEY, STREAM_API_SECRET)
$client = ClientBuilder::fromEnv()->buildFeedsClient();
// Or initialize with explicit credentials
// $client = (new ClientBuilder())
// ->apiKey('YOUR_API_KEY')
// ->apiSecret('YOUR_API_SECRET')
// ->buildFeedsClient();Categories
Common
getApp()- Retrieve the current application settings to understand and verify the configuration of your app. Use this method when you need to access or review the app's settings for troubleshooting or validation purposes.updateApp()- Modify the application settings to adjust the configuration according to your requirements. This method is useful when you need to update settings to improve functionality or comply with new policies.listBlockLists()- Obtain a list of all block lists to manage or review the existing lists effectively. Use this method when you need a comprehensive overview of all block lists in your system.createBlockList()- Establish a new block list to prevent certain elements from interacting with your application. This method is essential when introducing new restrictions or security measures.getBlockList()- Access the details of a specific block list to understand its contents and purpose. Use this method when you need to inspect or verify the entries of a particular block list.- ... and 79 more methods
Feeds
addActivity()- Add a single activity to a feed, allowing users to share updates or events. Use this when you want to introduce new content to a feed.upsertActivities()- Add or update multiple activities in a batch, optimizing feed management by ensuring activities are current and efficiently handled. Use this for bulk operations where activities might need to be created or modified.updateActivitiesPartialBatch()- Use this method to update specific fields of multiple activities in bulk without overwriting the entire activity data, ideal for making incremental changes efficiently.deleteActivities()- Remove multiple activities from a feed to keep it relevant and tidy. Use this when you need to clear outdated or unwanted content from a feed.trackActivityMetrics()- Monitors and records user interactions with activities, providing insights into user engagement and behavior. Use this to analyze activity trends and optimize content strategy.- ... and 91 more methods
Moderation
insertActionLog()- Records a moderation action into the log, useful for tracking and auditing moderation activities performed on the platform.appeal()- Submit a request to review and potentially overturn a moderation decision; use this when you believe a moderation action was taken in error.getAppeal()- Retrieve details about a specific appeal, allowing you to track the status and outcome of your request for review.queryAppeals()- Search and filter through multiple appeals to manage and assess ongoing or past moderation challenges effectively.ban()- Restrict a user from accessing services or content, useful when enforcing community guidelines and maintaining a safe environment.- ... and 26 more methods
Generated from Stream OpenAPI specification