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
statusCode
indicates 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-errorcode
HTTP 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-errormessage
HTTP 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
ARTHTTPPaginatedResponse
for the first page of results.Declaration
Objective-C
- (void)first:(nonnull ARTHTTPPaginatedCallback)callback;
Swift
func first(_ callback: @escaping ARTHTTPPaginatedCallback)
Parameters
callback
A callback for retriving an
ARTHTTPPaginatedResponse
object with an array ofNSDictionary
objects. -
Returns a new
ARTHTTPPaginatedResponse
loaded with the next page of results. If there are no further pages, thennil
is returned.Declaration
Objective-C
- (void)next:(nonnull ARTHTTPPaginatedCallback)callback;
Swift
func next(_ callback: @escaping ARTHTTPPaginatedCallback)
Parameters
callback
A callback for retriving an
ARTHTTPPaginatedResponse
object with an array ofNSDictionary
objects. -
Undocumented
Declaration
Objective-C
@property (nonatomic) NSHTTPURLResponse *response
Swift
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)