获取余额
优质
小牛编辑
123浏览
2023-12-01
用户通过接口自助查询账户余额
获取余额API调用示例代码
github地址: https://github.com/picup-shop
- Java
- Python
- c-Url
@Autowired private RestTemplate restTemplate; HttpHeaders headers = new HttpHeaders(); headers.add("APIKEY","INSERT_YOUR_API_KEY_HERE"); HttpEntity request = new HttpEntity(headers); RequestCallback requestCallback = restTemplate.httpEntityCallback(request, Resource.class); ResponseExtractor<ResponseEntity<JSONObject>> responseExtractor = restTemplate.responseEntityExtractor(JSONObject.class); String apiUrl = "https://picupapi.tukeli.net/api/v1/mySubscription"; ResponseEntity<JSONObject> response = restTemplate.execute(apiUrl, HttpMethod.GET, requestCallback, responseExtractor); System.out.println(response.getBody().toJSONString());
@Autowired private RestTemplate restTemplate; HttpHeaders headers = new HttpHeaders(); headers.add("APIKEY","INSERT_YOUR_API_KEY_HERE"); HttpEntity request = new HttpEntity(headers); RequestCallback requestCallback = restTemplate.httpEntityCallback(request, Resource.class); ResponseExtractor<ResponseEntity<JSONObject>> responseExtractor = restTemplate.responseEntityExtractor(JSONObject.class); String apiUrl = "https://picupapi.tukeli.net/api/v1/mySubscription"; ResponseEntity<JSONObject> response = restTemplate.execute(apiUrl, HttpMethod.GET, requestCallback, responseExtractor); System.out.println(response.getBody().toJSONString());
@Autowired private RestTemplate restTemplate; HttpHeaders headers = new HttpHeaders(); headers.add("APIKEY","INSERT_YOUR_API_KEY_HERE"); HttpEntity request = new HttpEntity(headers); RequestCallback requestCallback = restTemplate.httpEntityCallback(request, Resource.class); ResponseExtractor<ResponseEntity<JSONObject>> responseExtractor = restTemplate.responseEntityExtractor(JSONObject.class); String apiUrl = "https://picupapi.tukeli.net/api/v1/mySubscription"; ResponseEntity<JSONObject> response = restTemplate.execute(apiUrl, HttpMethod.GET, requestCallback, responseExtractor); System.out.println(response.getBody().toJSONString());
API文档说明
请求说明
- 请求URl: https://picupapi.tukeli.net/api/v1/mySubscription
- 请求方式: GET
- 返回类型: application/json
- 输入参数:
(1) 请求参数(Header)
参数 参数说明 值 Content-Type string application/json;charset=UTF-8 APIKEY string 您的专属API Key
返回说明
- 返回参数 返回json格式数据
{ "code": 0, "data": { //包月剩余量 "monthBalance": 0, //抠图剩余量 "imageBalance": 0, //视频抠图剩余量 "videoBalance": 0, //包月开始时间 "monthStartDate": "2020-01-01 00:00:00", //包月结束时间 "monthExpireDate": "2021-01-01 00:00:00" }, "msg": null, "time": 1618482003879 }