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.