From 54a8427771ff39717a01285c497136b9a964e9e5 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 2 Nov 2021 11:15:20 +0000 Subject: [PATCH] Add GetVideoPlayAuth API parameter. --- CHANGELOG | 3 ++ VERSION | 2 +- .../vod/model/GetVideoPlayAuthRequest.h | 9 +++-- .../vod/model/GetVideoPlayAuthResult.h | 2 +- vod/src/VodClient.cc | 6 ++-- vod/src/model/GetVideoPlayAuthRequest.cc | 33 ++++++++++++------- vod/src/model/GetVideoPlayAuthResult.cc | 8 ++--- 7 files changed, 40 insertions(+), 23 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index c195903fc..813648583 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2021-11-02 Version: 1.36.919 +- Add GetVideoPlayAuth API parameter. + 2021-11-02 Version: 1.36.918 - Support multi language. diff --git a/VERSION b/VERSION index 44c77ae45..950c3d52d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.918 \ No newline at end of file +1.36.919 \ No newline at end of file diff --git a/vod/include/alibabacloud/vod/model/GetVideoPlayAuthRequest.h b/vod/include/alibabacloud/vod/model/GetVideoPlayAuthRequest.h index c105eb0e1..75810d9ef 100644 --- a/vod/include/alibabacloud/vod/model/GetVideoPlayAuthRequest.h +++ b/vod/include/alibabacloud/vod/model/GetVideoPlayAuthRequest.h @@ -35,19 +35,22 @@ namespace AlibabaCloud GetVideoPlayAuthRequest(); ~GetVideoPlayAuthRequest(); - std::string getVideoId()const; - void setVideoId(const std::string& videoId); std::string getReAuthInfo()const; void setReAuthInfo(const std::string& reAuthInfo); std::string getPlayConfig()const; void setPlayConfig(const std::string& playConfig); + std::string getVideoId()const; + void setVideoId(const std::string& videoId); + std::string getApiVersion()const; + void setApiVersion(const std::string& apiVersion); long getAuthInfoTimeout()const; void setAuthInfoTimeout(long authInfoTimeout); private: - std::string videoId_; std::string reAuthInfo_; std::string playConfig_; + std::string videoId_; + std::string apiVersion_; long authInfoTimeout_; }; diff --git a/vod/include/alibabacloud/vod/model/GetVideoPlayAuthResult.h b/vod/include/alibabacloud/vod/model/GetVideoPlayAuthResult.h index c9dec156a..d119358ff 100644 --- a/vod/include/alibabacloud/vod/model/GetVideoPlayAuthResult.h +++ b/vod/include/alibabacloud/vod/model/GetVideoPlayAuthResult.h @@ -37,8 +37,8 @@ namespace AlibabaCloud std::string status; std::string videoId; std::string title; - std::string coverURL; float duration; + std::string coverURL; }; diff --git a/vod/src/VodClient.cc b/vod/src/VodClient.cc index 2bbc93ed1..6d24af486 100644 --- a/vod/src/VodClient.cc +++ b/vod/src/VodClient.cc @@ -31,21 +31,21 @@ VodClient::VodClient(const Credentials &credentials, const ClientConfiguration & RpcServiceClient(SERVICE_NAME, std::make_shared(credentials), configuration) { auto locationClient = std::make_shared(credentials, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "vod"); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); } VodClient::VodClient(const std::shared_ptr& credentialsProvider, const ClientConfiguration & configuration) : RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) { auto locationClient = std::make_shared(credentialsProvider, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "vod"); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); } VodClient::VodClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) : RpcServiceClient(SERVICE_NAME, std::make_shared(accessKeyId, accessKeySecret), configuration) { auto locationClient = std::make_shared(accessKeyId, accessKeySecret, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "vod"); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); } VodClient::~VodClient() diff --git a/vod/src/model/GetVideoPlayAuthRequest.cc b/vod/src/model/GetVideoPlayAuthRequest.cc index f4bea521f..4ced81977 100644 --- a/vod/src/model/GetVideoPlayAuthRequest.cc +++ b/vod/src/model/GetVideoPlayAuthRequest.cc @@ -27,17 +27,6 @@ GetVideoPlayAuthRequest::GetVideoPlayAuthRequest() : GetVideoPlayAuthRequest::~GetVideoPlayAuthRequest() {} -std::string GetVideoPlayAuthRequest::getVideoId()const -{ - return videoId_; -} - -void GetVideoPlayAuthRequest::setVideoId(const std::string& videoId) -{ - videoId_ = videoId; - setParameter("VideoId", videoId); -} - std::string GetVideoPlayAuthRequest::getReAuthInfo()const { return reAuthInfo_; @@ -60,6 +49,28 @@ void GetVideoPlayAuthRequest::setPlayConfig(const std::string& playConfig) setParameter("PlayConfig", playConfig); } +std::string GetVideoPlayAuthRequest::getVideoId()const +{ + return videoId_; +} + +void GetVideoPlayAuthRequest::setVideoId(const std::string& videoId) +{ + videoId_ = videoId; + setParameter("VideoId", videoId); +} + +std::string GetVideoPlayAuthRequest::getApiVersion()const +{ + return apiVersion_; +} + +void GetVideoPlayAuthRequest::setApiVersion(const std::string& apiVersion) +{ + apiVersion_ = apiVersion; + setParameter("ApiVersion", apiVersion); +} + long GetVideoPlayAuthRequest::getAuthInfoTimeout()const { return authInfoTimeout_; diff --git a/vod/src/model/GetVideoPlayAuthResult.cc b/vod/src/model/GetVideoPlayAuthResult.cc index 7a549fef9..7c2ad3316 100644 --- a/vod/src/model/GetVideoPlayAuthResult.cc +++ b/vod/src/model/GetVideoPlayAuthResult.cc @@ -40,16 +40,16 @@ void GetVideoPlayAuthResult::parse(const std::string &payload) reader.parse(payload, value); setRequestId(value["RequestId"].asString()); auto videoMetaNode = value["VideoMeta"]; - if(!videoMetaNode["CoverURL"].isNull()) - videoMeta_.coverURL = videoMetaNode["CoverURL"].asString(); - if(!videoMetaNode["Duration"].isNull()) - videoMeta_.duration = std::stof(videoMetaNode["Duration"].asString()); if(!videoMetaNode["Status"].isNull()) videoMeta_.status = videoMetaNode["Status"].asString(); + if(!videoMetaNode["Duration"].isNull()) + videoMeta_.duration = std::stof(videoMetaNode["Duration"].asString()); if(!videoMetaNode["Title"].isNull()) videoMeta_.title = videoMetaNode["Title"].asString(); if(!videoMetaNode["VideoId"].isNull()) videoMeta_.videoId = videoMetaNode["VideoId"].asString(); + if(!videoMetaNode["CoverURL"].isNull()) + videoMeta_.coverURL = videoMetaNode["CoverURL"].asString(); if(!value["PlayAuth"].isNull()) playAuth_ = value["PlayAuth"].asString();