Skip to content

[codex] add code examples and scoped AI prompts to Content APIs quickstart child guides#108

Merged
basit3407 merged 4 commits intomainfrom
codex/content-quickstart-code-prompts
Apr 1, 2026
Merged

[codex] add code examples and scoped AI prompts to Content APIs quickstart child guides#108
basit3407 merged 4 commits intomainfrom
codex/content-quickstart-code-prompts

Conversation

@basit3407
Copy link
Copy Markdown
Collaborator

Summary

This is a follow-up to #107.

PR #107 correctly split the oversized Content APIs quickstart into a focused hub plus child guides. This follow-up restores more implementation value inside the child guides without bloating the hub again.

What changed

  • added richer code examples to the child quickstart docs instead of the hub page
  • added short, page-specific AI handoff prompts where they support the exact task on that page
  • kept the hub page unchanged so /docs/quickstart/ stays short and decision-oriented

Child guide improvements

docs/quickstart/manual-authentication.md

  • added a Python requests example for the OAuth2 Client Credentials token request
  • added a Node.js fetch example for the same token request
  • added a short AI handoff prompt scoped to backend token retrieval
  • expanded keywords to better match language-specific searches

docs/quickstart/token-management.md

  • added a Python token-cache example using a lock and expiry tracking
  • added a Python example for the 401 clear-and-retry-once pattern
  • added a short AI handoff prompt scoped to token lifecycle handling
  • expanded keywords for Python token-cache discovery

docs/quickstart/first-api-call.md

  • added a Python requests example for the first authenticated /chapters request
  • kept the existing backend proxy example and added a short note linking it to the manual-auth step
  • added a short AI handoff prompt scoped to the first authenticated API call
  • expanded keywords for language-specific discovery

docs/quickstart/migration.md

  • added a before/after request example for the old unauthenticated API versus the new authenticated Content API flow
  • added a Python migration example
  • added a short AI handoff prompt scoped to migrating an older api.quran.com integration
  • expanded keywords for migration-oriented discovery

Why

The hub/content split from #107 improved structure, readability, SEO, and GEO, but the child guides were still light on copy-pasteable implementation examples for non-JavaScript readers.

This PR improves practical usability for Python and backend-first developers while keeping the hub page clean. It should also improve generative retrieval because each child page now contains a tighter pairing of explanation plus executable example for a single task.

User impact

  • Python and backend developers get faster copy-pasteable examples in the exact child guide they need
  • the hub page remains short and easy to scan
  • the child guides become better landing pages for implementation-specific search and AI retrieval
  • AI prompts are now scoped to the page task instead of being concentrated only at the hub level

Validation

  • full docs build intentionally not rerun in this pass per request
  • changes were limited to markdown child guides under docs/quickstart/
  • verified that the branch only contains the four intended child-doc updates before commit

Notes

This PR does not change API behavior, auth behavior, SDK behavior, or sidebar structure. It is a documentation follow-up focused on implementation examples and scoped AI handoff prompts.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 1, 2026

Deploying qf-api-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 38ab172
Status: ✅  Deploy successful!
Preview URL: https://5a770f70.qf-api-docs.pages.dev
Branch Preview URL: https://codex-content-quickstart-cod.qf-api-docs.pages.dev

View logs

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the Content APIs quickstart child guides by adding language-specific implementation examples (notably Python and Node) plus short, page-scoped “AI handoff” prompts, while keeping the main /docs/quickstart/ hub page lean (per the follow-up intent to #107).

Changes:

  • Added Python/Node copy-pasteable examples for OAuth2 Client Credentials token retrieval, token caching/401 retry patterns, and the first authenticated /chapters call.
  • Added before/after migration examples for teams moving from api.quran.com to authenticated Quran Foundation Content APIs.
  • Added short, task-specific AI handoff prompts to each child page and expanded page keywords for better discovery.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
docs/quickstart/manual-authentication.md Adds Python requests + Node fetch token request examples and a scoped AI prompt for backend token retrieval.
docs/quickstart/token-management.md Adds Python token cache example (lock + expiry) and a 401 retry-once example, plus a scoped AI prompt.
docs/quickstart/first-api-call.md Adds a Python requests example for the first authenticated /chapters request and a scoped AI prompt.
docs/quickstart/migration.md Adds before/after request examples (old unauthenticated vs new authenticated), a Python migration example, and a scoped AI prompt.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/quickstart/token-management.md Outdated
Comment thread docs/quickstart/token-management.md Outdated
Comment thread docs/quickstart/token-management.md
Comment thread docs/quickstart/manual-authentication.md Outdated
Comment thread docs/quickstart/first-api-call.md
Comment thread docs/quickstart/migration.md Outdated
@basit3407 basit3407 marked this pull request as ready for review April 1, 2026 17:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/quickstart/token-management.md
Comment thread docs/quickstart/first-api-call.md
Comment thread docs/quickstart/manual-authentication.md Outdated
Comment thread docs/quickstart/first-api-call.md Outdated
Comment thread docs/quickstart/migration.md Outdated
@basit3407 basit3407 merged commit 72278bb into main Apr 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants