Skip to content

Commit

Permalink
chore: update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lgou2w committed Apr 23, 2023
1 parent a3de1b3 commit 1e6fdbd
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
45 changes: 45 additions & 0 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,51 @@ PicaComicAPI.switchComicFavourite(payload: AuthorizationPayload & ComicIdPayload
PicaComicAPI.setUserProfileSlogan(payload: AuthorizationPayload & UserProfileSloganPayload): Promise<BaseResponse<undefined>>
```

### .stringifyImageUrl

```typescript
/**
* 将给定的图像媒体数据字符串化为图像 URL 链接。
*
* @param payload - ImageMediaPayload = ImageMedia | {
* path - 路径名称
* fileServer - 文件服务器(可选)
* }
* @return string
*/
PicaComicAPI.stringifyImageUrl(payload: ImageMediaPayload): string
```

### .createImageRequest

```typescript
/**
* 从给定的图像媒体数据创建一个图像请求。
*
* @param payload - ImageMediaPayload = ImageMedia | {
* path - 路径名称
* fileServer - 文件服务器(可选)
* }
* @return Request (Got request)
*/
PicaComicAPI.createImageRequest(payload: ImageMediaPayload): got.Request
```

### .createImageRequestAsBuffer

```typescript
/**
* 从给定的图像媒体数据创建一个图像请求并写入到缓冲区。
*
* @param payload - ImageMediaPayload = ImageMedia | {
* path - 路径名称
* fileServer - 文件服务器(可选)
* }
* @return Buffer
*/
PicaComicAPI.createImageRequestAsBuffer(payload: ImageMediaPayload): Promise<Buffer>
```

## 客户端

客户端只是对单个账户操作的封装,不需要自己去处理令牌失效的问题。
Expand Down
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,51 @@ PicaComicAPI.switchComicFavourite(payload: AuthorizationPayload & ComicIdPayload
PicaComicAPI.setUserProfileSlogan(payload: AuthorizationPayload & UserProfileSloganPayload): Promise<BaseResponse<undefined>>
```

### .stringifyImageUrl

```typescript
/**
* Stringify the given image media data into image url.
*
* @param payload - ImageMediaPayload = ImageMedia | {
* path - Path name
* fileServer - File server (Optional)
* }
* @return string
*/
PicaComicAPI.stringifyImageUrl(payload: ImageMediaPayload): string
```

### .createImageRequest

```typescript
/**
* Create an image request from the given image media data.
*
* @param payload - ImageMediaPayload = ImageMedia | {
* path - Path name
* fileServer - File server (Optional)
* }
* @return Request (Got request)
*/
PicaComicAPI.createImageRequest(payload: ImageMediaPayload): got.Request
```

### .createImageRequestAsBuffer

```typescript
/**
* Create an image request and as buffer from the given image media data.
*
* @param payload - ImageMediaPayload = ImageMedia | {
* path - Path name
* fileServer - File server (Optional)
* }
* @return Buffer
*/
PicaComicAPI.createImageRequestAsBuffer(payload: ImageMediaPayload): Promise<Buffer>
```

## Client

The client is just a wrapper for a single account operation, and does not need to handle the problem of token invalidation by itself.
Expand Down

0 comments on commit 1e6fdbd

Please sign in to comment.