From b688cb144b51bbfbfb22086549b2532d7411c73b Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Wed, 25 Oct 2023 12:30:26 +0530 Subject: [PATCH] 8.15.0 Version (#289) --- CHANGELOG.md | 5 + .../bvsdkdemoandroid/DemoUserTokenFactory.kt | 10 +- .../bazaarvoice/bvandroidsdk/BaseReview.java | 5 + .../bvandroidsdk/ConversationsUnitTest.java | 10 + .../reviews_with_original_product_name.json | 565 ++++++++++++++++++ .../bvandroidsdk/BVRecommendations.java | 3 +- 6 files changed, 596 insertions(+), 2 deletions(-) create mode 100644 bvconversations/src/test/resources/reviews_with_original_product_name.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 285ef66d..79ce0f83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +# 8.15.0 +## Add Product Level Attribution. + +* Added Support for OriginalProductName to base review. + # 8.14.0 ## Upgrade Gradle diff --git a/app/src/main/java/com/bazaarvoice/bvsdkdemoandroid/DemoUserTokenFactory.kt b/app/src/main/java/com/bazaarvoice/bvsdkdemoandroid/DemoUserTokenFactory.kt index af32b5a3..856708f6 100644 --- a/app/src/main/java/com/bazaarvoice/bvsdkdemoandroid/DemoUserTokenFactory.kt +++ b/app/src/main/java/com/bazaarvoice/bvsdkdemoandroid/DemoUserTokenFactory.kt @@ -1,5 +1,6 @@ package com.bazaarvoice.bvsdkdemoandroid +import java.security.SecureRandom import java.text.SimpleDateFormat import java.util.* import javax.crypto.Mac @@ -12,6 +13,7 @@ import javax.crypto.spec.SecretKeySpec internal object DemoUserTokenFactory { var UAS:String? = null + private val secureRandom = SecureRandom() @JvmStatic @JvmName("generateUserToken") internal fun generateUserToken(userEmail: String, userId: String, encodingKey: String): String { @@ -49,11 +51,17 @@ internal object DemoUserTokenFactory { if(UAS != null) { return UAS!! } - val mockEncodingKey = "mockencodingkey" + val mockEncodingKey = generateRandomKey().toHex(); val id = Date().time val mockEmail = "bvtestuser$id@bv.com" val mockUserId = "local-$id" UAS = generateUserToken(mockEmail, mockUserId, mockEncodingKey) return UAS!! } + + private fun generateRandomKey(): ByteArray { + val key = ByteArray(32) + secureRandom.nextBytes(key) + return key + } } \ No newline at end of file diff --git a/bvconversations/src/main/java/com/bazaarvoice/bvandroidsdk/BaseReview.java b/bvconversations/src/main/java/com/bazaarvoice/bvandroidsdk/BaseReview.java index b99f74f1..0b5129ad 100644 --- a/bvconversations/src/main/java/com/bazaarvoice/bvandroidsdk/BaseReview.java +++ b/bvconversations/src/main/java/com/bazaarvoice/bvandroidsdk/BaseReview.java @@ -49,6 +49,11 @@ public abstract class BaseReview extends IncludedContentBase.ProductIncludedCont private Boolean isRecommended; @SerializedName(value = "IsSyndicated", alternate = "isSyndicated") private Boolean isSyndicated; + public String getOriginalProductName() { + return originalProductName; + } + @SerializedName(value = "OriginalProductName", alternate = "originalProductName") + private String originalProductName; @SerializedName(value = "IsRatingsOnly", alternate = "isRatingsOnly") private Boolean isRatingsOnly; @SerializedName(value = "Rating", alternate = "rating") diff --git a/bvconversations/src/test/java/com/bazaarvoice/bvandroidsdk/ConversationsUnitTest.java b/bvconversations/src/test/java/com/bazaarvoice/bvandroidsdk/ConversationsUnitTest.java index b8dd007e..9d66b80b 100644 --- a/bvconversations/src/test/java/com/bazaarvoice/bvandroidsdk/ConversationsUnitTest.java +++ b/bvconversations/src/test/java/com/bazaarvoice/bvandroidsdk/ConversationsUnitTest.java @@ -852,4 +852,14 @@ public void testQAStatsStatisticsResponse() throws Exception { assertEquals(5, response.getResults().get(0).getProductStatistics().getQAStatistics().getTotalAnswerCount().intValue()); } + + @Test + public void testReviewForOriginalProductName() throws Exception { + + ReviewResponse response = parseJsonResourceFile("reviews_with_original_product_name.json", ReviewResponse.class, gson); + Review firstReview = response.getResults().get(0); + + assertEquals("14K White Gold Diamond Teardrop Necklace", firstReview.getOriginalProductName()); + + } } \ No newline at end of file diff --git a/bvconversations/src/test/resources/reviews_with_original_product_name.json b/bvconversations/src/test/resources/reviews_with_original_product_name.json new file mode 100644 index 00000000..f6c861ba --- /dev/null +++ b/bvconversations/src/test/resources/reviews_with_original_product_name.json @@ -0,0 +1,565 @@ +{ + "Limit": 10, + "Offset": 0, + "TotalResults": 93, + "Locale": "en_US", + "Results": [ + { + "Id": "45570991", + "CID": "bf4e3477-cdb9-518a-bcc2-9e8a05a6e081", + "SourceClient": "conciergeapidocumentation", + "LastModeratedTime": "2023-01-20T16:00:03.000+00:00", + "LastModificationTime": "2023-04-24T07:51:58.000+00:00", + "ProductId": "data-gen-moppq9ekthfzbc6qff3bqokie", + "OriginalProductName": "14K White Gold Diamond Teardrop Necklace", + "AuthorId": "jhan23", + "ContentLocale": "en_US", + "IsFeatured": false, + "TotalInappropriateFeedbackCount": 0, + "TotalClientResponseCount": 0, + "TotalCommentCount": 0, + "Rating": 5, + "IsRatingsOnly": false, + "IsRecommended": false, + "Helpfulness": 1.0, + "TotalFeedbackCount": 1, + "TotalNegativeFeedbackCount": 0, + "TotalPositiveFeedbackCount": 1, + "ModerationStatus": "APPROVED", + "SubmissionId": "r215597_1__16741378XUao2E60EY", + "SubmissionTime": "2023-01-19T14:17:07.000+00:00", + "ReviewText": "test test test test test test test test tes ttesttest", + "Title": "Test test", + "UserNickname": "jhcontentent", + "AdditionalFields": {}, + "Badges": {}, + "TagDimensionsOrder": [], + "CampaignId": null, + "SecondaryRatingsOrder": [], + "CommentIds": [], + "Pros": null, + "IsSyndicated": false, + "RatingRange": 5, + "SecondaryRatings": {}, + "BadgesOrder": [], + "Photos": [], + "ClientResponses": [], + "ContextDataValues": {}, + "AdditionalFieldsOrder": [], + "TagDimensions": {}, + "ProductRecommendationIds": [], + "Videos": [], + "Cons": null, + "UserLocation": null, + "ContextDataValuesOrder": [], + "InappropriateFeedbackList": [] + }, + { + "Id": "45260602", + "CID": "fed95f37-b127-5127-8917-3b4503e319e3", + "SourceClient": "conciergeapidocumentation", + "LastModeratedTime": "2022-11-04T12:45:01.000+00:00", + "LastModificationTime": "2023-04-25T08:50:21.000+00:00", + "ProductId": "data-gen-moppq9ekthfzbc6qff3bqokie", + "OriginalProductName": "14K White Gold Diamond Teardrop Necklace", + "AuthorId": "jhant", + "ContentLocale": "en_US", + "IsFeatured": false, + "TotalInappropriateFeedbackCount": 0, + "TotalClientResponseCount": 0, + "TotalCommentCount": 0, + "Rating": 5, + "IsRatingsOnly": false, + "IsRecommended": false, + "Helpfulness": 0.5, + "TotalFeedbackCount": 2, + "TotalNegativeFeedbackCount": 1, + "TotalPositiveFeedbackCount": 1, + "ModerationStatus": "APPROVED", + "SubmissionId": "r215597_1__16675656EVr1UUFi3w", + "SubmissionTime": "2022-11-04T12:41:33.000+00:00", + "ReviewText": "usernickname can be used on 2 different products or not testreviewtest jhcontest", + "Title": "Test", + "UserNickname": "jhcontest12", + "AdditionalFields": {}, + "Badges": {}, + "TagDimensionsOrder": [], + "CampaignId": null, + "SecondaryRatingsOrder": [], + "CommentIds": [], + "Pros": null, + "IsSyndicated": false, + "RatingRange": 5, + "SecondaryRatings": {}, + "BadgesOrder": [], + "Photos": [], + "ClientResponses": [], + "ContextDataValues": {}, + "AdditionalFieldsOrder": [], + "TagDimensions": {}, + "ProductRecommendationIds": [], + "Videos": [], + "Cons": null, + "UserLocation": null, + "ContextDataValuesOrder": [], + "InappropriateFeedbackList": [] + }, + { + "Id": "45130164", + "CID": "5aafe629-ebcc-5937-b059-8fa377ec1f73", + "SourceClient": "conciergeapidocumentation", + "LastModeratedTime": "2022-10-18T07:30:01.000+00:00", + "LastModificationTime": "2022-10-18T07:30:01.000+00:00", + "ProductId": "data-gen-moppq9ekthfzbc6qff3bqokie", + "OriginalProductName": "14K White Gold Diamond Teardrop Necklace", + "AuthorId": "jhansi", + "ContentLocale": "en_US", + "IsFeatured": false, + "TotalInappropriateFeedbackCount": 0, + "TotalClientResponseCount": 0, + "TotalCommentCount": 0, + "Rating": 5, + "IsRatingsOnly": false, + "IsRecommended": false, + "TotalFeedbackCount": 0, + "TotalNegativeFeedbackCount": 0, + "TotalPositiveFeedbackCount": 0, + "ModerationStatus": "APPROVED", + "SubmissionId": "r215597_1__16660780fRl9R7O1zI", + "SubmissionTime": "2022-10-18T07:27:50.000+00:00", + "ReviewText": "usernickname can be used on 2 different products or not testreviewtest jhcontest", + "Title": "Test", + "UserNickname": "jhcontest1", + "AdditionalFields": {}, + "Badges": {}, + "TagDimensionsOrder": [], + "CampaignId": null, + "SecondaryRatingsOrder": [], + "CommentIds": [], + "Pros": null, + "IsSyndicated": false, + "RatingRange": 5, + "SecondaryRatings": {}, + "BadgesOrder": [], + "Helpfulness": null, + "Photos": [], + "ClientResponses": [], + "ContextDataValues": {}, + "AdditionalFieldsOrder": [], + "TagDimensions": {}, + "ProductRecommendationIds": [], + "Videos": [], + "Cons": null, + "UserLocation": null, + "ContextDataValuesOrder": [], + "InappropriateFeedbackList": [] + }, + { + "Id": "45130158", + "CID": "f752e45d-ee22-529e-b266-abb0d7df6ac0", + "SourceClient": "conciergeapidocumentation", + "LastModeratedTime": "2022-10-18T06:45:01.000+00:00", + "LastModificationTime": "2022-10-18T06:45:01.000+00:00", + "ProductId": "data-gen-moppq9ekthfzbc6qff3bqokie", + "OriginalProductName": "14K White Gold Diamond Teardrop Necklace", + "AuthorId": "jhan", + "ContentLocale": "en_US", + "IsFeatured": false, + "TotalInappropriateFeedbackCount": 0, + "TotalClientResponseCount": 0, + "TotalCommentCount": 0, + "Rating": 5, + "IsRatingsOnly": false, + "IsRecommended": false, + "TotalFeedbackCount": 0, + "TotalNegativeFeedbackCount": 0, + "TotalPositiveFeedbackCount": 0, + "ModerationStatus": "APPROVED", + "SubmissionId": "r215597_1__16660750yteg1VnGGW", + "SubmissionTime": "2022-10-18T06:37:04.000+00:00", + "ReviewText": "test1 tes1t tes1t te1st 1test te1st te1st user1nickname can be used on 2 dif1ferent produc1ts or not testreviewtest jhcontest", + "Title": "Test", + "UserNickname": "jhcontest1234", + "AdditionalFields": {}, + "Badges": {}, + "TagDimensionsOrder": [], + "CampaignId": null, + "SecondaryRatingsOrder": [], + "CommentIds": [], + "Pros": null, + "IsSyndicated": false, + "RatingRange": 5, + "SecondaryRatings": {}, + "BadgesOrder": [], + "Helpfulness": null, + "Photos": [], + "ClientResponses": [], + "ContextDataValues": {}, + "AdditionalFieldsOrder": [], + "TagDimensions": {}, + "ProductRecommendationIds": [], + "Videos": [], + "Cons": null, + "UserLocation": null, + "ContextDataValuesOrder": [], + "InappropriateFeedbackList": [] + }, + { + "Id": "41173932", + "CID": "9b2569f6-64e2-585e-a09d-cdc3d3cdc14c", + "SourceClient": "conciergeapidocumentation", + "Badges": { + "top100": { + "ContentType": "REVIEW", + "Id": "top100", + "BadgeType": "Merit" + } + }, + "BadgesOrder": [ + "top100" + ], + "LastModeratedTime": "2022-08-12T12:45:01.000+00:00", + "LastModificationTime": "2022-08-12T12:45:01.000+00:00", + "ProductId": "data-gen-moppq9ekthfzbc6qff3bqokie", + "OriginalProductName": "14K White Gold Diamond Teardrop Necklace", + "AuthorId": "jh12345", + "ContentLocale": "en_US", + "IsFeatured": false, + "TotalInappropriateFeedbackCount": 0, + "TotalClientResponseCount": 0, + "TotalCommentCount": 0, + "Rating": 5, + "IsRatingsOnly": false, + "IsRecommended": false, + "TotalFeedbackCount": 0, + "TotalNegativeFeedbackCount": 0, + "TotalPositiveFeedbackCount": 0, + "ModerationStatus": "APPROVED", + "SubmissionId": "r215597_1__16603074ysPxWAvo4U", + "SubmissionTime": "2022-08-12T12:30:07.000+00:00", + "ReviewText": "test test test test test test test usernickname can be used on 2 different products or not testreviewtest jhcontest", + "Title": "Test", + "UserNickname": "jhcontest", + "AdditionalFields": {}, + "TagDimensionsOrder": [], + "CampaignId": null, + "SecondaryRatingsOrder": [], + "CommentIds": [], + "Pros": null, + "IsSyndicated": false, + "RatingRange": 5, + "SecondaryRatings": {}, + "Helpfulness": null, + "Photos": [], + "ClientResponses": [], + "ContextDataValues": {}, + "AdditionalFieldsOrder": [], + "TagDimensions": {}, + "ProductRecommendationIds": [], + "Videos": [], + "Cons": null, + "UserLocation": null, + "ContextDataValuesOrder": [], + "InappropriateFeedbackList": [] + }, + { + "Id": "39324798", + "CID": "3ee69ba2-52f1-5b09-843e-9f8d3fa26288", + "SourceClient": "conciergeapidocumentation", + "LastModeratedTime": "2022-02-17T21:30:01.000+00:00", + "LastModificationTime": "2022-02-17T21:30:01.000+00:00", + "ProductId": "data-gen-moppq9ekthfzbc6qff3bqokie", + "OriginalProductName": "14K White Gold Diamond Teardrop Necklace", + "AuthorId": "119654352", + "ContentLocale": "en_US", + "IsFeatured": false, + "TotalInappropriateFeedbackCount": 0, + "TotalClientResponseCount": 0, + "TotalCommentCount": 0, + "Rating": 5, + "IsRatingsOnly": false, + "TotalFeedbackCount": 0, + "TotalNegativeFeedbackCount": 0, + "TotalPositiveFeedbackCount": 0, + "ModerationStatus": "APPROVED", + "SubmissionId": "r215597_1__16451326KdUvlnWQEh", + "SubmissionTime": "2022-02-17T21:18:16.000+00:00", + "ReviewText": "test test test Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure L", + "Title": "This is a test for Bazar voice", + "UserNickname": "Cayetano Rosales test", + "AdditionalFields": {}, + "Badges": {}, + "TagDimensionsOrder": [], + "CampaignId": null, + "SecondaryRatingsOrder": [], + "CommentIds": [], + "Pros": null, + "IsSyndicated": false, + "RatingRange": 5, + "SecondaryRatings": {}, + "BadgesOrder": [], + "Helpfulness": null, + "Photos": [], + "ClientResponses": [], + "ContextDataValues": {}, + "AdditionalFieldsOrder": [], + "TagDimensions": {}, + "IsRecommended": null, + "ProductRecommendationIds": [], + "Videos": [], + "Cons": null, + "UserLocation": null, + "ContextDataValuesOrder": [], + "InappropriateFeedbackList": [] + }, + { + "Id": "39080937", + "CID": "b81059a1-d18d-5cff-9285-87d42b04de84", + "SourceClient": "conciergeapidocumentation", + "LastModeratedTime": "2022-02-10T18:45:01.000+00:00", + "LastModificationTime": "2022-02-21T14:50:07.000+00:00", + "ProductId": "data-gen-moppq9ekthfzbc6qff3bqokie", + "OriginalProductName": "14K White Gold Diamond Teardrop Necklace", + "ClientResponses": [ + { + "Department": "Ministry of funny walks", + "Response": "This is a response via Workbench", + "ResponseType": "Response Type is only for classification; not displayed on client site", + "ResponseSource": "Workbench", + "Name": "A staff member", + "Date": "2022-02-21T14:50:07.000+00:00", + "SourceClientName": "ConciergeAPIDocumentation" + } + ], + "AuthorId": "118913529", + "ContentLocale": "en_US", + "IsFeatured": false, + "TotalInappropriateFeedbackCount": 0, + "TotalClientResponseCount": 1, + "TotalCommentCount": 0, + "Rating": 5, + "IsRatingsOnly": false, + "TotalFeedbackCount": 0, + "TotalNegativeFeedbackCount": 0, + "TotalPositiveFeedbackCount": 0, + "ModerationStatus": "APPROVED", + "SubmissionId": "r215597_1__16445180oOpNH7GiOn", + "SubmissionTime": "2022-02-10T18:33:36.000+00:00", + "ReviewText": "This is our first integration to BV laksdf Test I use this jacket as a technical piece for higher endurance hikes mostly. I layer it with a M3 marmot softshell for crushing colder weather or under a rain shell. It works great for almost all cold weather activities. It does fall short in really cold weather as a stand alone piece so I recommend layering or going with something built for that weather. I try to base all of my coat and jacket reviews on the shoulder space for technical pieces, and this jacket is perfect for my body type (i.e. fit dad bod lol).", + "Title": "Wooow this is awesome", + "UserNickname": "Cayetano Integration", + "AdditionalFields": {}, + "Badges": {}, + "TagDimensionsOrder": [], + "CampaignId": null, + "SecondaryRatingsOrder": [], + "CommentIds": [], + "Pros": null, + "IsSyndicated": false, + "RatingRange": 5, + "SecondaryRatings": {}, + "BadgesOrder": [], + "Helpfulness": null, + "Photos": [], + "ContextDataValues": {}, + "AdditionalFieldsOrder": [], + "TagDimensions": {}, + "IsRecommended": null, + "ProductRecommendationIds": [], + "Videos": [], + "Cons": null, + "UserLocation": null, + "ContextDataValuesOrder": [], + "InappropriateFeedbackList": [] + }, + { + "Id": "35313930", + "CID": "a874034a-0dd8-5925-bcae-b76ee2b68365", + "SourceClient": "conciergeapidocumentation", + "LastModeratedTime": "2021-03-08T10:15:00.000+00:00", + "LastModificationTime": "2022-02-09T10:06:21.000+00:00", + "ProductId": "data-gen-moppq9ekthfzbc6qff3bqokie", + "OriginalProductName": "14K White Gold Diamond Teardrop Necklace", + "AuthorId": "ernst55", + "ContentLocale": "en_US", + "IsFeatured": false, + "InappropriateFeedbackList": [ + { + "AuthorId": "zhl1j6hp09pb3c26gzrcsrczw8", + "SubmissionTime": "2022-06-21T05:32:49.000+00:00" + }, + { + "AuthorId": "zaz03hcbcj0mjyblc11v43bt3e", + "SubmissionTime": "2021-03-11T10:14:50.000+00:00" + }, + { + "AuthorId": "za0mx5p2vt79127exw9yabuwl6", + "SubmissionTime": "2021-03-09T14:53:46.000+00:00" + }, + { + "AuthorId": "ziqazrz821bc95n96stquhro4s", + "SubmissionTime": "2021-03-09T14:46:06.000+00:00" + }, + { + "AuthorId": "z6xgwcd1zt5sy3viztabovfwct", + "SubmissionTime": "2021-03-08T10:27:10.000+00:00" + }, + { + "AuthorId": "zb7x2xcs8ekfobzi94y4aey6bf", + "SubmissionTime": "2021-03-08T10:14:22.000+00:00" + } + ], + "TotalInappropriateFeedbackCount": 6, + "TotalClientResponseCount": 0, + "TotalCommentCount": 0, + "Rating": 5, + "IsRatingsOnly": false, + "Helpfulness": 0.6285709738731384, + "TotalFeedbackCount": 35, + "TotalNegativeFeedbackCount": 13, + "TotalPositiveFeedbackCount": 22, + "ModerationStatus": "APPROVED", + "SubmissionId": "r215597_1__1614339752SgpjcQiz", + "SubmissionTime": "2021-02-26T11:43:17.000+00:00", + "ReviewText": "This is the review text. It is just some dummy test for demo purpose......", + "Title": "Test by ernst", + "UserNickname": "ernst55", + "UserEmailAddress": "/Ey2ek12XQi+XfozOijjuFuzPdKsTIR92wf0VgbAB94=", + "AdditionalFields": {}, + "Badges": {}, + "TagDimensionsOrder": [], + "CampaignId": null, + "SecondaryRatingsOrder": [], + "CommentIds": [], + "Pros": null, + "IsSyndicated": false, + "RatingRange": 5, + "SecondaryRatings": {}, + "BadgesOrder": [], + "Photos": [], + "ClientResponses": [], + "ContextDataValues": {}, + "AdditionalFieldsOrder": [], + "TagDimensions": {}, + "IsRecommended": null, + "ProductRecommendationIds": [], + "Videos": [], + "Cons": null, + "UserLocation": null, + "ContextDataValuesOrder": [] + }, + { + "Id": "35313929", + "CID": "7e3e96e0-e60f-5ce1-ada3-6b9e16991ff9", + "SourceClient": "conciergeapidocumentation", + "LastModeratedTime": "2021-03-08T10:30:00.000+00:00", + "LastModificationTime": "2021-03-11T13:46:25.000+00:00", + "ProductId": "data-gen-moppq9ekthfzbc6qff3bqokie", + "OriginalProductName": "14K White Gold Diamond Teardrop Necklace", + "AuthorId": "ackd27", + "ContentLocale": "en_US", + "IsFeatured": false, + "InappropriateFeedbackList": [ + { + "AuthorId": "zdqqumscxtywglf41zseeslgj9", + "SubmissionTime": "2021-03-09T14:55:16.000+00:00" + }, + { + "AuthorId": "z69vu93kki1ugrqsm4758aqdxx", + "SubmissionTime": "2021-03-08T10:22:11.000+00:00" + } + ], + "TotalInappropriateFeedbackCount": 2, + "TotalClientResponseCount": 0, + "TotalCommentCount": 0, + "Rating": 5, + "IsRatingsOnly": false, + "Helpfulness": 0.33333298563957214, + "TotalFeedbackCount": 3, + "TotalNegativeFeedbackCount": 2, + "TotalPositiveFeedbackCount": 1, + "ModerationStatus": "APPROVED", + "SubmissionId": "r215597_1__161428099GsH0e9Sam", + "SubmissionTime": "2021-02-25T19:23:16.000+00:00", + "ReviewText": "test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test", + "Title": "Test review", + "UserNickname": "alckdam", + "AdditionalFields": {}, + "Badges": {}, + "TagDimensionsOrder": [], + "CampaignId": null, + "SecondaryRatingsOrder": [], + "CommentIds": [], + "Pros": null, + "IsSyndicated": false, + "RatingRange": 5, + "SecondaryRatings": {}, + "BadgesOrder": [], + "Photos": [], + "ClientResponses": [], + "ContextDataValues": {}, + "AdditionalFieldsOrder": [], + "TagDimensions": {}, + "IsRecommended": null, + "ProductRecommendationIds": [], + "Videos": [], + "Cons": null, + "UserLocation": null, + "ContextDataValuesOrder": [] + }, + { + "Id": "35313912", + "CID": "83defb4a-406b-5d78-9d77-9c6bf05090a9", + "SourceClient": "conciergeapidocumentation", + "LastModeratedTime": "2021-02-25T18:45:00.000+00:00", + "LastModificationTime": "2021-02-25T18:45:00.000+00:00", + "ProductId": "data-gen-moppq9ekthfzbc6qff3bqokie", + "OriginalProductName": "14K White Gold Diamond Teardrop Necklace", + "AuthorId": "myUId", + "ContentLocale": "en_US", + "IsFeatured": false, + "TotalInappropriateFeedbackCount": 0, + "TotalClientResponseCount": 0, + "TotalCommentCount": 0, + "Rating": 5, + "IsRatingsOnly": false, + "TotalFeedbackCount": 0, + "TotalNegativeFeedbackCount": 0, + "TotalPositiveFeedbackCount": 0, + "ModerationStatus": "APPROVED", + "SubmissionId": "r215597_1__16142785Yk97zIoyOn", + "SubmissionTime": "2021-02-25T18:41:49.000+00:00", + "ReviewText": "This is the review text. This is some more review text. This is some review text......", + "Title": "This is the title", + "UserNickname": "fbb2021", + "UserEmailAddress": "QLjsIwJdIsUB4KV+++Ie/9EewXiYbyKmM8dykfVpsBs=", + "AdditionalFields": {}, + "Badges": {}, + "TagDimensionsOrder": [], + "CampaignId": null, + "SecondaryRatingsOrder": [], + "CommentIds": [], + "Pros": null, + "IsSyndicated": false, + "RatingRange": 5, + "SecondaryRatings": {}, + "BadgesOrder": [], + "Helpfulness": null, + "Photos": [], + "ClientResponses": [], + "ContextDataValues": {}, + "AdditionalFieldsOrder": [], + "TagDimensions": {}, + "IsRecommended": null, + "ProductRecommendationIds": [], + "Videos": [], + "Cons": null, + "UserLocation": null, + "ContextDataValuesOrder": [], + "InappropriateFeedbackList": [] + } + ], + "Includes": {}, + "HasErrors": false, + "Errors": [] +} \ No newline at end of file diff --git a/bvrecommendations/src/main/java/com/bazaarvoice/bvandroidsdk/BVRecommendations.java b/bvrecommendations/src/main/java/com/bazaarvoice/bvandroidsdk/BVRecommendations.java index 560deba1..032b84c0 100644 --- a/bvrecommendations/src/main/java/com/bazaarvoice/bvandroidsdk/BVRecommendations.java +++ b/bvrecommendations/src/main/java/com/bazaarvoice/bvandroidsdk/BVRecommendations.java @@ -132,9 +132,10 @@ protected BVRecommendationsResponse doInBackground(RequestData... params) { ShopperProfile shopperProfile = new ShopperProfile(); bvLogger.v(TAG, "Getting recommendations: " + requestData.getRequestUrl()); + URL url = requestData.getRequestUrl(); Request request = new Request.Builder() - .url(requestData.requestUrl) + .url(url) .addHeader("Content-Type", "application/x-www-form-urlencoded") .addHeader("User-Agent", BVSDK.getInstance().getBvWorkerData().getBvSdkUserAgent()) .build();