Flickr API .NET:知识共享许可搜索返回“保留所有权利”图像?
我正在使用 Flickr API 的官方 .NET 包装器。当我搜索可自由使用的图片的照片(如以下代码片段所示)时,我得到了 3 张照片,其许可证打印出“保留所有权利”:
Flickr flickr = new Flickr(Settings.Default.fli_key);
PhotoSearchOptions options = new PhotoSearchOptions();
options.Tags = "start";
options.IsCommons = true;
options.Licenses.Add(LicenseType.UnitedStatesGovernmentWork);
options.Licenses.Add(LicenseType.NoKnownCopyrightRestrictions);
PhotoCollection photos = flickr.PhotosSearch(options);
int i = 0;
foreach (var photo in photos)
{
Console.WriteLine(i + ":" + photo.License);
i++;
}
控制台:
0:AllRightsReserved
1:AllRightsReserved
2:AllRightsReserved
问题:
- 我做错了什么?
- 如果我没有做错任何事,那么这里的问题是什么? .NET 库损坏了吗?
- 我可以做什么来解决这个问题?我真的只想要所请求的许可证的图片。
我感谢你的帮助:-)
I'm using the official .NET wrapper for Flickr's API. When I do a search for photos of freely usable pictures as shown in the following code snippet, I get back 3 photos whose licenses print out a "All Rights Reserved":
Flickr flickr = new Flickr(Settings.Default.fli_key);
PhotoSearchOptions options = new PhotoSearchOptions();
options.Tags = "start";
options.IsCommons = true;
options.Licenses.Add(LicenseType.UnitedStatesGovernmentWork);
options.Licenses.Add(LicenseType.NoKnownCopyrightRestrictions);
PhotoCollection photos = flickr.PhotosSearch(options);
int i = 0;
foreach (var photo in photos)
{
Console.WriteLine(i + ":" + photo.License);
i++;
}
Console:
0:AllRightsReserved
1:AllRightsReserved
2:AllRightsReserved
Questions:
- What am I doing wrong?
- If I'm not doing anything wrong, what is the problem here? Is the .NET library broken?
- What can I do to fix the issue? I really only want pictures of the requested licenses.
I appreciate your help :-)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
PHP 也遇到了同样的问题,直到我从调用中删除了“is_commons”参数并仅通过许可证 ID (license=2) 进行搜索。现在我所有的回复都是所请求的许可证类型。也许 is_commons 胜过许可证或者它们冲突?不知道,我刚刚开始使用 API。希望这有帮助。
Was having the same issue with PHP until I removed the 'is_commons' parameter from my call and searched only by license id (license=2). Now all my responses are the requested license type. Perhaps is_commons trumps license or they conflict? Dunno, I just got started with the API. Hope this helps.