TypeScript SDKExamples
Channels Examples
Examples for managing channels
Complete examples for managing channels with the Fanbeam SDK.
List Channels
import { channels } from 'fanbeam';
// List all channels
const response = await channels.list();
// With filters
const filteredResponse = await channels.list({
query: {
platform: 'instagram'
}
});Get Channel
import { channels } from 'fanbeam';
const response = await channels.get({
params: { id: 'channel-id' }
});
if (response.data) {
console.log('Channel:', response.data);
}Delete Channel
import { channels } from 'fanbeam';
await channels.remove({
params: { id: 'channel-id' }
});List Platforms
import { channels } from 'fanbeam';
const response = await channels.platforms.list();
console.log('Available platforms:', response.data);