Skip to content
Jiang Sheng edited this page Mar 31, 2016 · 1 revision

Views

  1. View Library
    Description: Display information for a specific library.
    Request url: /{authorizationKey}/v2/view
    Example: /{authorizationKey}/v2/view?library=WebSerial&version=1.0.0&disabled=1
    Supported url parameter:
  • library: the specific library to display
  • version: the specific version of the library to display
  • disabled: if set to 1, display a library even if it is disabled
  1. Add New Library
    Description: Add a new library to the system, or add a new version to an existing library. Support add a library from Github or from Zip file.
    Request url: /{authorizationKey}/v2/new

  2. Download Library Version
    Description: Download a specific version of a library.
    Request url: /{authorizationKey}/v2/download/{library header name}/{version}
    Example: /{authorizationKey}/v2/download/WebSerial/1.0.0

  3. Search Library
    Description: Search a library in the system.
    Request url: /{authorizationKey}/v2/search
    Example: /{authorizationKey}/v2/search?q=default
    Supported url parameter:

  • q: search keyword
  • json: if set to true, a JSON response will be returned rather than a HTML response.
  1. Check Github Updates
    Description: Check for Github updates for all existing libraries.
    Request url: /{authorizationKey}/v2/gitUpdates

APIs provided in the view controller

  1. Toggle Library Status
    Description: Enable/disable a library
    URI: POST /{authorizationKey}/v2/toggleStatus/{library}

  2. Get Library Github Information
    Description: Get Github information of the library, including branches and releases of this library.
    URI: POST /{authorizationKey}/v2/getLibGitInfo
    Request data (format: x-www-form-urlencoded):

  • githubUrl: the url of the library Github page
  1. Get Library Meta
    Description: Get meta information for a library
    URI: POST /{authorizationKey}/v2/getLibMeta/{library}

  2. Get Github Repo Tree Meta
    Description: Get meta information of a git tree.
    URI: POST /{authorizationKey}/v2/get_repo_tree_meta
    Request data (format: JSON):

  • githubUrl: the url of the library Github page
  • gitRef: the reference SHA of the git tree
Clone this wiki locally