Add GetVideoPlayAuth API parameter.

This commit is contained in:
sdk-team
2021-11-02 11:15:20 +00:00
parent 5f1578fdbe
commit 54a8427771
7 changed files with 40 additions and 23 deletions

View File

@@ -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.

View File

@@ -1 +1 @@
1.36.918
1.36.919

View File

@@ -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_;
};

View File

@@ -37,8 +37,8 @@ namespace AlibabaCloud
std::string status;
std::string videoId;
std::string title;
std::string coverURL;
float duration;
std::string coverURL;
};

View File

@@ -31,21 +31,21 @@ VodClient::VodClient(const Credentials &credentials, const ClientConfiguration &
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "vod");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
VodClient::VodClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "vod");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
VodClient::VodClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "vod");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
VodClient::~VodClient()

View File

@@ -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_;

View File

@@ -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();