gpt4 book ai didi

ios - 使用 getThumbnailBatch 获取保管箱缩略图

转载 作者:行者123 更新时间:2023-11-29 05:08:23 25 4
gpt4 key购买 nike

我正在使用 dropbox objc API,并尝试获取特定 dropbox 文件夹中的所有缩略图。

但我完全陷入了 DBFILESGetThumbnailBatchArg。如何启动文件夹中所有图像的路径?

这是我陷入的困境:

    [[client.filesRoutes getThumbnailBatch:<#(nonnull NSArray<DBFILESThumbnailArg *> *)#>] 
setResponseBlock:^(
DBFILESGetThumbnailBatchResult * _Nullable result,
DBFILESGetThumbnailBatchError * _Nullable routeError,
DBRequestError * _Nullable networkError) { etc etc..

文档说

DBFILESThumbnailArg *arg = [[DBFILESThumbnailArg alloc] initWithPath:<#(nonnull NSString *)#>];


DBFILESGetThumbnailBatchArg *batchArg = [[DBFILESGetThumbnailBatchArg alloc]
initWithEntries:<#(nonnull NSArray<DBFILESThumbnailArg *> *)#>];

如何初始化 DBFILESThumbnailArg 的路径列表?

文档链接: https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DBFILESRouteObjects.html#/c:objc(cs)DBFILESRouteObjects(cm)DBFILESGetThumbnailBatch

最佳答案

正如您所发现的,the getThumbnailBatch method预计 NSArray<DBFILESThumbnailArg *> ,所以调用它看起来像这样:

NSArray<DBFILESThumbnailArg *> *entries = @[[[DBFILESThumbnailArg alloc] initWithPath:@"/test1.jpg"], [[DBFILESThumbnailArg alloc] initWithPath:@"/test2.jpg"]];
[[client.filesRoutes getThumbnailBatch:entries]
setResponseBlock:^(DBFILESGetThumbnailBatchResult *result, DBFILESGetThumbnailBatchError *routeError, DBRequestError *networkError) {
if (result) {
NSLog(@"result:");
NSLog(@"%@", result);
} else if (routeError) {
NSLog(@"routeError:");
NSLog(@"%@", routeError);
} else if (networkError) {
NSLog(@"networkError:");
NSLog(@"%@", networkError);
};
}];

关于ios - 使用 getThumbnailBatch 获取保管箱缩略图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59936884/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com