Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用系統帳號上傳到 YouTube #26

Open
3 tasks
ghost opened this issue Oct 5, 2018 · 4 comments
Open
3 tasks

使用系統帳號上傳到 YouTube #26

ghost opened this issue Oct 5, 2018 · 4 comments
Assignees

Comments

@ghost
Copy link

ghost commented Oct 5, 2018

以已建好的帳號與 YouTube API 介接,上傳影片。
取得下列資訊:

  • 確認 client credential
  • 應該要能夠由 project/site/sub_site/location, 以及原檔名與影片開始時間(date_time_original) 判斷檔案是否已上傳過。
  • 若曾經上傳過,則回傳已存在之 youtube 連結 (如果 youtube api 不方便做這個操作,TaiBIF 可提供 query 用的 API)

查找是否已建檔的 API: https://camera-trap.tw/api/v0.8/media/query

  • upload_file_name
    上傳到 S3 的原檔名,不含路徑
  • date_time_original_timestamp
    錄影起始時間的 timestamp (單位到秒)
  • full_location_md5
    md5("$project/$site/$sub_site/$location)
  • Method
    POST
  • Content-type
    application/json
  • Data
{
  "query": {
    "uploaded_file_name": "IMG_0082.JPG",
    "date_time_original_timestamp": 1486728000,
    "fullCameraLocationMd5": "7621f2d15b1fb16ff04424baa6b08831"
  }
}
@kevin61225
Copy link
Contributor

您好,這支 API 現在好像壞掉了
再麻煩確認一下

@ghost
Copy link
Author

ghost commented Nov 1, 2018

抱歉這兩天因為更動造成困擾。目前 endpoint 為 https://camera-trap.tw/api/v0.8/media/query,已修正至前面說明。

@kevin61225
Copy link
Contributor

請問 API 仍在調整中嗎?
昨天切換到 https://camera-trap.tw/api/v0.8/media/query 並使用範例提供的參數有回傳資料
但方才呼叫的時候並沒有找到 IMG_0082.JPG 對應的資料
請問能否提供一組有回傳數值的測試資料呢?感謝

@trashmai
Copy link
Contributor

trashmai commented Nov 2, 2018

抱歉造成困擾,query 參數請改為

{
  "query": {
    "uploaded_file_name": "IMG_0082.JPG",
    "date_time_original_timestamp": 1486728000,
    "fullCameraLocationMd5": "7621f2d15b1fb16ff04424baa6b08831"
  }
}

@trashmai trashmai self-assigned this Nov 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants