0.1.4 • Published 7 years ago

cms-task-api v0.1.4

Weekly downloads
-
License
ISC
Repository
-
Last release
7 years ago

内容管理系统任务 API

文档

使用 jsdoc 自动生成 api 文档,方便维护者查阅 npm run doc => ./node_modules/.bin/jsdoc lib/*.js

get start

npm i -D cms-task-api

Example

  const cms = require('cms-task-api')

  cms.login(user, pwd)

API description & signature

  • 登录

    login(user, pwd)
      Parameters:
      Name  Type  Description
      user  string  rtx账户
      pwd string  pin + token
  • 创建栏目

    createCatalog(name, cname, parent)
      Parameters:
      Name  Type  Description
      name  string  栏目名称
      cname string  栏目中文名称
      parent  string  栏目父栏目
  • 创建目录

    createDir(name, pathname)
      Parameters:
      Name  Type  Description
      name  string  目录名称
      pathname  string  目录路径
  • 上传模板

    createPage(pageName, htmlName, content, site, catalog)
      Parameters:
      Name  Type  Description
      pageName  string  页面名称
      htmlName  string  HTML文件名称
      content string  页面内容
      site  string  频道
      catalog string  栏目
  • 更新模板
    updatePage(id, content, site, catalog)
      Parameters:
      Name  Type  Description
      id  int 页面 id
      content string  页面内容
      site  string  频道
      catalog string  栏目
  • 同步模板
    syncPage(id, site, catalog)
      Parameters:
      Name  Type  Description
      id  int 页面 id
      site  string  频道
      catalog string  栏目
  • 上传素材
    addMaterial(file, target)
      Parameters:
      Name  Type  Description
      file  string  文件在本地的绝对路径
      target  string  上传的目标目录
0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago