-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for SyndicationSource for reviews that are flagged with '…
…IsSyndicated'
- Loading branch information
Tim Kelly
committed
May 5, 2017
1 parent
30ee3c8
commit c4ff907
Showing
19 changed files
with
279 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
|
||
Pod::Spec.new do |s| | ||
s.name = "BVSDK" | ||
s.version = '6.5.1' | ||
s.version = '6.5.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]' } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
BVSDK.xcodeproj/xcshareddata/xcschemes/BVSDK-Universal.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// BVSyndicationSource.h | ||
// BVSDK | ||
// | ||
// Copyright © 2017 Bazaarvoice. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
|
||
/** | ||
If a review is syndicated, a BVSyndicationSource will contain the details of where the syndication is coming from is displayed. NOTE: The API key must be configured to show syndicated content. | ||
*/ | ||
@interface BVSyndicationSource : NSObject | ||
|
||
@property (readonly) NSString * _Nullable logoImageUrl; | ||
@property (readonly) NSString * _Nullable contentLink; | ||
@property (readonly) NSString * _Nullable name; | ||
|
||
-(id _Nullable)initWithApiResponse:(id _Nullable)apiResponse; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// BVSyndicationSource.m | ||
// BVSDK | ||
// | ||
// Copyright © 2017 Bazaarvoice. All rights reserved. | ||
// | ||
|
||
#import "BVSyndicationSource.h" | ||
#import "BVNullHelper.h" | ||
|
||
@implementation BVSyndicationSource | ||
|
||
-(id _Nullable)initWithApiResponse:(id _Nullable)apiResponse { | ||
self = [super init]; | ||
if(self) { | ||
if (apiResponse == nil || ![apiResponse isKindOfClass:[NSDictionary class]]) { | ||
return nil; | ||
} | ||
|
||
NSDictionary* apiObject = [apiResponse objectForKey:@"SyndicationSource"]; | ||
|
||
if (apiObject){ | ||
SET_IF_NOT_NULL(_name, apiObject[@"Name"]); | ||
SET_IF_NOT_NULL(_contentLink, apiObject[@"ContentLink"]); | ||
SET_IF_NOT_NULL(_logoImageUrl, apiObject[@"LogoImageUrl"]); | ||
} | ||
|
||
} | ||
return self; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.