Skip to content

Commit 5175852

Browse files
authored
Delete unused code (#1229)
`parseHTTPResponse` is not used
1 parent 547bf17 commit 5175852

File tree

11 files changed

+0
-142
lines changed

11 files changed

+0
-142
lines changed

generator/src/main/resources/line-bot-sdk-nodejs-generator/api-single.pebble

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,6 @@ export class {{operations.classname}} {
4141
});
4242
}
4343

44-
private async parseHTTPResponse(response: Response) {
45-
const { LINE_REQUEST_ID_HTTP_HEADER_NAME } = Types;
46-
let resBody: Record<string, any> = {
47-
...await response.json(),
48-
};
49-
if (response.headers.get(LINE_REQUEST_ID_HTTP_HEADER_NAME)) {
50-
resBody[LINE_REQUEST_ID_HTTP_HEADER_NAME] =
51-
response.headers.get(LINE_REQUEST_ID_HTTP_HEADER_NAME);
52-
}
53-
return resBody;
54-
}
55-
5644
{% for op in operations.operation -%}
5745
/**
5846
* {{op.notes}}

lib/channel-access-token/api/channelAccessTokenClient.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,6 @@ export class ChannelAccessTokenClient {
4646
});
4747
}
4848

49-
private async parseHTTPResponse(response: Response) {
50-
const { LINE_REQUEST_ID_HTTP_HEADER_NAME } = Types;
51-
let resBody: Record<string, any> = {
52-
...(await response.json()),
53-
};
54-
if (response.headers.get(LINE_REQUEST_ID_HTTP_HEADER_NAME)) {
55-
resBody[LINE_REQUEST_ID_HTTP_HEADER_NAME] = response.headers.get(
56-
LINE_REQUEST_ID_HTTP_HEADER_NAME,
57-
);
58-
}
59-
return resBody;
60-
}
61-
6249
/**
6350
* Gets all valid channel access token key IDs.
6451
* @param clientAssertionType `urn:ietf:params:oauth:client-assertion-type:jwt-bearer`

lib/insight/api/insightClient.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,6 @@ export class InsightClient {
4848
});
4949
}
5050

51-
private async parseHTTPResponse(response: Response) {
52-
const { LINE_REQUEST_ID_HTTP_HEADER_NAME } = Types;
53-
let resBody: Record<string, any> = {
54-
...(await response.json()),
55-
};
56-
if (response.headers.get(LINE_REQUEST_ID_HTTP_HEADER_NAME)) {
57-
resBody[LINE_REQUEST_ID_HTTP_HEADER_NAME] = response.headers.get(
58-
LINE_REQUEST_ID_HTTP_HEADER_NAME,
59-
);
60-
}
61-
return resBody;
62-
}
63-
6451
/**
6552
* Retrieves the demographic attributes for a LINE Official Account\'s friends.You can only retrieve information about friends for LINE Official Accounts created by users in Japan (JP), Thailand (TH), Taiwan (TW) and Indonesia (ID).
6653
*

lib/liff/api/liffClient.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,6 @@ export class LiffClient {
4747
});
4848
}
4949

50-
private async parseHTTPResponse(response: Response) {
51-
const { LINE_REQUEST_ID_HTTP_HEADER_NAME } = Types;
52-
let resBody: Record<string, any> = {
53-
...(await response.json()),
54-
};
55-
if (response.headers.get(LINE_REQUEST_ID_HTTP_HEADER_NAME)) {
56-
resBody[LINE_REQUEST_ID_HTTP_HEADER_NAME] = response.headers.get(
57-
LINE_REQUEST_ID_HTTP_HEADER_NAME,
58-
);
59-
}
60-
return resBody;
61-
}
62-
6350
/**
6451
* Adding the LIFF app to a channel
6552
* @summary Create LIFF app

lib/manage-audience/api/manageAudienceBlobClient.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,6 @@ export class ManageAudienceBlobClient {
4444
});
4545
}
4646

47-
private async parseHTTPResponse(response: Response) {
48-
const { LINE_REQUEST_ID_HTTP_HEADER_NAME } = Types;
49-
let resBody: Record<string, any> = {
50-
...(await response.json()),
51-
};
52-
if (response.headers.get(LINE_REQUEST_ID_HTTP_HEADER_NAME)) {
53-
resBody[LINE_REQUEST_ID_HTTP_HEADER_NAME] = response.headers.get(
54-
LINE_REQUEST_ID_HTTP_HEADER_NAME,
55-
);
56-
}
57-
return resBody;
58-
}
59-
6047
/**
6148
* Add user IDs or Identifiers for Advertisers (IFAs) to an audience for uploading user IDs (by file).
6249
* @param file A text file with one user ID or IFA entered per line. Specify text/plain as Content-Type. Max file number: 1 Max number: 1,500,000

lib/manage-audience/api/manageAudienceClient.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,6 @@ export class ManageAudienceClient {
6060
});
6161
}
6262

63-
private async parseHTTPResponse(response: Response) {
64-
const { LINE_REQUEST_ID_HTTP_HEADER_NAME } = Types;
65-
let resBody: Record<string, any> = {
66-
...(await response.json()),
67-
};
68-
if (response.headers.get(LINE_REQUEST_ID_HTTP_HEADER_NAME)) {
69-
resBody[LINE_REQUEST_ID_HTTP_HEADER_NAME] = response.headers.get(
70-
LINE_REQUEST_ID_HTTP_HEADER_NAME,
71-
);
72-
}
73-
return resBody;
74-
}
75-
7663
/**
7764
* Activate audience
7865
* @param audienceGroupId The audience ID.

lib/messaging-api/api/messagingApiBlobClient.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,6 @@ export class MessagingApiBlobClient {
4444
});
4545
}
4646

47-
private async parseHTTPResponse(response: Response) {
48-
const { LINE_REQUEST_ID_HTTP_HEADER_NAME } = Types;
49-
let resBody: Record<string, any> = {
50-
...(await response.json()),
51-
};
52-
if (response.headers.get(LINE_REQUEST_ID_HTTP_HEADER_NAME)) {
53-
resBody[LINE_REQUEST_ID_HTTP_HEADER_NAME] = response.headers.get(
54-
LINE_REQUEST_ID_HTTP_HEADER_NAME,
55-
);
56-
}
57-
return resBody;
58-
}
59-
6047
/**
6148
* Download image, video, and audio data sent from users.
6249
* @param messageId Message ID of video or audio

lib/messaging-api/api/messagingApiClient.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,6 @@ export class MessagingApiClient {
9090
});
9191
}
9292

93-
private async parseHTTPResponse(response: Response) {
94-
const { LINE_REQUEST_ID_HTTP_HEADER_NAME } = Types;
95-
let resBody: Record<string, any> = {
96-
...(await response.json()),
97-
};
98-
if (response.headers.get(LINE_REQUEST_ID_HTTP_HEADER_NAME)) {
99-
resBody[LINE_REQUEST_ID_HTTP_HEADER_NAME] = response.headers.get(
100-
LINE_REQUEST_ID_HTTP_HEADER_NAME,
101-
);
102-
}
103-
return resBody;
104-
}
105-
10693
/**
10794
* Sends a message to multiple users at any time.
10895
* @param broadcastRequest

lib/module-attach/api/lineModuleAttachClient.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,6 @@ export class LineModuleAttachClient {
4444
});
4545
}
4646

47-
private async parseHTTPResponse(response: Response) {
48-
const { LINE_REQUEST_ID_HTTP_HEADER_NAME } = Types;
49-
let resBody: Record<string, any> = {
50-
...(await response.json()),
51-
};
52-
if (response.headers.get(LINE_REQUEST_ID_HTTP_HEADER_NAME)) {
53-
resBody[LINE_REQUEST_ID_HTTP_HEADER_NAME] = response.headers.get(
54-
LINE_REQUEST_ID_HTTP_HEADER_NAME,
55-
);
56-
}
57-
return resBody;
58-
}
59-
6047
/**
6148
* Attach by operation of the module channel provider
6249
* @param grantType authorization_code

lib/module/api/lineModuleClient.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,6 @@ export class LineModuleClient {
4646
});
4747
}
4848

49-
private async parseHTTPResponse(response: Response) {
50-
const { LINE_REQUEST_ID_HTTP_HEADER_NAME } = Types;
51-
let resBody: Record<string, any> = {
52-
...(await response.json()),
53-
};
54-
if (response.headers.get(LINE_REQUEST_ID_HTTP_HEADER_NAME)) {
55-
resBody[LINE_REQUEST_ID_HTTP_HEADER_NAME] = response.headers.get(
56-
LINE_REQUEST_ID_HTTP_HEADER_NAME,
57-
);
58-
}
59-
return resBody;
60-
}
61-
6249
/**
6350
* If the Standby Channel wants to take the initiative (Chat Control), it calls the Acquire Control API. The channel that was previously an Active Channel will automatically switch to a Standby Channel.
6451
* @param chatId The `userId`, `roomId`, or `groupId`

0 commit comments

Comments
 (0)