File tree 4 files changed +28
-1
lines changed
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
7
7
LOCAL_OPENAPI_FILE=../../../gitbook-x/packages/api-client/static/openapi.yaml
8
8
9
9
if [[ -z " ${GITBOOK_OPENAPI_URL} " ]]; then
10
- OPENAPI_URL=" https://api.gitbook-staging .com/openapi.yaml"
10
+ OPENAPI_URL=" https://api.gitbook.com/openapi.yaml"
11
11
else
12
12
OPENAPI_URL=" ${GITBOOK_OPENAPI_URL} "
13
13
fi
Original file line number Diff line number Diff line change 7
7
"version" : " 0.11.0" ,
8
8
"sideEffects" : false ,
9
9
"files" : [
10
+ " README.md" ,
10
11
" spec/**" ,
11
12
" dist/**"
12
13
],
You can’t perform that action at this time.
0 commit comments