【问题标题】:Youtube api key caching json result of search query搜索查询的 Youtube api 密钥缓存 json 结果
【发布时间】:2016-07-09 02:09:58
【问题描述】:

我目前正在开发一个 Android 应用程序(免费应用程序),它使用我的 youtube api 密钥向我的 youtube 频道执行搜索查询请求。

为了防止超出配额限制。我喜欢将 json 结果缓存在 Android 数据库中。不缓存任何视频流。只是json答案。 12 小时后,我再次向 youtube 请求。

有可能吗? 或者我会阻止 ToS?

【问题讨论】:

    标签: android youtube google-api youtube-api


    【解决方案1】:

    可以这样做,而且不违反 TOS。假设您熟悉 SharedPreferences, SharedPreferences prefs = c.getSharedPreferences(TAG, Context.MODE_PRIVATE); 然后 SharedPreferences.Editor editor = prefs.edit(); editor.putString("key", "your json response"); editor.commit();

    【讨论】:

      猜你喜欢
      • 2013-05-12
      • 2014-12-11
      • 2017-08-27
      • 2019-01-27
      • 2020-01-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多