Restkit 对象管理器中RKPaginator请求中的映射路径参数

Restkit 对象管理器中RKPaginator请求中的映射路径参数,restkit,Restkit,如果不是RKPaginator请求,我可以使用以下代码正确映射路径参数 RKEntityMapping *mapping = [RKEntityMapping mappingForEntityForName:className inManagedObjectStore:[RKManagedObjectStore defaultStore]]; [mapping setIdentificationAttributes:@[@"id"]]; [mapping addAttributeMappings

如果不是RKPaginator请求,我可以使用以下代码正确映射路径参数

RKEntityMapping *mapping = [RKEntityMapping mappingForEntityForName:className inManagedObjectStore:[RKManagedObjectStore defaultStore]];
[mapping setIdentificationAttributes:@[@"id"]];
[mapping addAttributeMappingsFromDictionary:@{
    @"@metadata.routing.parameters.id": @"entityId",
    @"@metadata.mapping.collectionIndex": @"itemIndex",
    .... other mapping attributes
}];

RKResponseDescriptor* learningObjRd = [RKResponseDescriptor responseDescriptorWithMapping:mapping 
    method:RKRequestMethodGET pathPattern:@"entity/:entityId" keyPath:@"objects" 
    statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful)];

[self.objectManager.router.routeSet addRoute:
    [RKRoute routeWithName:@"learningObjects" pathPattern:@"entity/:id" method:RKRequestMethodGET]];
[self.objectManager getObjectsAtPathForRouteNamed:@"learningObjects" object:@{@"id":entityId} 
    parameters:nil success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) {}];
在使用RKPaginator时,我找不到添加命名路由的方法。因此,我使用用户url创建分页器

RKPaginator* paginator = [self.objectManager paginatorWithPathPattern:@"series?page=:currentPage&count=:perPage" 
    parameters:nil];
[paginator loadPage:1];

有没有办法在URL中指定也可用于映射的参数?

为什么要使用显式id分页?我想你需要做一些子类化…我想从url获取数据作为/entity?page=1&count=10&type=:type我想本地映射这个类型你可以使用MetadataMap参数我在使用paginator发出请求时找不到任何方法来指定参数的值。因此子类化注释