onenote-sdk-patterns

Featured

Production SDK patterns for OneNote Graph API: retry logic, batch requests, and safe file uploads. Use when building production OneNote integrations that need rate limit handling and reliable uploads. Trigger with "onenote sdk patterns", "onenote retry logic", "onenote batch requests".

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

Install

View on GitHub

Quality Score: 99/100

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

Skill Content

# OneNote SDK Patterns ## Overview Production-grade patterns for the OneNote Graph API. The two biggest production issues are rate limits (600 requests per 60 seconds per user, 10,000 per 10 minutes per tenant) and silent upload failures where files >4MB return 200 OK with an empty response body — the page is never created but no error is raised. This skill provides middleware chains, retry decorators, batch request patterns, and silent failure detection for both TypeScript and Python. ## Prerequisites - Completed `onenote-install-auth` — working Graph API authentication - Understanding of async/await patterns in your target language - Node.js 18+ or Python 3.10+ ## Instructions ### Pattern 1: Retry Middleware with Retry-After Header Parsing (TypeScript) The Graph API returns a `Retry-After` header (in seconds) with 429 responses. Hardcoding a fixed retry delay wastes time or hits limits again. ```typescript import { Client, ClientOptions } from "@microsoft/microsoft-graph-client"; class RetryHandler { private maxRetries = 3; async execute( context: { request: Request; options: RequestInit }, next: (context: any) => Promise<Response> ): Promise<Response> { let lastError: Error | null = null; for (let attempt = 0; attempt <= this.maxRetries; attempt++) { try { const response = await next(context); if (response.status === 429) { const retryAfter = response.headers.get("Retry-After"); const waitSeconds ...

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