hootsuite-performance-tuning

Featured

Optimize Hootsuite API performance with caching, batching, and connection pooling. Use when experiencing slow API responses, implementing caching strategies, or optimizing request throughput for Hootsuite integrations. Trigger with phrases like "hootsuite performance", "optimize hootsuite", "hootsuite latency", "hootsuite caching", "hootsuite slow", "hootsuite batch".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 97/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
94
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Hootsuite Performance Tuning ## Instructions ### Step 1: Cache Social Profiles ```typescript import { LRUCache } from 'lru-cache'; const profileCache = new LRUCache<string, any>({ max: 100, ttl: 3600000 }); async function getCachedProfiles(): Promise<any[]> { const cached = profileCache.get('profiles'); if (cached) return cached; const response = await fetch('https://platform.hootsuite.com/v1/socialProfiles', { headers: { 'Authorization': `Bearer ${await getStoredToken()}` }, }); const { data } = await response.json(); profileCache.set('profiles', data); return data; } ``` ### Step 2: Batch Message Scheduling ```typescript import PQueue from 'p-queue'; const scheduleQueue = new PQueue({ concurrency: 2, interval: 1000, intervalCap: 2 }); async function batchSchedule(posts: Array<{ text: string; profileId: string; time: Date }>) { const results = await Promise.allSettled( posts.map(post => scheduleQueue.add(() => fetch('https://platform.hootsuite.com/v1/messages', { method: 'POST', headers: { 'Authorization': `Bearer ${process.env.HOOTSUITE_ACCESS_TOKEN}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ text: post.text, socialProfileIds: [post.profileId], scheduledSendTime: post.time.toISOString() }), }).then(r => r.json()) ) ) ); const succeeded = results.filter(r => r.status === 'fulfilled').length; console.log(`Scheduled ${succeeded}/${posts.length} posts`); }...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category