SCSArticleQuery
@interface SCSArticleQuery : NSObject <NSCopying, NSMutableCopying>
An SCSArticleQuery
object manages the criteria to apply when fetching and searching
knowledge articles. This query object stores the type of search, the search parameters,
and any filters or constraints to apply when searching.
This class is immutable. To create a mutable query object, see SCSMutableArticleQuery
.
-
Specifies the 18-character article ID, or the URL Name of an article. This property cannot be used with
searchTerm
,queryMethod
,sortOrder
, orsortByField
.Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *articleId;
Swift
var articleId: String? { get }
-
Specifies the data categories associated with the articles that need to be queried.
Use this property with the
queryMethod
property to further refine the search. When specifying multiple categories, the category group must be different for each element.See
SCSCategory
Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSArray<SCSCategory *> *categories;
Swift
var categories: [SCSCategory]? { get }
-
If the
categories
property is populated, this property determines the method used to select articles above, at, below, or above_or_below the specified categories.See
SCQueryMethod
Declaration
Objective-C
@property (nonatomic, readonly) SCQueryMethod queryMethod;
Swift
var queryMethod: SCQueryMethod { get }
-
Specifies the search term to be used to query articles. This property cannot be used with
articleId
,sortOrder
, orsortByField
.Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *searchTerm;
Swift
var searchTerm: String? { get }
-
Specifies the number of articles to fetch.
An org does not return more than 100 results per page.
Declaration
Objective-C
@property (nonatomic, readonly) NSUInteger pageSize;
Swift
var pageSize: UInt { get }
-
The page number for this query.
Note
This value is 1-based, with 0 meaning the page number will not be specified.Declaration
Objective-C
@property (nonatomic, readonly) NSUInteger pageNumber;
Swift
var pageNumber: UInt { get }
-
If the
categories
property is populated, this property specifies the sort order to be used.Declaration
Objective-C
@property (nonatomic, readonly) SCArticleSortOrder sortOrder;
Swift
var sortOrder: SCArticleSortOrder { get }
-
If the
categories
property is populated, this property specifies the article field used for sorting the article list.Declaration
Objective-C
@property (nonatomic, readonly) SCArticleSortByField sortByField;
Swift
var sortByField: SCArticleSortByField { get }
-
Whether the query criteria is valid.
If the query is not valid, fetches and article lookups cannot be performed with this object.
Declaration
Objective-C
@property (nonatomic, readonly, getter=isValid) BOOL valid;
Swift
var isValid: Bool { get }