| name | hootsuite-sdk-patterns |
| description | Apply production-ready Hootsuite SDK patterns for TypeScript and Python.
Use when implementing Hootsuite integrations, refactoring SDK usage,
or establishing team coding standards for Hootsuite.
Trigger with phrases like "hootsuite SDK patterns", "hootsuite best practices",
"hootsuite code patterns", "idiomatic hootsuite".
|
| allowed-tools | Read, Write, Edit |
| version | 1.5.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","hootsuite","social-media"] |
| compatibility | Designed for Claude Code |
Hootsuite SDK Patterns
Overview
Production patterns for Hootsuite REST API: typed client, token management, scheduling helpers, and Python integration.
Instructions
Step 1: Typed API Client
interface SocialProfile {
id: string;
type: 'TWITTER' | 'FACEBOOK' | 'INSTAGRAM' | 'LINKEDIN' | 'PINTEREST' | 'YOUTUBE' | 'TIKTOK';
socialNetworkUsername: string;
socialNetworkId: string;
}
interface ScheduledMessage {
id: string;
text: string;
state: 'SCHEDULED' | 'SENT' | 'FAILED' | 'REJECTED';
socialProfileIds: string[];
scheduledSendTime: string;
sentAt?: string;
mediaUrls?: Array<{ id: string }>;
}
interface HootsuiteResponse<T> {
data: T;
}
Step 2: Scheduling Helper with Timezone
function scheduleForTimezone(
hour: number,
: ,
: ,
daysFromNow =
): {
date = ();
date.(date.() + daysFromNow);
dateStr = date.().()[];
timeStr = ;
();
}
= {
: { : , : },
: { : , : },
: { : , : },
: { : , : },
};