diff --git a/src/net/irext/webapi/WebAPIs.java b/src/net/irext/webapi/WebAPIs.java index af2cd25..85c608a 100644 --- a/src/net/irext/webapi/WebAPIs.java +++ b/src/net/irext/webapi/WebAPIs.java @@ -29,9 +29,11 @@ public class WebAPIs { private static WebAPIs mInstance = null; - private static final String URL_PREFIX = "http://irext.net/irext"; + private static final String DEFAULT_ADDRESS = "http://irext.net:8080"; + private static final String DEFAULT_APP = "/irext"; + private static String URL_PREFIX = DEFAULT_ADDRESS + DEFAULT_APP; - private static final String SERVICE_SIGN_IN = "/certificate/admin_login"; + private static final String SERVICE_SIGN_IN = "/admin/sign_in"; private static final String SERVICE_LIST_CATEGORIES = "/int/list_categories"; private static final String SERVICE_LIST_BRANDS = "/int/list_brands"; private static final String SERVICE_LIST_PROVINCES = "/int/list_provinces"; @@ -45,18 +47,21 @@ public class WebAPIs { private OkHttpClient mHttpClient; - private WebAPIs() { + private WebAPIs(String address, String appName) { + if (null != address && null != appName) { + URL_PREFIX = address + appName; + } mHttpClient = new OkHttpClient(); } - private static void initializeInstance() { - mInstance = new WebAPIs(); + private static void initializeInstance(String address, String appName) { + mInstance = new WebAPIs(address, appName); } @SuppressWarnings("unused") - public static WebAPIs getInstance() { + public static WebAPIs getInstance(String address, String appName) { if (null == mInstance) { - initializeInstance(); + initializeInstance(address, appName); } return mInstance; } @@ -92,7 +97,7 @@ public class WebAPIs { public Admin signIn(String user_name, String password) { String signInURL = URL_PREFIX + SERVICE_SIGN_IN; LoginRequest loginRequest = new LoginRequest(); - loginRequest.setUser_name(user_name); + loginRequest.setUserName(user_name); loginRequest.setPassword(MD5Digest.MD5(password)); String bodyJson = loginRequest.toJson(); @@ -117,7 +122,7 @@ public class WebAPIs { public List listCategories(int from, int count) { String listCategoriesURL = URL_PREFIX + SERVICE_LIST_CATEGORIES; ListCategoriesRequest listCategoriesRequest = new ListCategoriesRequest(); - listCategoriesRequest.setAdmin_id(adminID); + listCategoriesRequest.setAdminId(adminID); listCategoriesRequest.setToken(token); listCategoriesRequest.setFrom(from); listCategoriesRequest.setCount(count); @@ -140,9 +145,9 @@ public class WebAPIs { public List listBrands(int categoryID, int from, int count) { String listBrandsURL = URL_PREFIX + SERVICE_LIST_BRANDS; ListBrandsRequest listBrandsRequest = new ListBrandsRequest(); - listBrandsRequest.setAdmin_id(adminID); + listBrandsRequest.setAdminId(adminID); listBrandsRequest.setToken(token); - listBrandsRequest.setCategory_id(categoryID); + listBrandsRequest.setCategoryId(categoryID); listBrandsRequest.setFrom(from); listBrandsRequest.setCount(count); String bodyJson = listBrandsRequest.toJson(); @@ -164,7 +169,7 @@ public class WebAPIs { public List listProvinces() { String listProvincesURL = URL_PREFIX + SERVICE_LIST_PROVINCES; ListCitiesRequest listCitiesRequest = new ListCitiesRequest(); - listCitiesRequest.setAdmin_id(adminID); + listCitiesRequest.setAdminId(adminID); listCitiesRequest.setToken(token); String bodyJson = listCitiesRequest.toJson(); @@ -175,9 +180,9 @@ public class WebAPIs { public List listCities(String prefix) { String listCitiesURL = URL_PREFIX + SERVICE_LIST_CITIES; ListCitiesRequest listCitiesRequest = new ListCitiesRequest(); - listCitiesRequest.setAdmin_id(adminID); + listCitiesRequest.setAdminId(adminID); listCitiesRequest.setToken(token); - listCitiesRequest.setProvince_prefix(prefix); + listCitiesRequest.setProvincePrefix(prefix); String bodyJson = listCitiesRequest.toJson(); return listCitiesCommon(listCitiesURL, bodyJson); @@ -201,9 +206,9 @@ public class WebAPIs { public List listOperators(String cityCode) { String listOperatorsURL = URL_PREFIX + SERVICE_LIST_OPERATORS; ListOperatorsRequest listOperatorsRequest = new ListOperatorsRequest(); - listOperatorsRequest.setAdmin_id(adminID); + listOperatorsRequest.setAdminId(adminID); listOperatorsRequest.setToken(token); - listOperatorsRequest.setCity_code(cityCode); + listOperatorsRequest.setCityCode(cityCode); listOperatorsRequest.setFrom(0); listOperatorsRequest.setCount(20); String bodyJson = listOperatorsRequest.toJson(); @@ -225,12 +230,12 @@ public class WebAPIs { public List listRemoteIndexes(int categoryID, int brandID, String cityCode, String operatorID) { String listIndexesURL = URL_PREFIX + SERVICE_LIST_INDEXES; ListIndexesRequest listIndexesRequest = new ListIndexesRequest(); - listIndexesRequest.setAdmin_id(adminID); + listIndexesRequest.setAdminId(adminID); listIndexesRequest.setToken(token); - listIndexesRequest.setCategory_id(categoryID); - listIndexesRequest.setBrand_id(brandID); - listIndexesRequest.setCity_code(cityCode); - listIndexesRequest.setOperator_id(operatorID); + listIndexesRequest.setCategoryId(categoryID); + listIndexesRequest.setBrandId(brandID); + listIndexesRequest.setCityCode(cityCode); + listIndexesRequest.setOperatorId(operatorID); listIndexesRequest.setFrom(0); listIndexesRequest.setCount(20); String bodyJson = listIndexesRequest.toJson(); @@ -253,9 +258,9 @@ public class WebAPIs { public InputStream downloadBin(String remoteMap, int indexID) { String downloadURL = URL_PREFIX + SERVICE_DOWNLOAD_BIN; DownloadBinaryRequest downloadBinaryRequest = new DownloadBinaryRequest(); - downloadBinaryRequest.setAdmin_id(adminID); + downloadBinaryRequest.setAdminId(adminID); downloadBinaryRequest.setToken(token); - downloadBinaryRequest.setIndex_id(indexID); + downloadBinaryRequest.setIndexId(indexID); String bodyJson = downloadBinaryRequest.toJson(); diff --git a/src/net/irext/webapi/model/Admin.java b/src/net/irext/webapi/model/Admin.java index ce70b04..7dc5d5a 100644 --- a/src/net/irext/webapi/model/Admin.java +++ b/src/net/irext/webapi/model/Admin.java @@ -13,11 +13,11 @@ package net.irext.webapi.model; public class Admin { private int id; - private String user_name; + private String userName; private String password; private String token; private String permissions; - private int admin_type; + private int adminType; public Admin() { @@ -31,12 +31,12 @@ public class Admin { this.id = id; } - public String getUser_name() { - return user_name; + public String getUserName() { + return userName; } - public void setUser_name(String user_name) { - this.user_name = user_name; + public void setUserName(String userName) { + this.userName = userName; } public String getPassword() { @@ -63,11 +63,11 @@ public class Admin { this.permissions = permissions; } - public int getAdmin_type() { - return admin_type; + public int getAdminType() { + return adminType; } - public void setAdmin_type(int admin_type) { - this.admin_type = admin_type; + public void setAdminType(int adminType) { + this.adminType = adminType; } } diff --git a/src/net/irext/webapi/model/Brand.java b/src/net/irext/webapi/model/Brand.java index 6a893d9..d7fa2be 100644 --- a/src/net/irext/webapi/model/Brand.java +++ b/src/net/irext/webapi/model/Brand.java @@ -14,27 +14,27 @@ public class Brand { private int id; private String name; - private int category_id; - private String category_name; + private int categoryId; + private String categoryName; private int status; - private String update_time; + private String updateTime; private int priority; - private String name_en; - private String name_tw; + private String nameEn; + private String nameTw; private String contributor; - public Brand(int id, String name, int category_id, String category_name, int status, - String update_time, int priority, - String name_en, String name_tw, String contributor) { + public Brand(int id, String name, int categoryId, String categoryName, int status, + String updateTime, int priority, + String nameEn, String nameTw, String contributor) { this.id = id; this.name = name; - this.category_id = category_id; - this.category_name = category_name; + this.categoryId = categoryId; + this.categoryName = categoryName; this.status = status; - this.update_time = update_time; + this.updateTime = updateTime; this.priority = priority; - this.name_en = name_en; - this.name_tw = name_tw; + this.nameEn = nameEn; + this.nameTw = nameTw; this.contributor = contributor; } @@ -58,20 +58,20 @@ public class Brand { this.name = name; } - public int getCategory_id() { - return category_id; + public int getCategoryId() { + return categoryId; } - public void setCategory_id(int category_id) { - this.category_id = category_id; + public void setCategoryId(int categoryId) { + this.categoryId = categoryId; } - public String getCategory_name() { - return category_name; + public String getCategoryName() { + return categoryName; } - public void setCategory_name(String category_name) { - this.category_name = category_name; + public void setCategoryName(String categoryName) { + this.categoryName = categoryName; } public int getStatus() { @@ -82,12 +82,12 @@ public class Brand { this.status = status; } - public String getUpdate_time() { - return update_time; + public String getUpdateTime() { + return updateTime; } - public void setUpdate_time(String update_time) { - this.update_time = update_time; + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; } public int getPriority() { @@ -98,20 +98,20 @@ public class Brand { this.priority = priority; } - public String getName_en() { - return name_en; + public String getNameEn() { + return nameEn; } - public void setName_en(String name_en) { - this.name_en = name_en; + public void setNameEn(String nameEn) { + this.nameEn = nameEn; } - public String getName_tw() { - return name_tw; + public String getNameTw() { + return nameTw; } - public void setName_tw(String name_tw) { - this.name_tw = name_tw; + public void setNameTw(String nameTw) { + this.nameTw = nameTw; } public String getContributor() { diff --git a/src/net/irext/webapi/model/Category.java b/src/net/irext/webapi/model/Category.java index 035ffb9..9e36e8a 100644 --- a/src/net/irext/webapi/model/Category.java +++ b/src/net/irext/webapi/model/Category.java @@ -15,19 +15,19 @@ public class Category { private int id; private String name; private int status; - private String update_time; - private String name_en; - private String name_tw; + private String updateTime; + private String nameEn; + private String nameTw; private String contributor; - public Category(int id, String name, int status, String update_time, - String name_en, String name_tw, String contributor) { + public Category(int id, String name, int status, String updateTime, + String nameEn, String nameTw, String contributor) { this.id = id; this.name = name; this.status = status; - this.update_time = update_time; - this.name_en = name_en; - this.name_tw = name_tw; + this.updateTime = updateTime; + this.nameEn = nameEn; + this.nameTw = nameTw; this.contributor = contributor; } @@ -59,28 +59,28 @@ public class Category { this.status = status; } - public String getUpdate_time() { - return update_time; + public String getUpdateTime() { + return updateTime; } - public void setUpdate_time(String update_time) { - this.update_time = update_time; + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; } - public String getName_en() { - return name_en; + public String getNameEn() { + return nameEn; } - public void setName_en(String name_en) { - this.name_en = name_en; + public void setNameEn(String nameEn) { + this.nameEn = nameEn; } - public String getName_tw() { - return name_tw; + public String getNameTw() { + return nameTw; } - public void setName_tw(String name_tw) { - this.name_tw = name_tw; + public void setNameTw(String nameTw) { + this.nameTw = nameTw; } public String getContributor() { diff --git a/src/net/irext/webapi/model/City.java b/src/net/irext/webapi/model/City.java index b42a11a..6105c34 100644 --- a/src/net/irext/webapi/model/City.java +++ b/src/net/irext/webapi/model/City.java @@ -18,17 +18,17 @@ public class City { private double longitude; private double latitude; private int status; - private String name_tw; + private String nameTw; public City(int id, String code, String name, double longitude, double latitude, - int status, String name_tw) { + int status, String nameTw) { this.id = id; this.code = code; this.name = name; this.longitude = longitude; this.latitude = latitude; this.status = status; - this.name_tw = name_tw; + this.nameTw = nameTw; } public City() { @@ -83,11 +83,11 @@ public class City { this.status = status; } - public String getName_tw() { - return name_tw; + public String getNameTw() { + return nameTw; } - public void setName_tw(String name_tw) { - this.name_tw = name_tw; + public void setNameTw(String nameTw) { + this.nameTw = nameTw; } } diff --git a/src/net/irext/webapi/model/RemoteIndex.java b/src/net/irext/webapi/model/RemoteIndex.java index 6242d3f..57e7314 100644 --- a/src/net/irext/webapi/model/RemoteIndex.java +++ b/src/net/irext/webapi/model/RemoteIndex.java @@ -13,60 +13,60 @@ package net.irext.webapi.model; public class RemoteIndex { private int id; - private int category_id; - private String category_name; - private int brand_id; - private String brand_name; - private String city_code; - private String city_name; - private String operator_id; - private String operator_name; + private int categoryId; + private String categoryName; + private int brandId; + private String brandName; + private String cityCode; + private String cityName; + private String operatorId; + private String operatorName; private String protocol; private String remote; - private String remote_map; + private String remoteMap; private int status; - private int sub_cate; + private int subCate; private int priority; - private String remote_number; - private String category_name_tw; - private String brand_name_tw; - private String city_name_tw; - private String operator_name_tw; - private String binary_md5; + private String remoteNumber; + private String categoryNameTw; + private String brandNameTw; + private String cityNameTw; + private String operatorNameTw; + private String binaryMd5; private String contributor; - private String update_time; + private String updateTime; public RemoteIndex(int id, - int category_id, String category_name, int brand_id, String brand_name, - String city_code, String city_name, String operator_id, String operator_name, - String protocol, String remote, String remote_map, int status, int sub_cate, - int priority, String remote_number, - String category_name_tw, String brand_name_tw, - String city_name_tw, String operator_name_tw, - String binary_md5, String contributor, String update_time) { + int categoryId, String categoryName, int brandId, String brandName, + String cityCode, String cityName, String operatorId, String operatorName, + String protocol, String remote, String remoteMap, int status, int subCate, + int priority, String remoteNumber, + String categoryNameTw, String brandNameTw, + String cityNameTw, String operatorNameTw, + String binaryMd5, String contributor, String updateTime) { this.id = id; - this.category_id = category_id; - this.category_name = category_name; - this.brand_id = brand_id; - this.brand_name = brand_name; - this.city_code = city_code; - this.city_name = city_name; - this.operator_id = operator_id; - this.operator_name = operator_name; + this.categoryId = categoryId; + this.categoryName = categoryName; + this.brandId = brandId; + this.brandName = brandName; + this.cityCode = cityCode; + this.cityName = cityName; + this.operatorId = operatorId; + this.operatorName = operatorName; this.protocol = protocol; this.remote = remote; - this.remote_map = remote_map; + this.remoteMap = remoteMap; this.status = status; - this.sub_cate = sub_cate; + this.subCate = subCate; this.priority = priority; - this.remote_number = remote_number; - this.category_name_tw = category_name_tw; - this.brand_name_tw = brand_name_tw; - this.city_name_tw = city_name_tw; - this.operator_name_tw = operator_name_tw; - this.binary_md5 = binary_md5; + this.remoteNumber = remoteNumber; + this.categoryNameTw = categoryNameTw; + this.brandNameTw = brandNameTw; + this.cityNameTw = cityNameTw; + this.operatorNameTw = operatorNameTw; + this.binaryMd5 = binaryMd5; this.contributor = contributor; - this.update_time = update_time; + this.updateTime = updateTime; } public RemoteIndex() { @@ -81,68 +81,68 @@ public class RemoteIndex { this.id = id; } - public int getCategory_id() { - return category_id; + public int getCategoryId() { + return categoryId; } - public void setCategory_id(int category_id) { - this.category_id = category_id; + public void setCategoryId(int categoryId) { + this.categoryId = categoryId; } - public String getCategory_name() { - return category_name; + public String getCategoryName() { + return categoryName; } - public void setCategory_name(String category_name) { - this.category_name = category_name; + public void setCategoryName(String categoryName) { + this.categoryName = categoryName; } - public int getBrand_id() { - return brand_id; + public int getBrandId() { + return brandId; } - public void setBrand_id(int brand_id) { - this.brand_id = brand_id; + public void setBrandId(int brandId) { + this.brandId = brandId; } - public String getBrand_name() { - return brand_name; + public String getBrandName() { + return brandName; } - public void setBrand_name(String brand_name) { - this.brand_name = brand_name; + public void setBrandName(String brandName) { + this.brandName = brandName; } - public String getCity_code() { - return city_code; + public String getCityCode() { + return cityCode; } - public void setCity_code(String city_code) { - this.city_code = city_code; + public void setCityCode(String cityCode) { + this.cityCode = cityCode; } - public String getCity_name() { - return city_name; + public String getCityName() { + return cityName; } - public void setCity_name(String city_name) { - this.city_name = city_name; + public void setCityName(String cityName) { + this.cityName = cityName; } - public String getOperator_id() { - return operator_id; + public String getOperatorId() { + return operatorId; } - public void setOperator_id(String operator_id) { - this.operator_id = operator_id; + public void setOperatorId(String operatorId) { + this.operatorId = operatorId; } - public String getOperator_name() { - return operator_name; + public String getOperatorName() { + return operatorName; } - public void setOperator_name(String operator_name) { - this.operator_name = operator_name; + public void setOperatorName(String operatorName) { + this.operatorName = operatorName; } public String getProtocol() { @@ -161,12 +161,12 @@ public class RemoteIndex { this.remote = remote; } - public String getRemote_map() { - return remote_map; + public String getRemoteMap() { + return remoteMap; } - public void setRemote_map(String remote_map) { - this.remote_map = remote_map; + public void setRemoteMap(String remoteMap) { + this.remoteMap = remoteMap; } public int getStatus() { @@ -177,12 +177,12 @@ public class RemoteIndex { this.status = status; } - public int getSub_cate() { - return sub_cate; + public int getSubCate() { + return subCate; } - public void setSub_cate(int sub_cate) { - this.sub_cate = sub_cate; + public void setSubCate(int subCate) { + this.subCate = subCate; } public int getPriority() { @@ -193,52 +193,52 @@ public class RemoteIndex { this.priority = priority; } - public String getRemote_number() { - return remote_number; + public String getRemoteNumber() { + return remoteNumber; } - public void setRemote_number(String remote_number) { - this.remote_number = remote_number; + public void setRemoteNumber(String remoteNumber) { + this.remoteNumber = remoteNumber; } - public String getCategory_name_tw() { - return category_name_tw; + public String getCategoryNameTw() { + return categoryNameTw; } - public void setCategory_name_tw(String category_name_tw) { - this.category_name_tw = category_name_tw; + public void setCategoryNameTw(String categoryNameTw) { + this.categoryNameTw = categoryNameTw; } - public String getBrand_name_tw() { - return brand_name_tw; + public String getBrandNameTw() { + return brandNameTw; } - public void setBrand_name_tw(String brand_name_tw) { - this.brand_name_tw = brand_name_tw; + public void setBrandNameTw(String brandNameTw) { + this.brandNameTw = brandNameTw; } - public String getCity_name_tw() { - return city_name_tw; + public String getCityNameTw() { + return cityNameTw; } - public void setCity_name_tw(String city_name_tw) { - this.city_name_tw = city_name_tw; + public void setCityNameTw(String cityNameTw) { + this.cityNameTw = cityNameTw; } - public String getOperator_name_tw() { - return operator_name_tw; + public String getOperatorNameTw() { + return operatorNameTw; } - public void setOperator_name_tw(String operator_name_tw) { - this.operator_name_tw = operator_name_tw; + public void setOperatorNameTw(String operatorNameTw) { + this.operatorNameTw = operatorNameTw; } - public String getBinary_md5() { - return binary_md5; + public String getBinaryMd5() { + return binaryMd5; } - public void setBinary_md5(String binary_md5) { - this.binary_md5 = binary_md5; + public void setBinaryMd5(String binaryMd5) { + this.binaryMd5 = binaryMd5; } public String getContributor() { @@ -249,11 +249,11 @@ public class RemoteIndex { this.contributor = contributor; } - public String getUpdate_time() { - return update_time; + public String getUpdateTime() { + return updateTime; } - public void setUpdate_time(String update_time) { - this.update_time = update_time; + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; } } diff --git a/src/net/irext/webapi/request/BaseRequest.java b/src/net/irext/webapi/request/BaseRequest.java index 642e53c..93777aa 100644 --- a/src/net/irext/webapi/request/BaseRequest.java +++ b/src/net/irext/webapi/request/BaseRequest.java @@ -14,24 +14,24 @@ import com.google.gson.Gson; */ public class BaseRequest { - private int admin_id; + private int adminId; private String token; - public BaseRequest(int adminID, String token) { - this.admin_id = adminID; + public BaseRequest(int adminId, String token) { + this.adminId = adminId; this.token = token; } - public BaseRequest() { + BaseRequest() { } - public int getAdmin_id() { - return admin_id; + public int getAdminId() { + return adminId; } - public void setAdmin_id(int admin_id) { - this.admin_id = admin_id; + public void setAdminId(int adminId) { + this.adminId = adminId; } public String getToken() { diff --git a/src/net/irext/webapi/request/DownloadBinaryRequest.java b/src/net/irext/webapi/request/DownloadBinaryRequest.java index 9cb09e6..ee995b4 100644 --- a/src/net/irext/webapi/request/DownloadBinaryRequest.java +++ b/src/net/irext/webapi/request/DownloadBinaryRequest.java @@ -12,21 +12,21 @@ package net.irext.webapi.request; */ public class DownloadBinaryRequest extends BaseRequest { - private int index_id; + private int indexId; - public DownloadBinaryRequest(int index_id) { - this.index_id = index_id; + public DownloadBinaryRequest(int indexId) { + this.indexId = indexId; } public DownloadBinaryRequest() { } - public int getIndex_id() { - return index_id; + public int getIndexId() { + return indexId; } - public void setIndex_id(int index_id) { - this.index_id = index_id; + public void setIndexId(int indexId) { + this.indexId = indexId; } } diff --git a/src/net/irext/webapi/request/ListBrandsRequest.java b/src/net/irext/webapi/request/ListBrandsRequest.java index 79a75f6..6dcd236 100644 --- a/src/net/irext/webapi/request/ListBrandsRequest.java +++ b/src/net/irext/webapi/request/ListBrandsRequest.java @@ -12,12 +12,12 @@ package net.irext.webapi.request; */ public class ListBrandsRequest extends BaseRequest { - private int category_id; + private int categoryId; private int from; private int count; - public ListBrandsRequest(int category_id, int from, int count) { - this.category_id = category_id; + public ListBrandsRequest(int categoryId, int from, int count) { + this.categoryId = categoryId; this.from = from; this.count = count; } @@ -26,12 +26,12 @@ public class ListBrandsRequest extends BaseRequest { } - public int getCategory_id() { - return category_id; + public int getCategoryId() { + return categoryId; } - public void setCategory_id(int category_id) { - this.category_id = category_id; + public void setCategoryId(int categoryId) { + this.categoryId = categoryId; } public int getFrom() { diff --git a/src/net/irext/webapi/request/ListCitiesRequest.java b/src/net/irext/webapi/request/ListCitiesRequest.java index a3b8714..6bd0cd9 100644 --- a/src/net/irext/webapi/request/ListCitiesRequest.java +++ b/src/net/irext/webapi/request/ListCitiesRequest.java @@ -12,21 +12,21 @@ package net.irext.webapi.request; */ public class ListCitiesRequest extends BaseRequest { - private String province_prefix; + private String provincePrefix; - public ListCitiesRequest(String province_prefix) { - this.province_prefix = province_prefix; + public ListCitiesRequest(String provincePrefix) { + this.provincePrefix = provincePrefix; } public ListCitiesRequest() { } - public String getProvince_prefix() { - return province_prefix; + public String getProvincePrefix() { + return provincePrefix; } - public void setProvince_prefix(String province_prefix) { - this.province_prefix = province_prefix; + public void setProvincePrefix(String provincePrefix) { + this.provincePrefix = provincePrefix; } } diff --git a/src/net/irext/webapi/request/ListIndexesRequest.java b/src/net/irext/webapi/request/ListIndexesRequest.java index 74229de..8ece383 100644 --- a/src/net/irext/webapi/request/ListIndexesRequest.java +++ b/src/net/irext/webapi/request/ListIndexesRequest.java @@ -14,19 +14,19 @@ public class ListIndexesRequest extends BaseRequest { private int from; private int count; - private int category_id; - private int brand_id; - private String city_code; - private String operator_id; + private int categoryId; + private int brandId; + private String cityCode; + private String operatorId; - public ListIndexesRequest(int from, int count, int category_id, int brand_id, - String city_code, String operator_id) { + public ListIndexesRequest(int from, int count, int categoryId, int brandId, + String cityCode, String operatorId) { this.from = from; this.count = count; - this.category_id = category_id; - this.brand_id = brand_id; - this.city_code = city_code; - this.operator_id = operator_id; + this.categoryId = categoryId; + this.brandId = brandId; + this.cityCode = cityCode; + this.operatorId = operatorId; } public ListIndexesRequest() { @@ -49,35 +49,35 @@ public class ListIndexesRequest extends BaseRequest { this.count = count; } - public int getCategory_id() { - return category_id; + public int getCategoryId() { + return categoryId; } - public void setCategory_id(int category_id) { - this.category_id = category_id; + public void setCategoryId(int categoryId) { + this.categoryId = categoryId; } - public int getBrand_id() { - return brand_id; + public int getBrandId() { + return brandId; } - public void setBrand_id(int brand_id) { - this.brand_id = brand_id; + public void setBrandId(int brandId) { + this.brandId = brandId; } - public String getCity_code() { - return city_code; + public String getCityCode() { + return cityCode; } - public void setCity_code(String city_code) { - this.city_code = city_code; + public void setCityCode(String cityCode) { + this.cityCode = cityCode; } - public String getOperator_id() { - return operator_id; + public String getOperatorId() { + return operatorId; } - public void setOperator_id(String operator_id) { - this.operator_id = operator_id; + public void setOperatorId(String operatorId) { + this.operatorId = operatorId; } } diff --git a/src/net/irext/webapi/request/ListOperatorsRequest.java b/src/net/irext/webapi/request/ListOperatorsRequest.java index 121b2ab..264be93 100644 --- a/src/net/irext/webapi/request/ListOperatorsRequest.java +++ b/src/net/irext/webapi/request/ListOperatorsRequest.java @@ -14,12 +14,12 @@ public class ListOperatorsRequest extends BaseRequest { private int from; private int count; - private String city_code; + private String cityCode; - public ListOperatorsRequest(int from, int count, String city_code) { + public ListOperatorsRequest(int from, int count, String cityCode) { this.from = from; this.count = count; - this.city_code = city_code; + this.cityCode = cityCode; } public ListOperatorsRequest() { @@ -42,11 +42,11 @@ public class ListOperatorsRequest extends BaseRequest { this.count = count; } - public String getCity_code() { - return city_code; + public String getCityCode() { + return cityCode; } - public void setCity_code(String city_code) { - this.city_code = city_code; + public void setCityCode(String cityCode) { + this.cityCode = cityCode; } } diff --git a/src/net/irext/webapi/request/LoginRequest.java b/src/net/irext/webapi/request/LoginRequest.java index aa29425..740c1b0 100644 --- a/src/net/irext/webapi/request/LoginRequest.java +++ b/src/net/irext/webapi/request/LoginRequest.java @@ -12,11 +12,11 @@ package net.irext.webapi.request; */ public class LoginRequest extends BaseRequest { - private String user_name; + private String userName; private String password; - public LoginRequest(String user_name, String password) { - this.user_name = user_name; + public LoginRequest(String userName, String password) { + this.userName = userName; this.password = password; } @@ -24,12 +24,12 @@ public class LoginRequest extends BaseRequest { } - public String getUser_name() { - return user_name; + public String getUserName() { + return userName; } - public void setUser_name(String user_name) { - this.user_name = user_name; + public void setUserName(String userName) { + this.userName = userName; } public String getPassword() {