SCSArticle
@interface SCSArticle : NSObject
A SCSArticle
object represents a knowledge base article.
This article may or may not already be downloaded locally.
Use the -[SCSArticle isArticleContentDownloaded]
property to check whether
it is downloaded. You can download the article with the
-[SCSArticle downloadContentWithOptions:completion:]
method.
-
Unique article ID.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull articleId;
Swift
var articleId: String { get }
-
Unique article URL Name.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull urlName;
Swift
var urlName: String { get }
-
Article number.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull articleNumber;
Swift
var articleNumber: String { get }
-
The article object type. May be null until the details of the article are fetched.
Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *articleType;
Swift
var articleType: String? { get }
-
Article version number.
Declaration
Objective-C
@property (nonatomic, readonly) NSUInteger versionNumber;
Swift
var versionNumber: UInt { get }
-
Summary text for the article.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull summary;
Swift
var summary: String { get }
-
Article title.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull title;
Swift
var title: String { get }
-
Last published date for this article.
Declaration
Objective-C
@property (nonatomic, strong, readonly) NSDate *_Nonnull lastPublishedDate;
Swift
var lastPublishedDate: Date { get }
-
Amount of local storage (in bytes) used for this article.
Declaration
Objective-C
@property (nonatomic, readonly) NSUInteger storageUsed;
Swift
var storageUsed: UInt { get }
-
Date article was last accessed.
Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSDate *lastAccessedDate;
Swift
var lastAccessedDate: Date? { get }
-
Knowledge manager instance this article belongs to. If this value becomes
nil
, the article instance should be considered invalid and should be removed or released.Declaration
Objective-C
@property (nonatomic, weak, readonly) SCSKnowledgeManager *_Nullable manager;
Swift
weak var manager: SCSKnowledgeManager? { get }
-
Returns true if the article details stored in local storage gets stale
Declaration
Objective-C
@property (nonatomic, readonly, getter=isStale) BOOL stale;
Swift
var isStale: Bool { get }
-
Downloads article contents.
Declaration
Objective-C
- (void)downloadContentWithOptions:(SCSArticleDownloadOption)options completion: (nullable void (^)(NSError *_Nullable __strong)) completionBlock;
Swift
func downloadContent(withOptions options: SCSArticleDownloadOption) async throws
Parameters
options
Cache options defining exactly what content to download. See
SCSArticleDownloadOption
.completionBlock
The block to execute after download completes. You may specify
nil
for this parameter. -
Whether article content has been downloaded.
Declaration
Objective-C
- (BOOL)isArticleContentDownloaded;
Swift
func isArticleContentDownloaded() -> Bool
-
Whether associated article content (such as images) have been downloaded
Declaration
Objective-C
- (BOOL)isAssociatedContentDownloaded;
Swift
func isAssociatedContentDownloaded() -> Bool
-
Delete the cache for the article.
Declaration
Objective-C
- (BOOL)deleteCache:(NSError *_Nullable __autoreleasing *_Nullable)error;
Swift
func deleteCache() throws
Parameters
error
Error that occurs during deletion, if applicable.
Return Value
YES
if the article has been deleted. *