|
@@ -49,7 +49,6 @@ public class BytedanceMediaClient {
|
|
|
|
|
|
|
|
public JsonNode ccAdvertiserList(String accessToken, long ccAccountId, int page) {
|
|
public JsonNode ccAdvertiserList(String accessToken, long ccAccountId, int page) {
|
|
|
String url = UriComponentsBuilder.fromUriString(CC_ADVERTISER_LIST_URL)
|
|
String url = UriComponentsBuilder.fromUriString(CC_ADVERTISER_LIST_URL)
|
|
|
- .queryParam("access_token", accessToken)
|
|
|
|
|
.queryParam("cc_account_id", ccAccountId)
|
|
.queryParam("cc_account_id", ccAccountId)
|
|
|
.queryParam("page", page)
|
|
.queryParam("page", page)
|
|
|
.queryParam("page_size", 100)
|
|
.queryParam("page_size", 100)
|
|
@@ -57,7 +56,10 @@ public class BytedanceMediaClient {
|
|
|
.build()
|
|
.build()
|
|
|
.encode()
|
|
.encode()
|
|
|
.toUriString();
|
|
.toUriString();
|
|
|
- return parse(restTemplate.getForObject(url, String.class));
|
|
|
|
|
|
|
+ HttpHeaders headers = new HttpHeaders();
|
|
|
|
|
+ headers.set("Access-Token", accessToken);
|
|
|
|
|
+ ResponseEntity<String> response = restTemplate.exchange(url, HttpMethod.GET, new HttpEntity<>(headers), String.class);
|
|
|
|
|
+ return parse(response.getBody());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public JsonNode userInfo(String accessToken) {
|
|
public JsonNode userInfo(String accessToken) {
|