File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -156,6 +156,25 @@ class API {
156156 throw new Error ( 'Create note failed' )
157157 }
158158 }
159+
160+ async listNotes ( ) {
161+ // https://hackmd.io/api/overview?v=1627369059523
162+ if ( this . enterprise ) {
163+ const response = await this . fetch ( url . resolve ( this . serverUrl , 'api/overview' ) , this . defaultFetchOptions )
164+
165+ return response . json ( )
166+ } else {
167+ throw new Error ( 'Not support' )
168+ }
169+ }
170+
171+ async listTeamNotes ( teamPath : string ) {
172+ if ( this . enterprise ) {
173+ return this . fetch ( url . resolve ( this . serverUrl , `api/overview/team/${ teamPath } ` ) , this . defaultFetchOptions ) . then ( res => res . json ( ) )
174+ } else {
175+ throw new Error ( 'Not support' )
176+ }
177+ }
159178
160179 private async exportRes ( noteId : string , type : ExportType ) {
161180 let res : Response
You can’t perform that action at this time.
0 commit comments