client/docs/cloud/album.md

13 KiB

Album

相册服务

/cloud.Album/CreateAlbum

创建相册

Request

{
    cloud_id: "0", // type<uint64>
    cloud_identity: "", // type<string>
    name: "", // type<string>, 相册名称
    description: "", // type<string>, 相册描述
    cover_photo: "", // type<string>, 封面照片URL
    is_private: false, // type<bool>, 是否私有
}

Reply

{
    code: 0, // type<int32>, 状态码
    message: "", // type<string>, 状态说明
    details: "", // type<string>, 数据
    timeseq: "0", // type<int64>, 响应时间序列
}

/cloud.Album/GetAlbum

获取相册详情

Request

{
    id: "0", // type<int64>, 唯一ID
    identity: "", // type<string>, 唯一码
}

Reply

{
    id: "0", // type<uint64>
    identity: "", // type<string>
    name: "", // type<string>, 相册名称
    description: "", // type<string>, 相册描述
    cover_photo: "", // type<string>, 封面照片URL
    is_private: false, // type<bool>, 是否私有
    created_at: "", // type<string>
    updated_at: "", // type<string>
    // 关联关系
    photos: [{
        id: "0", // type<uint64>
        identity: "", // type<string>
        album_id: "0", // type<uint64>, 专辑ID
        title: "", // type<string>, 照片标题
        description: "", // type<string>, 照片描述
        file_path: "", // type<string>, 文件路径
        file_size: "0", // type<int64>, 文件大小
        mime_type: "", // type<string>, 文件类型
        width: 0, // type<int32>, 图片宽度
        height: 0, // type<int32>, 图片高度
        taken_at: "", // type<string>, 拍摄时间
        location: "", // type<string>, 拍摄地点
        tags: "", // type<string>, 标签,逗号分隔
        created_at: "", // type<string>
        updated_at: "", // type<string>
        // 关联关系
        album: {}, // type<CloudAlbumItem>
    }], // list<CloudPhotoItem>, 相册下的照片
}

/cloud.Album/UpdateAlbum

更新相册

Request

{
    id: "0", // type<uint64>
    identity: "", // type<string>
    name: "", // type<string>, 相册名称
    description: "", // type<string>, 相册描述
    cover_photo: "", // type<string>, 封面照片URL
    is_private: false, // type<bool>, 是否私有
    created_at: "", // type<string>
    updated_at: "", // type<string>
    // 关联关系
    photos: [{
        id: "0", // type<uint64>
        identity: "", // type<string>
        album_id: "0", // type<uint64>, 专辑ID
        title: "", // type<string>, 照片标题
        description: "", // type<string>, 照片描述
        file_path: "", // type<string>, 文件路径
        file_size: "0", // type<int64>, 文件大小
        mime_type: "", // type<string>, 文件类型
        width: 0, // type<int32>, 图片宽度
        height: 0, // type<int32>, 图片高度
        taken_at: "", // type<string>, 拍摄时间
        location: "", // type<string>, 拍摄地点
        tags: "", // type<string>, 标签,逗号分隔
        created_at: "", // type<string>
        updated_at: "", // type<string>
        // 关联关系
        album: {}, // type<CloudAlbumItem>
    }], // list<CloudPhotoItem>, 相册下的照片
}

Reply

{
    code: 0, // type<int32>, 状态码
    message: "", // type<string>, 状态说明
    details: "", // type<string>, 数据
    timeseq: "0", // type<int64>, 响应时间序列
}

/cloud.Album/DeleteAlbum

删除相册

Request

{
    id: "0", // type<int64>, 唯一ID
    identity: "", // type<string>, 唯一码
}

Reply

{
    code: 0, // type<int32>, 状态码
    message: "", // type<string>, 状态说明
    details: "", // type<string>, 数据
    timeseq: "0", // type<int64>, 响应时间序列
}

/cloud.Album/ListAlbums

获取相册列表

Request

{
    page_no: "0", // type<int64>, 页数
    page_size: "0", // type<int64>, 每页记录数
    params: {
        "": ""
    }, // map<string,string>, 条件参数,key=val,eg key:category_id=?,vlaue=11 
}

Reply

{
    albums: [{
        id: "0", // type<uint64>
        identity: "", // type<string>
        name: "", // type<string>, 相册名称
        description: "", // type<string>, 相册描述
        cover_photo: "", // type<string>, 封面照片URL
        is_private: false, // type<bool>, 是否私有
        created_at: "", // type<string>
        updated_at: "", // type<string>
        // 关联关系
        photos: [{
            id: "0", // type<uint64>
            identity: "", // type<string>
            album_id: "0", // type<uint64>, 专辑ID
            title: "", // type<string>, 照片标题
            description: "", // type<string>, 照片描述
            file_path: "", // type<string>, 文件路径
            file_size: "0", // type<int64>, 文件大小
            mime_type: "", // type<string>, 文件类型
            width: 0, // type<int32>, 图片宽度
            height: 0, // type<int32>, 图片高度
            taken_at: "", // type<string>, 拍摄时间
            location: "", // type<string>, 拍摄地点
            tags: "", // type<string>, 标签,逗号分隔
            created_at: "", // type<string>
            updated_at: "", // type<string>
            // 关联关系
            album: {}, // type<CloudAlbumItem>
        }], // list<CloudPhotoItem>, 相册下的照片
    }], // list<CloudAlbumItem>
    total: "0", // type<int64>
}

/cloud.Album/SetCoverPhoto

设置封面照片

Request

{
    album_id: "0", // type<uint64>
    photo_id: "0", // type<uint64>
}

Reply

{
    code: 0, // type<int32>, 状态码
    message: "", // type<string>, 状态说明
    details: "", // type<string>, 数据
    timeseq: "0", // type<int64>, 响应时间序列
}

/cloud.Album/UploadPhoto

上传照片

Request

{
    id: "0", // type<uint64>
    identity: "", // type<string>
    album_id: "0", // type<uint64>, 专辑ID
    title: "", // type<string>, 照片标题
    description: "", // type<string>, 照片描述
    file_path: "", // type<string>, 文件路径
    file_size: "0", // type<int64>, 文件大小
    mime_type: "", // type<string>, 文件类型
    width: 0, // type<int32>, 图片宽度
    height: 0, // type<int32>, 图片高度
    taken_at: "", // type<string>, 拍摄时间
    location: "", // type<string>, 拍摄地点
    tags: "", // type<string>, 标签,逗号分隔
    created_at: "", // type<string>
    updated_at: "", // type<string>
    // 关联关系
    album: {
        id: "0", // type<uint64>
        identity: "", // type<string>
        name: "", // type<string>, 相册名称
        description: "", // type<string>, 相册描述
        cover_photo: "", // type<string>, 封面照片URL
        is_private: false, // type<bool>, 是否私有
        created_at: "", // type<string>
        updated_at: "", // type<string>
        // 关联关系
        photos: [{}], // list<CloudPhotoItem>, 相册下的照片
    }, // type<CloudAlbumItem>
}

Reply

{
    code: 0, // type<int32>, 状态码
    message: "", // type<string>, 状态说明
    details: "", // type<string>, 数据
    timeseq: "0", // type<int64>, 响应时间序列
}

/cloud.Album/GetPhoto

获取照片详情

Request

{
    id: "0", // type<int64>, 唯一ID
    identity: "", // type<string>, 唯一码
}

Reply

{
    id: "0", // type<uint64>
    identity: "", // type<string>
    album_id: "0", // type<uint64>, 专辑ID
    title: "", // type<string>, 照片标题
    description: "", // type<string>, 照片描述
    file_path: "", // type<string>, 文件路径
    file_size: "0", // type<int64>, 文件大小
    mime_type: "", // type<string>, 文件类型
    width: 0, // type<int32>, 图片宽度
    height: 0, // type<int32>, 图片高度
    taken_at: "", // type<string>, 拍摄时间
    location: "", // type<string>, 拍摄地点
    tags: "", // type<string>, 标签,逗号分隔
    created_at: "", // type<string>
    updated_at: "", // type<string>
    // 关联关系
    album: {
        id: "0", // type<uint64>
        identity: "", // type<string>
        name: "", // type<string>, 相册名称
        description: "", // type<string>, 相册描述
        cover_photo: "", // type<string>, 封面照片URL
        is_private: false, // type<bool>, 是否私有
        created_at: "", // type<string>
        updated_at: "", // type<string>
        // 关联关系
        photos: [{}], // list<CloudPhotoItem>, 相册下的照片
    }, // type<CloudAlbumItem>
}

/cloud.Album/UpdatePhoto

更新照片

Request

{
    id: "0", // type<uint64>
    identity: "", // type<string>
    album_id: "0", // type<uint64>, 专辑ID
    title: "", // type<string>, 照片标题
    description: "", // type<string>, 照片描述
    file_path: "", // type<string>, 文件路径
    file_size: "0", // type<int64>, 文件大小
    mime_type: "", // type<string>, 文件类型
    width: 0, // type<int32>, 图片宽度
    height: 0, // type<int32>, 图片高度
    taken_at: "", // type<string>, 拍摄时间
    location: "", // type<string>, 拍摄地点
    tags: "", // type<string>, 标签,逗号分隔
    created_at: "", // type<string>
    updated_at: "", // type<string>
    // 关联关系
    album: {
        id: "0", // type<uint64>
        identity: "", // type<string>
        name: "", // type<string>, 相册名称
        description: "", // type<string>, 相册描述
        cover_photo: "", // type<string>, 封面照片URL
        is_private: false, // type<bool>, 是否私有
        created_at: "", // type<string>
        updated_at: "", // type<string>
        // 关联关系
        photos: [{}], // list<CloudPhotoItem>, 相册下的照片
    }, // type<CloudAlbumItem>
}

Reply

{
    code: 0, // type<int32>, 状态码
    message: "", // type<string>, 状态说明
    details: "", // type<string>, 数据
    timeseq: "0", // type<int64>, 响应时间序列
}

/cloud.Album/DeletePhoto

删除照片

Request

{
    id: "0", // type<int64>, 唯一ID
    identity: "", // type<string>, 唯一码
}

Reply

{
    code: 0, // type<int32>, 状态码
    message: "", // type<string>, 状态说明
    details: "", // type<string>, 数据
    timeseq: "0", // type<int64>, 响应时间序列
}

/cloud.Album/ListPhotos

获取照片列表

Request

{
    page_no: "0", // type<int64>, 页数
    page_size: "0", // type<int64>, 每页记录数
    params: {
        "": ""
    }, // map<string,string>, 条件参数,key=val,eg key:category_id=?,vlaue=11 
}

Reply

{
    photos: [{
        id: "0", // type<uint64>
        identity: "", // type<string>
        album_id: "0", // type<uint64>, 专辑ID
        title: "", // type<string>, 照片标题
        description: "", // type<string>, 照片描述
        file_path: "", // type<string>, 文件路径
        file_size: "0", // type<int64>, 文件大小
        mime_type: "", // type<string>, 文件类型
        width: 0, // type<int32>, 图片宽度
        height: 0, // type<int32>, 图片高度
        taken_at: "", // type<string>, 拍摄时间
        location: "", // type<string>, 拍摄地点
        tags: "", // type<string>, 标签,逗号分隔
        created_at: "", // type<string>
        updated_at: "", // type<string>
        // 关联关系
        album: {
            id: "0", // type<uint64>
            identity: "", // type<string>
            name: "", // type<string>, 相册名称
            description: "", // type<string>, 相册描述
            cover_photo: "", // type<string>, 封面照片URL
            is_private: false, // type<bool>, 是否私有
            created_at: "", // type<string>
            updated_at: "", // type<string>
            // 关联关系
            photos: [{}], // list<CloudPhotoItem>, 相册下的照片
        }, // type<CloudAlbumItem>
    }], // list<CloudPhotoItem>
    total: "0", // type<int64>
}

/cloud.Album/MovePhoto

移动照片到其他相册

Request

{
    photo_id: "0", // type<uint64>
    new_album_id: "0", // type<uint64>
}

Reply

{
    code: 0, // type<int32>, 状态码
    message: "", // type<string>, 状态说明
    details: "", // type<string>, 数据
    timeseq: "0", // type<int64>, 响应时间序列
}