openlark-api

Implement OpenLark API endpoints with builder and transport conventions.

103|27|Updated Apr 9, 2024
One-click install
npx skills add https://github.com/foxzool/open-lark --skill openlark-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openlark-api
Source: https://github.com/foxzool/open-lark/tree/main/.agents/skills/openlark-api
Command: npx skills add https://github.com/foxzool/open-lark --skill openlark-api

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Provides a clear, repeatable implementation and refactor workflow for adding OpenLark API endpoints, removing uncertainty about file layout, endpoint usage, builder patterns, and request option handling so contributors can deliver correct, consistent implementations quickly.

Core Features & Use Cases

  • Crate and path mapping: maps bizTag → feature crate and prescribes the crates/{crate}/src/{bizTag}/{project}/{version}/{resource...}/{name}.rs layout with fallbacks for existing structures.
  • Builder & transport conventions: templates for Body/Response structs and Builder patterns that must expose execute_with_options or send_with_options to forward RequestOption into Transport.
  • Service chain & exports: guidance for adding service.rs chain entrypoints and mod.rs exports so client.<biz>.service()... chaining works across crates.
  • DocPath tooling & references: a fetch_docpath.py script to extract request/response examples and a set of reference docs for file layout and standard examples.
  • Use case: add a new OpenLark REST API implementation, align endpoints/constants, ensure RequestOption propagation for tokens and headers, and validate with formatting, linting, and tests.

Quick Start

Locate the API in api_list_export.csv, choose the correct feature crate per tools/api_coverage.toml, create Body/Response types and a Builder that implements execute_with_options forwarding RequestOption to Transport, add the file under the prescribed path and export it in mod.rs and service.rs, then run formatting, linting, and tests.

Frequently Asked Questions about openlark-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new OpenLark API endpoint in a Rust monorepo?

Adding an OpenLark API endpoint requires creating Body/Response structs and a Builder that implements execute_with_options to forward RequestOption to Transport. You place the file under the prescribed crates layout path, then export it in mod.rs and service.rs for service chain access.

What is the correct file layout for OpenLark Rust API implementations?

The correct file layout maps bizTag to a feature crate using the path crates/{crate}/src/{bizTag}/{project}/{version}/{resource...}/{name}.rs, with fallbacks available for existing structures that do not match this standard.

How do I propagate RequestOption for tokens and headers in OpenLark API builders?

To propagate RequestOption for tokens and headers, your Builder must expose execute_with_options or send_with_options methods that forward the RequestOption directly into the Transport layer during the API call.

Can I use openlark-api for refactoring existing API handlers in Rust?

Yes, openlark-api provides a repeatable workflow for refactoring existing API handlers by enforcing crate-to-bizTag mapping, Builder patterns, and service chain exports to align existing implementations with consistent project conventions.

What's the best way to extract docPath request and response examples for OpenLark endpoints?

The best way to extract docPath examples is using the provided fetch_docpath.py script, which automates pulling request and response examples to help validate your API handler implementations against reference templates.