SCSArticleQuery Class Reference

Inherits from NSObject
Conforms to NSCopying
NSMutableCopying
Declared in SCSArticleQuery.h

Overview

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.

  articleId

Specifies the 18-character article ID. This property cannot be used with searchTerm, queryMethod, sortOrder, or sortByField.

@property (nullable, nonatomic, copy, readonly) NSString *articleId

Declared In

SCSArticleQuery.h

  categories

Specifies the data categories associated with the articles that need to be queried.

@property (nullable, nonatomic, copy, readonly) NSArray<SCSCategory*> *categories

Discussion

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.

Declared In

SCSArticleQuery.h

  queryMethod

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.

@property (nonatomic, assign, readonly) SCQueryMethod queryMethod

Declared In

SCSArticleQuery.h

  searchTerm

Specifies the search term to be used to query articles. This property cannot be used with articleId, sortOrder, or sortByField.

@property (nullable, nonatomic, copy, readonly) NSString *searchTerm

Declared In

SCSArticleQuery.h

  pageSize

Specifies the number of articles to fetch.

@property (nonatomic, assign, readonly) NSUInteger pageSize

Discussion

An org does not return more than 100 results per page.

Declared In

SCSArticleQuery.h

  sortOrder

If the categories property is populated, this property specifies the sort order to be used.

@property (nonatomic, assign, readonly) SCArticleSortOrder sortOrder

Declared In

SCSArticleQuery.h

  sortByField

If the categories property is populated, this property specifies the article field used for sorting the article list.

@property (nonatomic, assign, readonly) SCArticleSortByField sortByField

Declared In

SCSArticleQuery.h

  valid

Whether the query criteria is valid.

@property (nonatomic, readonly, getter=isValid) BOOL valid

Discussion

If the query is not valid, fetches and article lookups cannot be performed with this object.

Declared In

SCSArticleQuery.h