【问题标题】:Is there a way to get all tags related to a photo using Unsplash API?有没有办法使用 Unsplash API 获取与照片相关的所有标签?
【发布时间】:2016-10-08 15:46:50
【问题描述】:

我知道我可以按标签搜索,这样我就可以找到所有被标记为包含“狗”一词的照片,但是有没有办法获取照片及其所有相关标签(狗、小狗、后院等)?

【问题讨论】:

    标签: node.js api photos


    【解决方案1】:

    如果您使用端点GET /photos/:id,您可以检索照片的categories

    "categories": [
      {
        "id": 4,
        "title": "Nature",
        "photo_count": 24783,
        "links": {
          "self": "https://api.unsplash.com/categories/4",
          "photos": "https://api.unsplash.com/categories/4/photos"
        }
      },
      // and so on
    ],
    

    【讨论】:

    • 那么类别就是标签?例如,该数组将包含一个用于描述照片的所有其他关键字的类似对象?
    • 经过审核,分类实际上是不是的标签。文档中没有提到这些,也没有出现在任何请求中,所以看起来它们还没有集成到 API 中。但是你可以在 Github 上添加一个问题并让他们知道:github.com/unsplash/unsplash-js/issues
    • 哦,谢谢!我一直在寻找,也没有找到任何东西,所以我会等待他们添加此选项。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-10-19
    • 2018-03-28
    • 1970-01-01
    • 1970-01-01
    • 2013-06-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多