Skip to content

Commit

Permalink
remove already removed method (#1155)
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 authored May 21, 2023
1 parent 5144d0d commit e6eb60d
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 63 deletions.
4 changes: 1 addition & 3 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ var s3Client = new Minio.Client({
| [`getBucketTagging`](#getBucketTagging) | [`removeIncompleteUpload`](#removeIncompleteUpload) | | | | |
| [`setBucketTagging`](#setBucketTagging) | [`putObjectRetention`](#putObjectRetention) | | | | |
| [`removeBucketTagging`](#removeBucketTagging) | [`getObjectRetention`](#getObjectRetention) | | | | |
| [`setBucketLifecycle`](#setBucketLifecycle) | [`putObjectTagging`](#putObjectTagging) | | | | |
| [`setBucketLifecycle`](#setBucketLifecycle) | [`setObjectTagging`](#setObjectTagging) | | | | |
| [`getBucketLifecycle`](#getBucketLifecycle) | [`removeObjectTagging`](#removeObjectTagging) | | | | |
| [`removeBucketLifecycle`](#removeBucketLifecycle) | [`getObjectTagging`](#getObjectTagging) | | | | |
| [`setObjectLockConfig`](#setObjectLockConfig) | [`getObjectLegalHold`](#getObjectLegalHold) | | | | |
Expand Down Expand Up @@ -1487,8 +1487,6 @@ minioClient.getObjectRetention('bucketname', 'bucketname', { versionId: "my-vers
})
```

<a name="putObjectTagging"></a>
### putObjectTagging(bucketName, objectName, tags[, putOpts, callback])
<a name="setObjectTagging"></a>
### setObjectTagging(bucketName, objectName, tags[, putOpts, callback])

Expand Down
25 changes: 0 additions & 25 deletions src/minio.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -446,31 +446,6 @@ export class Client {
): void
getObjectRetention(bucketName: string, objectName: string, options: VersionIdentificator): Promise<Retention>

// It seems, putObjectTagging is deprecated in favor or setObjectTagging - there is no such a method in the library source code
/**
* @deprecated Use setObjectTagging instead.
*/
putObjectTagging(bucketName: string, objectName: string, tags: TagList, callback: NoResultCallback): void
/**
* @deprecated Use setObjectTagging instead.
*/
putObjectTagging(
bucketName: string,
objectName: string,
tags: TagList,
putOptions: VersionIdentificator,
callback: NoResultCallback,
): void
/**
* @deprecated Use setObjectTagging instead.
*/
putObjectTagging(
bucketName: string,
objectName: string,
tags: TagList,
putOptions?: VersionIdentificator,
): Promise<void>

setObjectTagging(bucketName: string, objectName: string, tags: TagList, callback: NoResultCallback): void
setObjectTagging(
bucketName: string,
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/functional-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -2481,7 +2481,7 @@ describe('functional tests', function () {
},
)

step(`putObjectTagging object_bucketName:${tagsBucketName}, objectName:${tagObjName},`, (done) => {
step(`setObjectTagging object_bucketName:${tagsBucketName}, objectName:${tagObjName},`, (done) => {
client.setObjectTagging(tagsBucketName, tagObjName, { 'test-tag-key-obj': 'test-tag-value-obj' }, (err) => {
if (err && err.code === 'NotImplemented') {
return done()
Expand Down
34 changes: 0 additions & 34 deletions tests/unit/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -958,40 +958,6 @@ describe('Client', function () {
}
})
})
describe('Put Object Tags', () => {
it('should fail on null object', (done) => {
try {
client.putObjectTagging('my-bucket-name', null, {}, function () {})
} catch (e) {
done()
}
})
it('should fail on empty object', (done) => {
try {
client.putObjectTagging('my-bucket-name', null, {}, function () {})
} catch (e) {
done()
}
})
it('should fail on non object tags', (done) => {
try {
client.putObjectTagging('my-bucket-name', null, 'non-obj-tag', function () {})
} catch (e) {
done()
}
})
it('should fail if tags are more than 50 on an object', (done) => {
const _50_plus_key_tags = {}
for (let i = 0; i < 51; i += 1) {
_50_plus_key_tags[i] = i
}
try {
client.putObjectTagging('my-bucket-name', null, _50_plus_key_tags, function () {})
} catch (e) {
done()
}
})
})
describe('Get Object Tags', () => {
it('should fail on invalid bucket', (done) => {
try {
Expand Down

0 comments on commit e6eb60d

Please sign in to comment.