com.volcengine.service.cms.CmsConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of volc-sdk-java Show documentation
Show all versions of volc-sdk-java Show documentation
The VOLC Engine SDK for Java
package com.volcengine.service.cms;
import com.volcengine.helper.Const;
import com.volcengine.model.ApiInfo;
import com.volcengine.model.Credentials;
import com.volcengine.model.ServiceInfo;
import org.apache.http.Header;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicHeader;
import org.apache.http.message.BasicNameValuePair;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
public class CmsConfig {
public static final String PlatformService = "volc_content_platform";
public static final String ApiService = "volc_content_api";
public static final Map platformServiceInfoMap = new HashMap() {
{
put(Const.REGION_CN_NORTH_1, new ServiceInfo(
new HashMap() {
{
put(Const.CONNECTION_TIMEOUT, 5000);
put(Const.SOCKET_TIMEOUT, 5000);
put(Const.Scheme, "https");
put(Const.Host, "cms.volcengineapi.com");
put(Const.Header, new ArrayList() {
{
add(new BasicHeader("Accept", "application/json"));
}
});
put(Const.Credentials, new Credentials(Const.REGION_CN_NORTH_1, PlatformService));
}
}
));
}
};
public static final Map platformApiInfoMap = new HashMap() {
{
put(Const.BatchCreateSourceArticle, new ApiInfo(
new HashMap() {
{
put(Const.Method, "POST");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", Const.BatchCreateSourceArticle));
add(new BasicNameValuePair("Version", "2021-01-01"));
}
});
}
}
));
put(Const.GetArticleBatchUploadDetail, new ApiInfo(
new HashMap() {
{
put(Const.Method, "POST");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", Const.GetArticleBatchUploadDetail));
add(new BasicNameValuePair("Version", "2021-01-01"));
}
});
}
}
));
put(Const.DeleteSourceArticle, new ApiInfo(
new HashMap() {
{
put(Const.Method, "POST");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", Const.DeleteSourceArticle));
add(new BasicNameValuePair("Version", "2021-01-01"));
}
});
}
}
));
put(Const.DeleteSourceArticleByOpenid, new ApiInfo(
new HashMap() {
{
put(Const.Method, "POST");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", Const.DeleteSourceArticleByOpenid));
add(new BasicNameValuePair("Version", "2021-01-01"));
}
});
}
}
));
put(Const.ArticleEventNotify, new ApiInfo(
new HashMap() {
{
put(Const.Method, "POST");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", Const.ArticleEventNotify));
add(new BasicNameValuePair("Version", "2021-01-01"));
}
});
}
}
));
}
};
public static final Map apiServiceInfoMap = new HashMap() {
{
put(Const.REGION_CN_NORTH_1, new ServiceInfo(
new HashMap() {
{
put(Const.CONNECTION_TIMEOUT, 5000);
put(Const.SOCKET_TIMEOUT, 5000);
put(Const.Scheme, "https");
put(Const.Host, "cms.volcengineapi.com");
put(Const.Header, new ArrayList() {
{
add(new BasicHeader("Accept", "application/json"));
}
});
put(Const.Credentials, new Credentials(Const.REGION_CN_NORTH_1, ApiService));
}
}
));
}
};
public static final Map apiApiInfoMap = new HashMap() {
{
put(Const.Feed, new ApiInfo(
new HashMap() {
{
put(Const.Method, "POST");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", Const.Feed));
add(new BasicNameValuePair("Version", "2021-06-17"));
}
});
}
}
));
put(Const.GetVideoByVid, new ApiInfo(
new HashMap() {
{
put(Const.Method, "POST");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", Const.GetVideoByVid));
add(new BasicNameValuePair("Version", "2021-08-18"));
}
});
}
}
));
put(Const.MGetVideoByVids, new ApiInfo(
new HashMap() {
{
put(Const.Method, "POST");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", Const.MGetVideoByVids));
add(new BasicNameValuePair("Version", "2021-09-01"));
}
});
}
}
));
put(Const.GetGoodsRelatedArticles, new ApiInfo(
new HashMap() {
{
put(Const.Method, "POST");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", Const.GetGoodsRelatedArticles));
add(new BasicNameValuePair("Version", "2021-01-01"));
}
});
}
}
));
put(Const.MGetGoodsRelatedArticles, new ApiInfo(
new HashMap() {
{
put(Const.Method, "POST");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", Const.MGetGoodsRelatedArticles));
add(new BasicNameValuePair("Version", "2021-01-01"));
}
});
}
}
));
put(Const.CmsSearch, new ApiInfo(
new HashMap() {
{
put(Const.Method, "POST");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", Const.CmsSearch));
add(new BasicNameValuePair("Version", "2022-01-01"));
}
});
}
}
));
put(Const.RelatedFeed, new ApiInfo(
new HashMap() {
{
put(Const.Method, "POST");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", Const.RelatedFeed));
add(new BasicNameValuePair("Version", "2022-01-01"));
}
});
}
}
));
}
};
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy