文档
测试

添加水印

GET
http://foxconn.gateway.api.liyueyun.com/api/docread/:id/url/:watermark

接口描述

为阅读文档添加水印,会返回一个新的链接,可多次创建不同水印的链接

Params

参数名
类型
描述
必填
id
string
阅读id
必填
watermark
string
需要添加的水印(暂不支持中文)
必填

请求头

参数名
类型
描述
必填
Authorization
string
示例:Bearer a4ej3APoltdSZYiE
必填

Response

``` { "id": "T5Y28E5R2TM14KU1", "wid": "1MRKX1D4", "url": "http://docreader.liyueyun.com/#/read?id=T5Y28E5R2TM14KU1&wid=1MRKX1D4" } ``` > 在浏览器中直接打开 url, 如 window.open(url)

说明 / 示例

#### 错误列表 |httpCode|error|message| |-|-|-| |401|AccessTokenNoExist|必须有 accessToken| |401|AccessTokenIsInvalid|无效的 accessToken| |401|AccessTokenHasExpired|accessToken 已过期| |403|SecretIsInvalid|无效的 secret| |403|SecretHasDisabled|secret 已被禁用| |403|SecretError|secret 状态异常| |403|LimitExceeded|已超出用量限制| |400|ReadNotFound|没有找到阅读记录| #### 示例代码 ##### C#访问示例代码: ~~~CSharp var client = new RestClient("http://foxconn.gateway.api.liyueyun.com/api/docread/T5Y28E5R2TM14KU1/url/test"); client.Timeout = -1; var request = new RestRequest(Method.GET); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content); ~~~ # ##### Java访问示例代码: ~~~ java OkHttpClient client = new OkHttpClient().newBuilder() .build(); Request request = new Request.Builder() .url("http://foxconn.gateway.api.liyueyun.com/api/docread/T5Y28E5R2TM14KU1/url/test") .method("GET", null) .build(); Response response = client.newCall(request).execute(); ~~~ # #### Nodejs访问示例代码 ~~~javascript var axios = require('axios'); var config = { method: 'get', url: 'http://foxconn.gateway.api.liyueyun.com/api/docread/T5Y28E5R2TM14KU1/url/test' }; axios(config) .then(function (response) { console.log(JSON.stringify(response.data)); }) .catch(function (error) { console.log(error); }); ~~~