Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.byteplus.service.sms.SmsConfig Maven / Gradle / Ivy
package com.byteplus.service.sms;
import com.byteplus.helper.Const;
import com.byteplus.model.ApiInfo;
import com.byteplus.model.Credentials;
import com.byteplus.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 SmsConfig {
public static Map serviceInfoMap = 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, "sms.volcengineapi.com");
put(Const.Header, new ArrayList() {
{
add(new BasicHeader("Accept", "application/json"));
}
});
put(Const.Credentials, new Credentials(Const.REGION_CN_NORTH_1, "volcSMS"));
}
}
));
put(Const.REGION_AP_SINGAPORE_1, new ServiceInfo(
new HashMap() {
{
put(Const.CONNECTION_TIMEOUT, 5000);
put(Const.SOCKET_TIMEOUT, 5000);
put(Const.Scheme, "https");
put(Const.Host, "sms.byteplusapi.com");
put(Const.Header, new ArrayList() {
{
add(new BasicHeader("Accept", "application/json"));
}
});
put(Const.Credentials, new Credentials(Const.REGION_AP_SINGAPORE_1, "volcSMS"));
}
}
));
}
};
public static Map apiInfoList = new HashMap() {
{
put("SendSms", new ApiInfo(
new HashMap() {
{
put(Const.Method, "POST");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", "SendSms"));
add(new BasicNameValuePair("Version", "2020-01-01"));
}
});
}
}
));
put("SendBatchSms", new ApiInfo(
new HashMap() {
{
put(Const.Method, "POST");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", "SendBatchSms"));
add(new BasicNameValuePair("Version", "2021-01-01"));
}
});
}
}
));
put("SendSmsVerifyCode", new ApiInfo(
new HashMap() {
{
put(Const.Method, "POST");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", "SendSmsVerifyCode"));
add(new BasicNameValuePair("Version", "2020-01-01"));
}
});
}
}
));
put("CheckSmsVerifyCode", new ApiInfo(
new HashMap() {
{
put(Const.Method, "POST");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", "CheckSmsVerifyCode"));
add(new BasicNameValuePair("Version", "2020-01-01"));
}
});
}
}
));
put("Conversion", new ApiInfo(
new HashMap() {
{
put(Const.Method, "POST");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", "Conversion"));
add(new BasicNameValuePair("Version", "2020-01-01"));
}
});
}
}
));
put("GetSmsTemplateAndOrderList", new ApiInfo(
new HashMap() {
{
put(Const.Method, "GET");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", "GetSmsTemplateAndOrderList"));
add(new BasicNameValuePair("Version", "2021-01-11"));
}
});
}
}
));
put("ApplySmsTemplate", new ApiInfo(
new HashMap() {
{
put(Const.Method, "POST");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", "ApplySmsTemplate"));
add(new BasicNameValuePair("Version", "2021-01-11"));
}
});
}
}
));
put("DeleteSmsTemplate", new ApiInfo(
new HashMap() {
{
put(Const.Method, "POST");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", "DeleteSmsTemplate"));
add(new BasicNameValuePair("Version", "2021-01-11"));
}
});
}
}
));
put("GetSubAccountList", new ApiInfo(
new HashMap() {
{
put(Const.Method, "GET");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", "GetSubAccountList"));
add(new BasicNameValuePair("Version", "2021-01-11"));
}
});
}
}
));
put("GetSubAccountDetail", new ApiInfo(
new HashMap() {
{
put(Const.Method, "GET");
put(Const.Path, "/");
put(Const.Query, new ArrayList() {
{
add(new BasicNameValuePair("Action", "GetSubAccountDetail"));
add(new BasicNameValuePair("Version", "2021-01-11"));
}
});
}
}
));
}
};
}