# Album 相册服务 - [/cloud.Album/CreateAlbum](#cloudalbumcreatealbum) - [/cloud.Album/GetAlbum](#cloudalbumgetalbum) - [/cloud.Album/UpdateAlbum](#cloudalbumupdatealbum) - [/cloud.Album/DeleteAlbum](#cloudalbumdeletealbum) - [/cloud.Album/ListAlbums](#cloudalbumlistalbums) - [/cloud.Album/SetCoverPhoto](#cloudalbumsetcoverphoto) - [/cloud.Album/UploadPhoto](#cloudalbumuploadphoto) - [/cloud.Album/GetPhoto](#cloudalbumgetphoto) - [/cloud.Album/UpdatePhoto](#cloudalbumupdatephoto) - [/cloud.Album/DeletePhoto](#cloudalbumdeletephoto) - [/cloud.Album/ListPhotos](#cloudalbumlistphotos) - [/cloud.Album/MovePhoto](#cloudalbummovephoto) ## /cloud.Album/CreateAlbum 创建相册 ### Request ```javascript { cloud_id: "0", // type cloud_identity: "", // type name: "", // type, 相册名称 description: "", // type, 相册描述 cover_photo: "", // type, 封面照片URL is_private: false, // type, 是否私有 } ``` ### Reply ```javascript { code: 0, // type, 状态码 message: "", // type, 状态说明 details: "", // type, 数据 timeseq: "0", // type, 响应时间序列 } ``` ## /cloud.Album/GetAlbum 获取相册详情 ### Request ```javascript { id: "0", // type, 唯一ID identity: "", // type, 唯一码 } ``` ### Reply ```javascript { id: "0", // type identity: "", // type name: "", // type, 相册名称 description: "", // type, 相册描述 cover_photo: "", // type, 封面照片URL is_private: false, // type, 是否私有 created_at: "", // type updated_at: "", // type // 关联关系 photos: [{ id: "0", // type identity: "", // type album_id: "0", // type, 专辑ID title: "", // type, 照片标题 description: "", // type, 照片描述 file_path: "", // type, 文件路径 file_size: "0", // type, 文件大小 mime_type: "", // type, 文件类型 width: 0, // type, 图片宽度 height: 0, // type, 图片高度 taken_at: "", // type, 拍摄时间 location: "", // type, 拍摄地点 tags: "", // type, 标签,逗号分隔 created_at: "", // type updated_at: "", // type // 关联关系 album: {}, // type }], // list, 相册下的照片 } ``` ## /cloud.Album/UpdateAlbum 更新相册 ### Request ```javascript { id: "0", // type identity: "", // type name: "", // type, 相册名称 description: "", // type, 相册描述 cover_photo: "", // type, 封面照片URL is_private: false, // type, 是否私有 created_at: "", // type updated_at: "", // type // 关联关系 photos: [{ id: "0", // type identity: "", // type album_id: "0", // type, 专辑ID title: "", // type, 照片标题 description: "", // type, 照片描述 file_path: "", // type, 文件路径 file_size: "0", // type, 文件大小 mime_type: "", // type, 文件类型 width: 0, // type, 图片宽度 height: 0, // type, 图片高度 taken_at: "", // type, 拍摄时间 location: "", // type, 拍摄地点 tags: "", // type, 标签,逗号分隔 created_at: "", // type updated_at: "", // type // 关联关系 album: {}, // type }], // list, 相册下的照片 } ``` ### Reply ```javascript { code: 0, // type, 状态码 message: "", // type, 状态说明 details: "", // type, 数据 timeseq: "0", // type, 响应时间序列 } ``` ## /cloud.Album/DeleteAlbum 删除相册 ### Request ```javascript { id: "0", // type, 唯一ID identity: "", // type, 唯一码 } ``` ### Reply ```javascript { code: 0, // type, 状态码 message: "", // type, 状态说明 details: "", // type, 数据 timeseq: "0", // type, 响应时间序列 } ``` ## /cloud.Album/ListAlbums 获取相册列表 ### Request ```javascript { page_no: "0", // type, 页数 page_size: "0", // type, 每页记录数 params: { "": "" }, // map, 条件参数,key=val,eg key:category_id=?,vlaue=11 } ``` ### Reply ```javascript { albums: [{ id: "0", // type identity: "", // type name: "", // type, 相册名称 description: "", // type, 相册描述 cover_photo: "", // type, 封面照片URL is_private: false, // type, 是否私有 created_at: "", // type updated_at: "", // type // 关联关系 photos: [{ id: "0", // type identity: "", // type album_id: "0", // type, 专辑ID title: "", // type, 照片标题 description: "", // type, 照片描述 file_path: "", // type, 文件路径 file_size: "0", // type, 文件大小 mime_type: "", // type, 文件类型 width: 0, // type, 图片宽度 height: 0, // type, 图片高度 taken_at: "", // type, 拍摄时间 location: "", // type, 拍摄地点 tags: "", // type, 标签,逗号分隔 created_at: "", // type updated_at: "", // type // 关联关系 album: {}, // type }], // list, 相册下的照片 }], // list total: "0", // type } ``` ## /cloud.Album/SetCoverPhoto 设置封面照片 ### Request ```javascript { album_id: "0", // type photo_id: "0", // type } ``` ### Reply ```javascript { code: 0, // type, 状态码 message: "", // type, 状态说明 details: "", // type, 数据 timeseq: "0", // type, 响应时间序列 } ``` ## /cloud.Album/UploadPhoto 上传照片 ### Request ```javascript { id: "0", // type identity: "", // type album_id: "0", // type, 专辑ID title: "", // type, 照片标题 description: "", // type, 照片描述 file_path: "", // type, 文件路径 file_size: "0", // type, 文件大小 mime_type: "", // type, 文件类型 width: 0, // type, 图片宽度 height: 0, // type, 图片高度 taken_at: "", // type, 拍摄时间 location: "", // type, 拍摄地点 tags: "", // type, 标签,逗号分隔 created_at: "", // type updated_at: "", // type // 关联关系 album: { id: "0", // type identity: "", // type name: "", // type, 相册名称 description: "", // type, 相册描述 cover_photo: "", // type, 封面照片URL is_private: false, // type, 是否私有 created_at: "", // type updated_at: "", // type // 关联关系 photos: [{}], // list, 相册下的照片 }, // type } ``` ### Reply ```javascript { code: 0, // type, 状态码 message: "", // type, 状态说明 details: "", // type, 数据 timeseq: "0", // type, 响应时间序列 } ``` ## /cloud.Album/GetPhoto 获取照片详情 ### Request ```javascript { id: "0", // type, 唯一ID identity: "", // type, 唯一码 } ``` ### Reply ```javascript { id: "0", // type identity: "", // type album_id: "0", // type, 专辑ID title: "", // type, 照片标题 description: "", // type, 照片描述 file_path: "", // type, 文件路径 file_size: "0", // type, 文件大小 mime_type: "", // type, 文件类型 width: 0, // type, 图片宽度 height: 0, // type, 图片高度 taken_at: "", // type, 拍摄时间 location: "", // type, 拍摄地点 tags: "", // type, 标签,逗号分隔 created_at: "", // type updated_at: "", // type // 关联关系 album: { id: "0", // type identity: "", // type name: "", // type, 相册名称 description: "", // type, 相册描述 cover_photo: "", // type, 封面照片URL is_private: false, // type, 是否私有 created_at: "", // type updated_at: "", // type // 关联关系 photos: [{}], // list, 相册下的照片 }, // type } ``` ## /cloud.Album/UpdatePhoto 更新照片 ### Request ```javascript { id: "0", // type identity: "", // type album_id: "0", // type, 专辑ID title: "", // type, 照片标题 description: "", // type, 照片描述 file_path: "", // type, 文件路径 file_size: "0", // type, 文件大小 mime_type: "", // type, 文件类型 width: 0, // type, 图片宽度 height: 0, // type, 图片高度 taken_at: "", // type, 拍摄时间 location: "", // type, 拍摄地点 tags: "", // type, 标签,逗号分隔 created_at: "", // type updated_at: "", // type // 关联关系 album: { id: "0", // type identity: "", // type name: "", // type, 相册名称 description: "", // type, 相册描述 cover_photo: "", // type, 封面照片URL is_private: false, // type, 是否私有 created_at: "", // type updated_at: "", // type // 关联关系 photos: [{}], // list, 相册下的照片 }, // type } ``` ### Reply ```javascript { code: 0, // type, 状态码 message: "", // type, 状态说明 details: "", // type, 数据 timeseq: "0", // type, 响应时间序列 } ``` ## /cloud.Album/DeletePhoto 删除照片 ### Request ```javascript { id: "0", // type, 唯一ID identity: "", // type, 唯一码 } ``` ### Reply ```javascript { code: 0, // type, 状态码 message: "", // type, 状态说明 details: "", // type, 数据 timeseq: "0", // type, 响应时间序列 } ``` ## /cloud.Album/ListPhotos 获取照片列表 ### Request ```javascript { page_no: "0", // type, 页数 page_size: "0", // type, 每页记录数 params: { "": "" }, // map, 条件参数,key=val,eg key:category_id=?,vlaue=11 } ``` ### Reply ```javascript { photos: [{ id: "0", // type identity: "", // type album_id: "0", // type, 专辑ID title: "", // type, 照片标题 description: "", // type, 照片描述 file_path: "", // type, 文件路径 file_size: "0", // type, 文件大小 mime_type: "", // type, 文件类型 width: 0, // type, 图片宽度 height: 0, // type, 图片高度 taken_at: "", // type, 拍摄时间 location: "", // type, 拍摄地点 tags: "", // type, 标签,逗号分隔 created_at: "", // type updated_at: "", // type // 关联关系 album: { id: "0", // type identity: "", // type name: "", // type, 相册名称 description: "", // type, 相册描述 cover_photo: "", // type, 封面照片URL is_private: false, // type, 是否私有 created_at: "", // type updated_at: "", // type // 关联关系 photos: [{}], // list, 相册下的照片 }, // type }], // list total: "0", // type } ``` ## /cloud.Album/MovePhoto 移动照片到其他相册 ### Request ```javascript { photo_id: "0", // type new_album_id: "0", // type } ``` ### Reply ```javascript { code: 0, // type, 状态码 message: "", // type, 状态说明 details: "", // type, 数据 timeseq: "0", // type, 响应时间序列 } ```