简体   繁体   English

如何使用V2 Box iOS SDK获取创建者和上次修改日期

[英]How to get Created By and Last Modified Date using V2 Box iOS SDK

On fetching folder items using a folderID, i'm just getting only 5 items in the json response dictionary. 使用folderID提取文件夹项目时,我在json响应字典中仅获得5个项目。

{ etag = 4; id = 924199771; name = Philips; "sequence_id" = 4; type = folder; }

I need Created By and Last Modified TimeStamp along with this response. 我需要Created By和Last Modified TimeStamp以及此响应。 I'm using Box V2 iOS SDK. 我正在使用Box V2 iOS SDK。 Need help on getting this. 需要帮助获得此。

You can specify which fields you want like this: 您可以这样指定所需的字段:

BoxFoldersResourceManager *mgr = [BoxSDK sharedSDK].foldersManager;
BoxFoldersRequestBuilder *bldr = [[BoxFoldersRequestBuilder alloc] initWithQueryStringParameters:@{ @"fields" : @"name,type,id,size,modified_at,created_by" }];
[mgr folderItemsWithID:_folderId requestBuilder:bldr success:^(BoxCollection *collection) {
    // process results
} failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSDictionary *JSONDictionary) {
    // process error
}];

Be sure to list whichever fields you need when creating the BoxFoldersRequestBuilder . 确保在创建BoxFoldersRequestBuilder时列出您需要的任何字段。

If you add the fields paramater and separate the items you want returned by comma, Box's response will return created_by and modifed_at. 如果添加参数字段并用逗号分隔要返回的项目,Box的响应将返回created_by和modifed_at。 You can also retrieve modifed_by. 您还可以检索modifed_by。

http://developers.box.com/docs/#fields http://developers.box.com/docs/#fields

?fields=created_by,modified_at ?场= CREATED_BY,modified_at

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM