這很奇怪,因爲我用
NSMutableDictionary *getRequest = [NSMutableDictionary dictionary];
[getRequest setObject:[NSNumber numberWithInt:291] forKey:@"user_id"];
[QBCustomObjects objectsWithClassName:@"SuperSample" extendedRequest:getRequest delegate:self];
如果我們看控制檯,我們將看到:
GET http://api.quickblox.com/data/SuperSample.xml
headers:{
"QB-SDK" = "iOS 1.3.1";
"Qb-Token" = 00fbd4c38b4156975e63882ad660e9a724ae7a3d;
"QuickBlox-REST-API-Version" = "0.1.1";
}
parameters:{
"user_id" = 291;
}
而且這個代碼片斷返回我只記錄與USER_ID 291(以這個例子中這個是單記錄):
<?xml version="1.0" encoding="UTF-8"?>
<data type="array">
<SuperSample>
<_id>50bb4c1c535c12306b007ea4</_id>
<_parent_id nil="true"></_parent_id>
<born_age nil="true"></born_age>
<created-at type="integer">1354451996</created-at>
<my_field nil="true"></my_field>
<rating nil="true"></rating>
<sex_ nil="true"></sex_>
<text nil="true"></text>
<updated-at type="integer">1354451996</updated-at>
<user-id type="integer">291</user-id>
<vote nil="true"></vote>
</SuperSample>
</data>