camera.delete
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
URI가 지정된 파일을 삭제합니다. 이 명령어는 API 수준 2에서 수정되었습니다.
매개변수
- API 수준 1
<ph type="x-smartling-placeholder">
</ph>
- fileUri: 삭제할 파일의 URI입니다. 제조업체가 결정
절대 URI를 사용할지, 상대 URI를 사용할지가 결정됩니다. 클라이언트는 이를 불투명으로 처리할 수 있습니다.
사용됩니다.
- API 수준 2
<ph type="x-smartling-placeholder">
</ph>
- fileUrls: 삭제할 파일의 절대 URL 목록입니다.
이전에 가져온 카메라에서(예: 최저가:
<ph type="x-smartling-placeholder">
camera.listFiles
</ph>
또는 camera.takePicture
명령어만 사용할 수 있습니다. 다음과 같은 세 가지 특수한 경우가 있습니다.
<ph type="x-smartling-placeholder"></ph>
- 목록에는 'all' 문자열만 포함됨: 카메라의 모든 파일을 삭제합니다.
- 목록에는 'image' 문자열만 포함되어 있습니다. 목록에 있는 모든 이미지를 삭제합니다.
있습니다.
- 목록에는 'video'라는 문자열만 포함되어 있습니다.
있습니다.
결과
- fileUrls: 삭제되지 않은 파일의 URL입니다.
fileUrl의 모든 URL이 유효하지만 카메라가 작동하지 않는 경우 이 문제가 발생합니다.
삭제할 수도 있습니다 잘못된 URL이 있는 경우 오류 코드
파일을 삭제하지 않고
invalidParameterValue
가 반환되어야 합니다.
이는 API 수준 2에 추가되었습니다.
오류
- missingParameter:
fileUri
가 지정되지 않았습니다.
- invalidParameterName: 입력 매개변수 이름을 인식할 수 없습니다.
- invalidParameterValue: 입력 매개변수 이름이 인식됩니다.
값이 유효하지 않습니다. 예를 들어
fileUri
는
API 수준 1에 있거나 fileUrls의 URL이 API 수준 2에 없는 경우
명령어 I/O |
명령어 입력 (API 수준 1) |
{
"parameters": {
"fileUri": "file URI"
}
} |
명령어 출력 (API 수준 1) |
none |
명령어 출력 (오류) (API 수준 1) |
{
"error": {
"code": "invalidParameterName",
"message": "Parameter XYZ is unrecognized."
}
} |
명령어 입력 (API 수준 2) |
{
"parameters": {
"fileUrls": [
"url1",
"url2",
"url3",
...
"urln"
]
}
} |
명령어 결과 (API 수준 2) |
{
"results": {
"fileUrls": [
"urln"
]
}
} |
명령어 출력 (오류) (API 수준 2) |
{
"error": {
"code": "invalidParameterValue",
"message": "Parameter url3 doesn't exist."
}
} |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-08-21(UTC)
[null,null,["최종 업데이트: 2024-08-21(UTC)"],[[["\u003cp\u003eThe \u003ccode\u003edeleteFile\u003c/code\u003e command removes one or more files from the camera's storage.\u003c/p\u003e\n"],["\u003cp\u003eAPI level 1 uses \u003ccode\u003efileUri\u003c/code\u003e to specify a single file for deletion, while API level 2 uses \u003ccode\u003efileUrls\u003c/code\u003e to specify one or more files, or uses special values to delete all files, all images, or all videos.\u003c/p\u003e\n"],["\u003cp\u003eErrors are returned if parameters are missing, invalid, or if the specified files cannot be deleted.\u003c/p\u003e\n"],["\u003cp\u003eAPI level 2 introduced the \u003ccode\u003efileUrls\u003c/code\u003e parameter and the ability to return a list of unsuccessfully deleted files in the results.\u003c/p\u003e\n"]]],["This describes a command to delete files from a camera. In API level 1, it accepts a `fileUri` to delete a single file, where the URI's format is determined by the manufacturer. API level 2 was introduced to use the `fileUrls` parameter for multiple files, specified by absolute URLs. Special strings like \"all\", \"image\", or \"video\" delete all files, all images, or all videos. A list of `fileUrls` will return any files that did not delete correctly. Errors include invalid parameters or missing data.\n"],null,["# camera.delete\n\nDeletes a file given its URI. **This command was modified in API level 2.**\n\nParameters\n----------\n\n- **API level 1**\n - **fileUri:** URI of a file to delete. Manufacturers decide whether to use absolute or relative URIs. Clients may treat this as an opaque identifier.\n- **API level 2**\n - **fileUrls:** A list of absolute URLs for files to be deleted from the camera, which were obtained previously, e.g. from [camera.listFiles](/streetview/open-spherical-camera/reference/camera/listfiles) or [camera.takePicture](/streetview/open-spherical-camera/reference/camera/takepicture) commands. There are three special cases:\n - The list only contains string \"all\": delete all files in the camera.\n - The list only contains string \"image\": delete all images in the camera.\n - The list only contains string \"video\": delete all videos in the camera.\n\nResults\n-------\n\n- **fileUrls:** URLs of files that are not successfully deleted. Please note this happens when all the URLs in fileUrls are valid but camera fails to delete some of them. If any of the URLs is invalid, error code `invalidParameterValue` should be returned without deleting any file. **This was added in API level 2.**\n\nErrors\n------\n\n- **missingParameter:** `fileUri` not specified.\n- **invalidParameterName:** The input parameter name is unrecognized.\n- **invalidParameterValue:** The input parameter name is recognized, but its value is invalid; for example, the `fileUri` doesn't exist in API level 1 or any URL in fileUrls doesn't exist in API level 2.\n\n| Command I/O ----------- ||\n|------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| **Command Input (API level 1)** | ```text { \"parameters\": { \"fileUri\": \"file URI\" } } ``` |\n| **Command Output (API level 1)** | ```text none ``` |\n| **Command Output (Error) (API level 1)** | ```text { \"error\": { \"code\": \"invalidParameterName\", \"message\": \"Parameter XYZ is unrecognized.\" } } ``` |\n| **Command Input (API level 2)** | ```text { \"parameters\": { \"fileUrls\": [ \"url1\", \"url2\", \"url3\", ... \"urln\" ] } } ``` |\n| **Command Output (API level 2)** | ```text { \"results\": { \"fileUrls\": [ \"urln\" ] } } ``` |\n| **Command Output (Error) (API level 2)** | ```text { \"error\": { \"code\": \"invalidParameterValue\", \"message\": \"Parameter url3 doesn't exist.\" } } ``` |"]]