Skip to content

Commit

Permalink
MOB-644 add video to reviews, isSyndicated Q&A
Browse files Browse the repository at this point in the history
  • Loading branch information
sergioazua committed Jun 21, 2017
1 parent cfb31df commit 22e8b70
Show file tree
Hide file tree
Showing 19 changed files with 204 additions and 86 deletions.
2 changes: 1 addition & 1 deletion BVSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

Pod::Spec.new do |s|
s.name = "BVSDK"
s.version = '6.7.1'
s.version = '6.7.2'
s.homepage = 'https://developer.bazaarvoice.com'
s.license = { :type => 'Commercial', :text => 'See https://developer.bazaarvoice.com/API_Terms_of_Use' }
s.author = { 'Bazaarvoice' => '[email protected]' }
Expand Down
18 changes: 17 additions & 1 deletion BVSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
15D4F83F1DF5EC3C00E6B30D /* ph.png in Resources */ = {isa = PBXBuildFile; fileRef = 15D4F83E1DF5EC3C00E6B30D /* ph.png */; };
870F13421E490B5200D46BE6 /* BVCurationsPostViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 870F133C1E490B5200D46BE6 /* BVCurationsPostViewController.m */; };
870F13641E490B7B00D46BE6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 870F13631E490B7B00D46BE6 /* Assets.xcassets */; };
87252B091EF46FA10011C845 /* BVUploadableYouTubeVideo.h in Headers */ = {isa = PBXBuildFile; fileRef = 87252B071EF46FA10011C845 /* BVUploadableYouTubeVideo.h */; settings = {ATTRIBUTES = (Public, ); }; };
87252B0A1EF46FA10011C845 /* BVUploadableYouTubeVideo.m in Sources */ = {isa = PBXBuildFile; fileRef = 87252B081EF46FA10011C845 /* BVUploadableYouTubeVideo.m */; };
873DC48E1E7482840080FA03 /* BVAnalyticEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 873DC4791E7482840080FA03 /* BVAnalyticEvent.h */; settings = {ATTRIBUTES = (Public, ); }; };
873DC48F1E7482840080FA03 /* BVAnalyticEventManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 873DC47A1E7482840080FA03 /* BVAnalyticEventManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
873DC4901E7482840080FA03 /* BVAnalyticEventManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 873DC47B1E7482840080FA03 /* BVAnalyticEventManager.m */; };
Expand Down Expand Up @@ -551,6 +553,8 @@
870F133F1E490B5200D46BE6 /* BVCurationsUICollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BVCurationsUICollectionViewCell.h; path = Pod/BVCurationsUI/BVCurationsUICollectionViewCell.h; sourceTree = SOURCE_ROOT; };
870F13401E490B5200D46BE6 /* BVCurationsUICollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BVCurationsUICollectionViewCell.m; path = Pod/BVCurationsUI/BVCurationsUICollectionViewCell.m; sourceTree = SOURCE_ROOT; };
870F13631E490B7B00D46BE6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Pod/BVCurationsUI/Assets/Assets.xcassets; sourceTree = SOURCE_ROOT; };
87252B071EF46FA10011C845 /* BVUploadableYouTubeVideo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BVUploadableYouTubeVideo.h; path = Video/BVUploadableYouTubeVideo.h; sourceTree = "<group>"; };
87252B081EF46FA10011C845 /* BVUploadableYouTubeVideo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BVUploadableYouTubeVideo.m; path = Video/BVUploadableYouTubeVideo.m; sourceTree = "<group>"; };
873DC4791E7482840080FA03 /* BVAnalyticEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BVAnalyticEvent.h; path = BVPixelEvents/BVAnalyticEvent.h; sourceTree = "<group>"; };
873DC47A1E7482840080FA03 /* BVAnalyticEventManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BVAnalyticEventManager.h; path = BVPixelEvents/BVAnalyticEventManager.h; sourceTree = "<group>"; };
873DC47B1E7482840080FA03 /* BVAnalyticEventManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BVAnalyticEventManager.m; path = BVPixelEvents/BVAnalyticEventManager.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1073,6 +1077,15 @@
path = BVCurationsUI;
sourceTree = "<group>";
};
87252B0B1EF46FF40011C845 /* Video */ = {
isa = PBXGroup;
children = (
87252B071EF46FA10011C845 /* BVUploadableYouTubeVideo.h */,
87252B081EF46FA10011C845 /* BVUploadableYouTubeVideo.m */,
);
name = Video;
sourceTree = "<group>";
};
875410A71E1F10DF006C5C6E /* BVExtensionNotifications */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1599,10 +1612,11 @@
87F2DB9F1DAD585E00FB43F3 /* BVSubmissionResponse.m */,
87F2DB891DAD585E00FB43F3 /* Answer */,
87EDAFCE1EDDCEAD00FA07C0 /* Comment */,
87F2DBA01DAD585E00FB43F3 /* Photo */,
87A02B5D1E0963020002701B /* Feedback */,
87F2DBA01DAD585E00FB43F3 /* Photo */,
87F2DBA61DAD585E00FB43F3 /* Question */,
87F2DBAF1DAD585E00FB43F3 /* Review */,
87252B0B1EF46FF40011C845 /* Video */,
);
path = Submission;
sourceTree = "<group>";
Expand Down Expand Up @@ -2244,6 +2258,7 @@
87EDAFD51EDDD1FD00FA07C0 /* BVSubmittedComment.h in Headers */,
87EDAFD91EDDD3E200FA07C0 /* BVCommentSubmissionErrorResponse.h in Headers */,
877AD2941EE1D134006C7070 /* BVBaseUGCSubmission.h in Headers */,
87252B091EF46FA10011C845 /* BVUploadableYouTubeVideo.h in Headers */,
87EDAFCC1EDDC9F400FA07C0 /* BVCommentSubmission.h in Headers */,
87F2DC241DAD585E00FB43F3 /* BVContextualInterests.h in Headers */,
87F2DC251DAD585E00FB43F3 /* BVGMBLSighting.h in Headers */,
Expand Down Expand Up @@ -2479,6 +2494,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
87252B0A1EF46FA10011C845 /* BVUploadableYouTubeVideo.m in Sources */,
15BE4D231E55EFCD00C12B57 /* BVSDKConfiguration.m in Sources */,
870F13421E490B5200D46BE6 /* BVCurationsPostViewController.m in Sources */,
153550AF1E898CF000C62D90 /* BVCurationsUICollectionViewCell.m in Sources */,
Expand Down
4 changes: 2 additions & 2 deletions BVSDK/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>6.7.1</string>
<string>6.7.2</string>
<key>CFBundleVersion</key>
<string>6.7.1</string>
<string>6.7.2</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>NSPrincipalClass</key>
Expand Down
12 changes: 6 additions & 6 deletions Examples/BVSDKDemo/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ PODS:
- Bolts/AppLinks (1.8.4):
- Bolts/Tasks
- Bolts/Tasks (1.8.4)
- BVSDK/BVCurations (6.7.1):
- BVSDK/BVCurations (6.7.2):
- BVSDK/Core
- BVSDK/BVLocation (6.7.1):
- BVSDK/BVLocation (6.7.2):
- BVSDK/Core
- BVSDK/BVNotifications (6.7.1):
- BVSDK/BVNotifications (6.7.2):
- BVSDK/BVLocation
- BVSDK/BVPIN
- BVSDK/BVPIN (6.7.1):
- BVSDK/BVPIN (6.7.2):
- BVSDK/Core
- BVSDK/Core (6.7.1)
- BVSDK/Core (6.7.2)
- Crashlytics (3.8.3):
- Fabric (~> 1.6.3)
- Fabric (1.6.11)
Expand Down Expand Up @@ -88,7 +88,7 @@ CHECKOUT OPTIONS:

SPEC CHECKSUMS:
Bolts: 8a7995239dbe724f9cba2248b766d48b7ebdd322
BVSDK: 5e06b8e158dd2e67cf09315185b33a62dcad15b7
BVSDK: b3377e17a07986866234a2a22ed3e083ed373d66
Crashlytics: 2b6dbe138a42395577cfa73dfa1aa7248cadf39e
Fabric: 5911403591946b8228ab1c51d98f1d7137e863c6
FBSDKCoreKit: 894b2b6eda6a4c8c4204e92e59cc355709ef045c
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12118" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="iQV-yi-M3U">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="iQV-yi-M3U">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
Expand Down Expand Up @@ -52,8 +52,8 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5zN-hz-DfD">
<rect key="frame" x="98.5" y="424" width="178" height="30"/>
<state key="normal" title="Submit Review with Photo"/>
<rect key="frame" x="69.5" y="424" width="236" height="30"/>
<state key="normal" title="Submit Review with Photo &amp; Video"/>
<connections>
<action selector="submitReviewTappedWithSender:" destination="dKM-nR-alk" eventType="touchUpInside" id="b8Z-vx-9af"/>
</connections>
Expand Down Expand Up @@ -101,7 +101,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="lar-sh-Gj0">
<rect key="frame" x="101" y="617" width="172" height="30"/>
<rect key="frame" x="101.5" y="617" width="172" height="30"/>
<state key="normal" title="Submit Review Comment"/>
<connections>
<action selector="submitReviewCommentTappedWithSender:" destination="dKM-nR-alk" eventType="touchUpInside" id="GvB-Vs-pMQ"/>
Expand Down Expand Up @@ -297,7 +297,7 @@
<rect key="frame" x="0.0" y="28" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="9ES-OS-FSe" id="Mix-E9-t34">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
</tableViewCell>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,14 @@ class RootViewController: UIViewController {
reviewSubmission.userId = userId
reviewSubmission.isRecommended = true
reviewSubmission.sendEmailAlertWhenPublished = true

if let photo = UIImage(named: "puppy"){
reviewSubmission.addPhoto(photo, withPhotoCaption: "5 star pup!")
}

// add youtube video link, if your configuration supports it
reviewSubmission.addVideoURL("https://www.youtube.com/watch?v=oHg5SJYRHA0", withCaption: "All your wildest dreams will come true.")

reviewSubmission.submit({ (response) in

self.showAlertSuccess(message: "Success Submitting Review!")
Expand Down
6 changes: 3 additions & 3 deletions Examples/Conversations/Swift/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PODS:
- BVSDK/BVConversations (6.7.1):
- BVSDK/BVConversations (6.7.2):
- BVSDK/Core
- BVSDK/Core (6.7.1)
- BVSDK/Core (6.7.2)

DEPENDENCIES:
- BVSDK/BVConversations (from `../../../`)
Expand All @@ -11,7 +11,7 @@ EXTERNAL SOURCES:
:path: "../../../"

SPEC CHECKSUMS:
BVSDK: 5e06b8e158dd2e67cf09315185b33a62dcad15b7
BVSDK: b3377e17a07986866234a2a22ed3e083ed373d66

PODFILE CHECKSUM: ff51a28f7873cf9d401e0c25277fa303397c7510

Expand Down
4 changes: 2 additions & 2 deletions Pod/BVCommon/BVSDKConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

/// Provides the master version of the SDK.

#define BV_SDK_VERSION @"6.7.1"
#define BV_SDK_VERSION @"6.7.2"

/// Conversation SDK Version
#define SDK_HEADER_NAME @"X-UA-BV-SDK"
#define SDK_HEADER_VALUE @"IOS_SDK_V671"
#define SDK_HEADER_VALUE @"IOS_SDK_V672"

/// Error domain for NSError results, when present.
#define BVErrDomain @"com.bvsdk.bazaarvoice"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@
@property NSDate* _Nullable submissionTime;
@property NSDate* _Nullable lastModificationTime;
@property NSDate* _Nullable lastModeratedTime;
@property (readonly) BOOL isSyndicated;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ -(id _Nonnull)initWithApiResponse:(NSDictionary* _Nonnull)apiResponse includes:(
self.videos = [BVModelUtil parseVideos:apiResponse[@"Videos"]];
self.badges = [BVModelUtil parseBadges:apiResponse[@"Badges"]];
self.contextDataValues = [BVModelUtil parseContextDataValues:apiResponse[@"ContextDataValues"]];
NSNumber* isSyndicated = apiResponse[@"IsSyndicated"];
if(![isSyndicated isKindOfClass:[NSNull class]]) {
_isSyndicated = [isSyndicated boolValue];
}

}
return self;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,6 @@
@property (nonatomic, copy) NSNumber* _Nullable totalInappropriateFeedbackCount;
@property (nonatomic, copy) NSNumber* _Nullable totalNegativeFeedbackCount;
@property bool isFeatured;
@property (readonly) BOOL isSyndicated;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ -(id)initWithApiResponse:(NSDictionary *)apiResponse includes:(BVConversationsIn
if(![featured isKindOfClass:[NSNull class]]) {
self.isFeatured = [featured boolValue];
}


NSNumber* isSyndicated = apiResponse[@"IsSyndicated"];
if(![isSyndicated isKindOfClass:[NSNull class]]) {
_isSyndicated = [isSyndicated boolValue];
}

SET_IF_NOT_NULL(self.productRecommendationIds, apiResponse[@"ProductRecommendationIds"])
SET_IF_NOT_NULL(self.productId, apiResponse[@"ProductId"])
SET_IF_NOT_NULL(self.additionalFields, apiResponse[@"AdditionalFields"])
Expand Down
1 change: 1 addition & 0 deletions Pod/BVConversations/Submission/BVBaseUGCSubmission.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#import "BVSubmission.h"
#import "BVSubmissionAction.h"
#import "BVUploadablePhoto.h"
#import "BVUploadableYouTubeVideo.h"

/// Base class used for defining common properties for a UGC content types of the Conversations API: Reviews, Review Comments, Questions and Answers.
@interface BVBaseUGCSubmission : BVSubmission
Expand Down
8 changes: 8 additions & 0 deletions Pod/BVConversations/Submission/Review/BVReviewSubmission.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,12 @@ typedef void (^ReviewSubmissionCompletion)(BVReviewSubmissionResponse* _Nonnull
-(void)addFreeformTagDimension:(nonnull NSString*)tagQuestionId tagNumber:(int)tagNumber value:(nonnull NSString*)value;
- (NSString * _Nonnull)getPasskey;

/**
Submit a Youtube video link with UGC
@param url The full URL string of the Youtube video
@param videoCaption The use-provided caption for the video
*/
-(void)addVideoURL:(nonnull NSString*)url withCaption:(nullable NSString*)videoCaption;

@end
Loading

0 comments on commit 22e8b70

Please sign in to comment.