com.volcengine.service.stream.StreamConsumerConfig 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.stream;
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 StreamConsumerConfig {
public static ServiceInfo serviceInfo = new ServiceInfo(
new HashMap() {
{
put(Const.CONNECTION_TIMEOUT, 5000);
put(Const.SOCKET_TIMEOUT, 5000);
put(Const.Host, "mercury.volcengineapi.com");
put(Const.Header, new ArrayList() {
{
add(new BasicHeader("Accept", "application/json"));
}
});
put(Const.Credentials, new Credentials(Const.REGION_CN_NORTH_1, "content"));
put(Const.Scheme, "https");
}
}
);
public static Map apiInfoList = new HashMap() {
{
put(Const.FollowAction, new ApiInfo(
new HashMap() {
{
put(Const.Method, "GET");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", Const.FollowAction));
add(new BasicNameValuePair("Version", Const.ContentVersion));
}
});
}
}
));
put(Const.UnfollowAction, new ApiInfo(
new HashMap() {
{
put(Const.Method, "GET");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", Const.UnfollowAction));
add(new BasicNameValuePair("Version", Const.ContentVersion));
}
});
}
}
));
put(Const.FollowList, new ApiInfo(
new HashMap() {
{
put(Const.Method, "GET");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", Const.FollowList));
add(new BasicNameValuePair("Version", Const.ContentVersion));
}
});
}
}
));
put(Const.FollowCheck, new ApiInfo(
new HashMap() {
{
put(Const.Method, "GET");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", Const.FollowCheck));
add(new BasicNameValuePair("Version", Const.ContentVersion));
}
});
}
}
));
put(Const.SingleArticle, new ApiInfo(
new HashMap() {
{
put(Const.Method, "GET");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", Const.SingleArticle));
add(new BasicNameValuePair("Version", Const.ContentVersion));
}
});
}
}
));
put(Const.SingleArticleV2, new ApiInfo(
new HashMap() {
{
put(Const.Method, "GET");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", Const.SingleArticleV2));
add(new BasicNameValuePair("Version", Const.ContentVersion));
}
});
}
}
));
put(Const.MultiArticle, new ApiInfo(
new HashMap() {
{
put(Const.Method, "GET");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", Const.MultiArticle));
add(new BasicNameValuePair("Version", Const.ContentVersion));
}
});
}
}
));
put(Const.MultiArticleV2, new ApiInfo(
new HashMap() {
{
put(Const.Method, "GET");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", Const.MultiArticleV2));
add(new BasicNameValuePair("Version", Const.ContentVersion));
}
});
}
}
));
}
};
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy