CalStoreSearchRequest Class Reference
| Inherits from | CalStorePageRequest : NSObject |
|---|---|
| Declared in | CalStoreSearchRequest.h |
Overview
Requests a CalStorePage with results from a search from the CalendarStore, using a block-based API.
- Create a request using one of the designated initializers, either for a free-text query, the top pages of a specific in-app purchase productIdentifier or the flattened list of calendars in an in-app purchase.
- fetch the page using fetchPageWithCompletionHandler:
Results
Search Results are returned in the exact same format as a CalStorePage, so the same UI can be used for displaying regular pages
as well as search results. The pageType property of a CalStorePage object can be used to differentiate between search results
or regular pages: search result pages will have their pageType set to CalStorePageTypeSearchResults.
Creating Requests
Use one of the designated initializers only, using one of the base class initializers won’t work.
Getting Information
searchQuery
The free-text query for this search, if this is a free-text search request. nil, otherwise.
@property (nonatomic, readonly, copy) NSString *searchQueryDiscussion
Only available when requestWithSearchQuery: or requestWithSearchQuery:locale: has been used.
Declared In
CalStoreSearchRequest.h
searchProductIdentifier
The productIdentifier for this search, if this is an in-app purchase productIdentifier search request. nil, otherwise.
@property (nonatomic, readonly, copy) NSString *searchProductIdentifierDiscussion
Only available when requestWithSearchByProductIdentifier: or requestWithSearchByProductIdentifier:locale: has been used.
Declared In
CalStoreSearchRequest.h
Creating free-text Search Requests
+ requestWithSearchQuery:
Creates a request for a free-text search. Locale is taken from [CalStoreController sharedController].
+ (instancetype)requestWithSearchQuery:(NSString *)queryParameters
query |
the free-text query to search on. Should not be |
|---|
Return Value
CalStoreSearchRequest that will request a page with the result of the given free-text search, if valid, nil otherwise.
Discussion
Note: this only creates a request, use fetchPageWithCompletionHandler: to start requesting the page.
Declared In
CalStoreSearchRequest.h
+ requestWithSearchQuery:locale:
Creates a request for a free-text search.
+ (instancetype)requestWithSearchQuery:(NSString *)query locale:(NSString *)localeParameters
query |
the free-text query to search on. Should not be |
|---|---|
locale |
locale to get the page in, ISO 639-1 code, or en_US (style). Can be |
Return Value
CalStoreSearchRequest that will request a page with the result of the given free-text search, if valid, nil otherwise.
Discussion
Note: this only creates a request, use fetchPageWithCompletionHandler: to start requesting the page.
The locale of a page defines how it is localized (e.g. in English, Spanish, Dutch).
Declared In
CalStoreSearchRequest.h
Creating ProductIdentifier Search Requests
+ requestWithSearchByProductIdentifier:
Creates a request for the top items of the pages in in-app purchase search. Locale is taken from [CalStoreController sharedController].
+ (instancetype)requestWithSearchByProductIdentifier:(NSString *)productIdentifierParameters
productIdentifier |
the in-app productIdentifier to search on. Should not be |
|---|
Return Value
CalStoreSearchRequest that will request a page with the result of the given in-app purchase search, if valid, nil otherwise.
Discussion
Note: this only creates a request, use fetchPageWithCompletionHandler: to start requesting the page.
Items being part of the specific in-app purchase will be returned
Declared In
CalStoreSearchRequest.h
+ requestWithSearchByProductIdentifier:locale:
Creates a request for the top items of the pages in in-app purchase search
+ (instancetype)requestWithSearchByProductIdentifier:(NSString *)productIdentifier locale:(NSString *)localeParameters
productIdentifier |
the in-app productIdentifier to search on. Should not be |
|---|---|
locale |
locale to get the page in, ISO 639-1 code, or en_US (style). Can be |
Return Value
CalStoreSearchRequest that will request a page with the result of the given free-text search, if valid, nil otherwise.
Discussion
Note: this only creates a request, use fetchPageWithCompletionHandler: to start requesting the page.
The locale of a page defines how it is localized (e.g. in English, Spanish, Dutch).
Items being part of the specific in-app purchase will be returned
Declared In
CalStoreSearchRequest.h
Creating Calendar Items Search Requests
+ requestWithSearchForCalendarsByProductIdentifier:
Creates a request for the calendars in an in-app purchase. Locale is taken from [CalStoreController sharedController].
+ (instancetype)requestWithSearchForCalendarsByProductIdentifier:(NSString *)productIdentifierParameters
productIdentifier |
the in-app productIdentifier to search the calendars for. Should not be |
|---|
Return Value
CalStoreSearchRequest that will request a page with the calendars of the given in-app purchase search, if valid, nil otherwise.
Discussion
Note: this only creates a request, use fetchPageWithCompletionHandler: to start requesting the page.
A flattenned page with items being the calendars of the specific in-app purchase will be returned
Declared In
CalStoreSearchRequest.h
+ requestWithSearchForCalendarsByProductIdentifier:locale:
Creates a request for the calendars in an in-app purchase. Locale is taken from [CalStoreController sharedController].
+ (instancetype)requestWithSearchForCalendarsByProductIdentifier:(NSString *)productIdentifier locale:(NSString *)localeParameters
productIdentifier |
the in-app productIdentifier to search the calendars for. Should not be |
|---|---|
locale |
locale to get the page in, ISO 639-1 code, or en_US (style). Can be |
Return Value
CalStoreSearchRequest that will request a page with the calendars of the given in-app purchase search, if valid, nil otherwise.
Discussion
Note: this only creates a request, use fetchPageWithCompletionHandler: to start requesting the page.
The locale of a page defines how it is localized (e.g. in English, Spanish, Dutch).
A flattenned page with items being the calendars of the specific in-app purchase will be returned
Declared In
CalStoreSearchRequest.h