File tree Expand file tree Collapse file tree 4 files changed +28
-1
lines changed
Expand file tree Collapse file tree 4 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @gitbook/api ' : patch
3+ ---
4+
5+ Document the @gitbook/api package and update the OpenAPI spec
Original file line number Diff line number Diff line change 1+ # ` @gitbook/api `
2+
3+ Javascript (Browser and Node) API client for the [ GitBook API] ( https://developer.gitbook.com/ ) .
4+
5+ ## Installation
6+
7+ ```
8+ npm install @gitbook/api
9+ ```
10+
11+ ## Usage
12+
13+ ``` ts
14+ import { GitBookAPI } from ' @gitbook/api' ;
15+
16+ const gitbook = new GitBookAPI ({
17+ authToken: ' gb_abc,
18+ });
19+
20+ const { data } = await gitbook ..spaces .getSpaceById (' abc' );
21+ ```
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ mkdir ./spec
77LOCAL_OPENAPI_FILE=../../../gitbook-x/packages/api-client/static/openapi.yaml
88
99if [[ -z " ${GITBOOK_OPENAPI_URL} " ]]; then
10- OPENAPI_URL=" https://api.gitbook-staging .com/openapi.yaml"
10+ OPENAPI_URL=" https://api.gitbook.com/openapi.yaml"
1111else
1212 OPENAPI_URL=" ${GITBOOK_OPENAPI_URL} "
1313fi
Original file line number Diff line number Diff line change 77 "version" : " 0.11.0" ,
88 "sideEffects" : false ,
99 "files" : [
10+ " README.md" ,
1011 " spec/**" ,
1112 " dist/**"
1213 ],
You can’t perform that action at this time.
0 commit comments