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 (readonly, copy, nonatomic) NSString *_Nonnull articleId;

    Swift

    var articleId: String { get }
  • Unique article URL Name.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSString *_Nonnull urlName;

    Swift

    var urlName: String { get }
  • Article number.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) 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 (readonly, copy, nonatomic, nullable) NSString *articleType;

    Swift

    var articleType: String? { get }
  • Article version number.

    Declaration

    Objective-C

    @property (readonly, assign, nonatomic) NSUInteger versionNumber;

    Swift

    var versionNumber: UInt { get }
  • Summary text for the article.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSString *_Nonnull summary;

    Swift

    var summary: String { get }
  • Article title.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSString *_Nonnull title;

    Swift

    var title: String { get }
  • Last published date for this article.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic) NSDate *_Nonnull lastPublishedDate;

    Swift

    var lastPublishedDate: Date { get }
  • Amount of local storage (in bytes) used for this article.

    Declaration

    Objective-C

    @property (readonly, assign, nonatomic) NSUInteger storageUsed;

    Swift

    var storageUsed: UInt { get }
  • Date article was last accessed.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic, 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 (readonly, nonatomic) 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 (readonly, getter=isStale, nonatomic) 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, completion completionBlock: ((Error?) -> Void)? = nil)

    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 *__autoreleasing _Nullable *_Nullable)error;

    Swift

    func deleteCache() throws

    Parameters

    error

    Error that occurs during deletion, if applicable.

    Return Value

    YES if the article has been deleted. *