feeds.get()
Get detailed information about a specific feed by its ID.
Signature
feeds.get(feedId: string): Promise<Feed>Parameters
feedId
- Type:
string - Required: Yes
- Description: The UUID of the feed to retrieve
Returns
- Type:
Promise<Feed>
interface Feed {
id: string;
owner_id: string;
owner_wallet_address: string;
category_id?: string;
name: string;
description?: string;
image_url?: string;
image_cid?: string;
is_active: boolean;
total_entries: number;
total_purchases: number;
total_revenue: string;
tags: string[];
created_at: number;
updated_at: number;
category?: Category; // Included if category_id exists
}Usage
Basic Example
const feedId = '123e4567-e89b-12d3-a456-426614174000';
const feed = await grapevine.feeds.get(feedId);
console.log('Feed:', feed.name);
console.log('Entries:', feed.total_entries);
console.log('Revenue:', feed.total_revenue);With Category Info
const feed = await grapevine.feeds.get(feedId);
if (feed.category) {
console.log(`Category: ${feed.category.name}`);
console.log(`Category Type: ${feed.category.type}`);
}Check Feed Status
const feed = await grapevine.feeds.get(feedId);
if (!feed.is_active) {
console.log('Feed is inactive');
return;
}
console.log(`Active feed with ${feed.total_entries} entries`);Behind the Scenes
This method:
- Validates the feed ID format
- Makes GET request to
/v1/feeds/{feedId} - Includes category expansion if available
- Returns complete feed object
Error Handling
try {
const feed = await grapevine.feeds.get(feedId);
console.log('Feed found:', feed.name);
} catch (error) {
if (error.message.includes('404')) {
console.error('Feed not found');
} else if (error.message.includes('400')) {
console.error('Invalid feed ID format');
} else {
console.error('Error:', error.message);
}
}Notes
- Authentication: Optional - public endpoint
- Category: Automatically populated if feed has category_id
- Statistics: Real-time stats included (entries, revenue, purchases)
- Images: Both
image_urlandimage_cidprovided for images
Related
- feeds.list() - List multiple feeds
- feeds.update() - Update feed details
- entries.list() - Get feed entries