Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return context and structured metadata in rename API #381

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

GiniAppsPartners
Copy link
Contributor

Brief Summary of Changes

include contextual and/or structured metadata for the asset in the response

What does this PR address?

  • GitHub issue (Add reference - #XX)
  • Refactoring
  • New feature
  • Bug fix
  • Adds more tests

Are tests included?

  • Yes
  • No

Reviewer, please note:

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I ran the full test suite before pushing the changes and all the tests pass.

@GiniAppsPartners GiniAppsPartners self-assigned this Mar 29, 2022
@GiniAppsPartners GiniAppsPartners changed the title Feature/context metadata used by variables Return context and structured metadata in rename API Mar 29, 2022

func testRenameShouldReturnContext() throws {

try XCTSkipUnless(allowFolderDecouplingCalls, "prevents redundant call to Cloudinary PAID Folder Decoupling service. to allow Folder Decoupling service testing - set to true")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adimiz1 @const-cloudinary Let me know what the service I am trying to use thats blocking me because of my free account type, il change that afterward.

@@ -57,8 +59,8 @@ import Foundation
as well as performing actions on the request, such as cancelling, suspending or resuming it.
*/
@discardableResult
open func rename(_ publicId: String, to: String, overwrite: Bool? = nil, invalidate: Bool? = nil, params: CLDRenameRequestParams? = nil, completionHandler: ((_ result: CLDRenameResult?, _ error: Error?) -> ())? = nil) -> CLDRenameRequest {
let renameParams = CLDRenameRequestParams(fromPublicId: publicId, toPublicId: to, overwrite: overwrite, invalidate: invalidate)
open func rename(_ publicId: String, to: String, overwrite: Bool? = nil, invalidate: Bool? = nil, params: CLDRenameRequestParams? = nil, context: Bool? = nil, metadata: Bool? = nil, completionHandler: ((_ result: CLDRenameResult?, _ error: Error?) -> ())? = nil) -> CLDRenameRequest {
Copy link
Contributor

@adimiz1 adimiz1 Apr 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@const-cloudinary I think we should put the new optional parameters only in the CLRenameRequestParams and not part of the rename function

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AlexPinhasovLili please put the context and metadata params only in the CLDRenameRequestParams and not part of the rename function

@@ -57,8 +59,8 @@ import Foundation
as well as performing actions on the request, such as cancelling, suspending or resuming it.
*/
@discardableResult
open func rename(_ publicId: String, to: String, overwrite: Bool? = nil, invalidate: Bool? = nil, params: CLDRenameRequestParams? = nil, completionHandler: ((_ result: CLDRenameResult?, _ error: Error?) -> ())? = nil) -> CLDRenameRequest {
let renameParams = CLDRenameRequestParams(fromPublicId: publicId, toPublicId: to, overwrite: overwrite, invalidate: invalidate)
open func rename(_ publicId: String, to: String, overwrite: Bool? = nil, invalidate: Bool? = nil, params: CLDRenameRequestParams? = nil, context: Bool? = nil, metadata: Bool? = nil, completionHandler: ((_ result: CLDRenameResult?, _ error: Error?) -> ())? = nil) -> CLDRenameRequest {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AlexPinhasovLili please put the context and metadata params only in the CLDRenameRequestParams and not part of the rename function

@GiniAppsPartners GiniAppsPartners requested a review from adimiz1 April 4, 2022 18:39
@GiniAppsPartners
Copy link
Contributor Author

@adimiz1 This can be reviewed, no ?

@igy igy assigned adimiz1 and unassigned GiniAppsPartners Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants