Skip to content

Commit

Permalink
Merge pull request #57 from visenze/feature/non_product_based_recs
Browse files Browse the repository at this point in the history
[API-9725] add non_product_based_recs  param
  • Loading branch information
thehung111 authored Jul 25, 2023
2 parents f40bb83 + b6b1ae4 commit 79dbd58
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -706,12 +706,12 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 23;
CURRENT_PROJECT_VERSION = 24;
DEVELOPMENT_TEAM = 345PN8HV64;
INFOPLIST_FILE = Example/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.10.5;
MARKETING_VERSION = 1.10.6;
PRODUCT_BUNDLE_IDENTIFIER = com.visenze.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -723,12 +723,12 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 23;
CURRENT_PROJECT_VERSION = 24;
DEVELOPMENT_TEAM = 345PN8HV64;
INFOPLIST_FILE = Example/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.10.5;
MARKETING_VERSION = 1.10.6;
PRODUCT_BUNDLE_IDENTIFIER = com.visenze.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand Down
2 changes: 1 addition & 1 deletion ViSearchSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Pod::Spec.new do |s|


s.name = "ViSearchSDK"
s.version = "1.10.5"
s.version = "1.10.6"
s.summary = "A Visual Search API solution (Swift SDK)"

s.description = <<-DESC
Expand Down
8 changes: 4 additions & 4 deletions ViSearchSDK/ViSearchSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "";
CURRENT_PROJECT_VERSION = 23;
CURRENT_PROJECT_VERSION = 24;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = NKN6QECX9M;
DYLIB_COMPATIBILITY_VERSION = 1;
Expand All @@ -684,7 +684,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.10.5;
MARKETING_VERSION = 1.10.6;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++11";
PRODUCT_BUNDLE_IDENTIFIER = com.visenze.ViSearchSDK;
Expand All @@ -699,7 +699,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "";
CURRENT_PROJECT_VERSION = 23;
CURRENT_PROJECT_VERSION = 24;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = NKN6QECX9M;
DYLIB_COMPATIBILITY_VERSION = 1;
Expand All @@ -718,7 +718,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.10.5;
MARKETING_VERSION = 1.10.6;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++11";
PRODUCT_BUNDLE_IDENTIFIER = com.visenze.ViSearchSDK;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ open class ViSearchByIdParam : ViBaseProductSearchParam {

public var showBestProductImages: Bool? = nil

public var nonProductBasedRecs: Bool? = nil

public var boxList : [String] = []

/// Constructor, checks for non-empty productId
Expand Down Expand Up @@ -84,6 +86,10 @@ open class ViSearchByIdParam : ViBaseProductSearchParam {
dict["show_best_product_images"] = showBestProductImages ? "true" : "false"
}

if let nonProductBasedRecs = nonProductBasedRecs {
dict["non_product_based_recs"] = nonProductBasedRecs ? "true" : "false"
}

if !boxList.isEmpty {
dict["box"] = boxList
}
Expand Down
6 changes: 6 additions & 0 deletions ViSearchSDK/ViSearchSDK/Classes/Request/ViRecParams.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public class ViRecParams: ViSearchParams {

public var showBestProductImages: Bool? = nil

public var nonProductBasedRecs: Bool? = nil

public override init?(imName: String) {
super.init(imName: imName)
}
Expand Down Expand Up @@ -56,6 +58,10 @@ public class ViRecParams: ViSearchParams {
dict["use_set_based_ctl"] = useSetBasedCtl ? "true" : "false"
}

if let nonProductBasedRecs = nonProductBasedRecs {
dict["non_product_based_recs"] = nonProductBasedRecs ? "true" : "false"
}

if let setLimit = self.setLimit {
dict["set_limit"] = String(setLimit)
}
Expand Down
2 changes: 1 addition & 1 deletion ViSearchSDK/ViSearchSDK/Classes/ViSearchClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ open class ViSearchClient: NSObject, URLSessionDelegate {
public var timeoutInterval : TimeInterval = 10 // how long to timeout request
public var requestSerialization: ViRequestSerialization

public var userAgent : String = "visearch-swift-sdk/1.10.5"
public var userAgent : String = "visearch-swift-sdk/1.10.6"
public static let userAgentHeader : String = "X-Requested-With"

// whether to authenticate by appkey or by access/secret key point
Expand Down

0 comments on commit 79dbd58

Please sign in to comment.