ARTHTTPPaginatedResponse
Objective-C
@interface ARTHTTPPaginatedResponse : ARTPaginatedResult <NSDictionary *>
Swift
class ARTHTTPPaginatedResponse : ARTPaginatedResult<NSDictionary>, @unchecked Sendable
A superset of ARTPaginatedResult which represents a page of results plus metadata indicating the relative queries available to it. ARTHttpPaginatedResponse additionally carries information about the response to an HTTP request.
-
The HTTP status code of the response.
Declaration
Objective-C
@property (nonatomic, readonly) NSInteger statusCode;Swift
var statusCode: Int { get } -
Whether
statusCodeindicates success. This is equivalent to200 <= statusCode < 300.Declaration
Objective-C
@property (nonatomic, readonly) BOOL success;Swift
var success: Bool { get } -
The error code if the
x-ably-errorcodeHTTP header is sent in the response.Declaration
Objective-C
@property (nonatomic, readonly) NSInteger errorCode;Swift
var errorCode: Int { get } -
The error message if the
x-ably-errormessageHTTP header is sent in the response.Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSString *errorMessage;Swift
var errorMessage: String? { get } -
The headers of the response.
Declaration
Objective-C
@property (nonatomic, readonly) NSStringDictionary *_Nonnull headers;Swift
var headers: [String : String] { get } -
Returns a new
ARTHTTPPaginatedResponsefor the first page of results.Declaration
Objective-C
- (void)first:(nonnull ARTHTTPPaginatedCallback)callback;Swift
func first(_ callback: @escaping ARTHTTPPaginatedCallback)Parameters
callbackA callback for retriving an
ARTHTTPPaginatedResponseobject with an array ofNSDictionaryobjects. -
Returns a new
ARTHTTPPaginatedResponseloaded with the next page of results. If there are no further pages, thennilis returned.Declaration
Objective-C
- (void)next:(nonnull ARTHTTPPaginatedCallback)callback;Swift
func next(_ callback: @escaping ARTHTTPPaginatedCallback)Parameters
callbackA callback for retriving an
ARTHTTPPaginatedResponseobject with an array ofNSDictionaryobjects. -
Undocumented
Declaration
Objective-C
@property (nonatomic) NSHTTPURLResponse *responseSwift
var response: HTTPURLResponse { get set } -
Undocumented
Declaration
Objective-C
- (instancetype)initWithResponse:(NSHTTPURLResponse *)response items:(NSArray *)items rest:(ARTRestInternal *)rest relFirst:(NSMutableURLRequest *)relFirst relCurrent:(NSMutableURLRequest *)relCurrent relNext:(NSMutableURLRequest *)relNext responseProcessor:(ARTPaginatedResultResponseProcessor)responseProcessor wrapperSDKAgents:(nullable NSDictionary<NSString *, NSString *> *)wrapperSDKAgents logger:(ARTInternalLog *)logger;Swift
init(response: HTTPURLResponse, items: [Any], rest: ARTRestInternal, relFirst: NSMutableURLRequest, relCurrent: NSMutableURLRequest, relNext: NSMutableURLRequest, responseProcessor: @escaping ARTPaginatedResultResponseProcessor, wrapperSDKAgents: [String : String]?, logger: InternalLog) -
Unavailable
Undocumented
Declaration
Objective-C
+ (void)executePaginated:(ARTRestInternal *)rest withRequest:(NSMutableURLRequest *)request andResponseProcessor:(ARTPaginatedResultResponseProcessor)responseProcessor callback:(void (^)(ARTPaginatedResult * _Nullable, ARTErrorInfo * _Nullable))callback UNAVAILABLE_ATTRIBUTE; -
Undocumented
Declaration
Objective-C
+ (void)executePaginated:(ARTRestInternal *)rest withRequest:(NSMutableURLRequest *)request wrapperSDKAgents:(nullable NSDictionary<NSString *, NSString *> *)wrapperSDKAgents logger:(ARTInternalLog *)logger callback:(ARTHTTPPaginatedCallback)callback;Swift
class func executePaginated(_ rest: ARTRestInternal, with request: NSMutableURLRequest, wrapperSDKAgents: [String : String]?, logger: InternalLog, callback: @escaping ARTHTTPPaginatedCallback)