Add GetVideoPlayAuth API parameter.
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
@@ -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_;
|
||||
|
||||
};
|
||||
|
||||
@@ -37,8 +37,8 @@ namespace AlibabaCloud
|
||||
std::string status;
|
||||
std::string videoId;
|
||||
std::string title;
|
||||
std::string coverURL;
|
||||
float duration;
|
||||
std::string coverURL;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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_;
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user