Skip to content

Commit

Permalink
feat: 新版挂件-优化平台分类
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Jul 29, 2023
1 parent e348d89 commit 9dea195
Show file tree
Hide file tree
Showing 22 changed files with 353 additions and 88 deletions.
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -61,8 +61,10 @@
"zhi-common": "^1.11.5",
"zhi-device": "^2.3.0",
"zhi-fetch-middleware": "^0.1.19",
"zhi-github-middleware": "^0.1.0",
"zhi-lib-base": "^0.4.2",
"zhi-siyuan-api": "^1.27.2",
"zhi-wechatsync-middleware": "^0.1.2",
"zhi-xmlrpc-middleware": "^0.2.19"
}
}
116 changes: 112 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -32,8 +32,8 @@ import { BlogApi } from "zhi-blog-api"
* @version 0.9.0
* @since 0.9.0
*/
class GithubApiAdaptor extends BlogApi {
class CommonGithubApiAdaptor extends BlogApi {

}

export { GithubApiAdaptor }
export { CommonGithubApiAdaptor }
28 changes: 28 additions & 0 deletions src/adaptors/api/base/github/config/CommonGithubConfig.ts
@@ -0,0 +1,28 @@
/*
* Copyright (c) 2023, Terwer . All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Terwer designates this
* particular file as subject to the "Classpath" exception as provided
* by Terwer in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com
* or visit www.terwer.space if you need additional information or have any
* questions.
*/

class CommonGithubConfig {}

export { CommonGithubConfig }
3 changes: 3 additions & 0 deletions src/adaptors/index.ts
Expand Up @@ -51,6 +51,9 @@ class Adaptors {
const type: SubPlatformType = getSubPlatformTypeByKey(key)

switch (type) {
case SubPlatformType.Common_Zhihu:{
break
}
case SubPlatformType.Common_Yuque: {
const { blogApi } = await useYuqueApi(key, newCfg)
blogAdaptor = blogApi
Expand Down

0 comments on commit 9dea195

Please sign in to comment.