Skip to content

Commit

Permalink
docs(Other): 📝 fix readme format
Browse files Browse the repository at this point in the history
  • Loading branch information
guotingchao committed May 10, 2024
1 parent 362b129 commit 03a344f
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 48 deletions.
46 changes: 22 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,31 +161,29 @@ cosClient.upload({
#### **Usage Tencent STS**

```ts
const sts_client = await tencentCloudService.useClient(
TencentCloudClientType.STS,
);
expect(sts_client).toBeDefined();
expect(sts_client).toBeInstanceOf(StsProvider);
const tempSignature = await sts_client.createTemporary({
Name: 'Test',
Policy: encodeURI(
JSON.stringify({
version: '2.0',
statement: [
{
effect: 'allow',
action: ['name/cos:PutObject'],
resource: ['*'],
},
],
}),
),
DurationSeconds: 1800,
});


const sts_client = await tencentCloudService.useClient(
TencentCloudClientType.STS,
);
expect(sts_client).toBeDefined();
expect(sts_client).toBeInstanceOf(StsProvider);
const tempSignature = await sts_client.createTemporary({
Name: 'Test',
Policy: encodeURI(
JSON.stringify({
version: '2.0',
statement: [
{
effect: 'allow',
action: ['name/cos:PutObject'],
resource: ['*'],
},
],
}),
),
DurationSeconds: 1800,
});
```

#### 📝 [CHANGELOG](CHANGELOG.md)

#### License [MIT](https://github.com/guotingchao/nest-tencent-cloud-sdk/blob/main/LICENSE)
```
46 changes: 22 additions & 24 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,31 +161,29 @@ cosClient.upload({
#### **使用 Tencent STS**

```ts
const sts_client = await tencentCloudService.useClient(
TencentCloudClientType.STS,
);
expect(sts_client).toBeDefined();
expect(sts_client).toBeInstanceOf(StsProvider);
const tempSignature = await sts_client.createTemporary({
Name: 'Test',
Policy: encodeURI(
JSON.stringify({
version: '2.0',
statement: [
{
effect: 'allow',
action: ['name/cos:PutObject'],
resource: ['*'],
},
],
}),
),
DurationSeconds: 1800,
});


const sts_client = await tencentCloudService.useClient(
TencentCloudClientType.STS,
);
expect(sts_client).toBeDefined();
expect(sts_client).toBeInstanceOf(StsProvider);
const tempSignature = await sts_client.createTemporary({
Name: 'Test',
Policy: encodeURI(
JSON.stringify({
version: '2.0',
statement: [
{
effect: 'allow',
action: ['name/cos:PutObject'],
resource: ['*'],
},
],
}),
),
DurationSeconds: 1800,
});
```

#### 📝 [CHANGELOG](CHANGELOG.md)

#### License [MIT](https://github.com/guotingchao/nest-tencent-cloud-sdk/blob/main/LICENSE)
```

0 comments on commit 03a344f

Please sign in to comment.