Skip to content

Commit 5a8a5b3

Browse files
github-actions[bot]github-actions
andauthored
Modify http status code as response for manage-audience (#665)
line/line-openapi#87 This change modifies the HTTP status code for the following audience group-related endpoints, as they were incorrect. Some http status codes are wrong. They should be 202, not 200. 1. `POST /v2/bot/audienceGroup/upload` (`createAudienceGroup`) 2. `PUT /v2/bot/audienceGroup/upload` (`addAudienceToAudienceGroup`) 3. `POST /v2/bot/audienceGroup/upload/byFile` (`createAudienceForUploadingUserIds`) 4. `POST /v2/bot/audienceGroup/click` (`createClickBasedAudienceGroup`) 5. `POST /v2/bot/audienceGroup/imp` (`createImpBasedAudienceGroup`) You can also check if this change is correct by reading https://developers.line.biz/en/reference/messaging-api/#manage-audience-group. NOTE: This change is not a modification of the messaging API itself. It is simply a correction of an error in the YAML description. --------- Co-authored-by: github-actions <[email protected]>
1 parent 62d08a6 commit 5a8a5b3

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

line-openapi

src/clients/manage-audience/lib/Api/ManageAudienceApi.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ public function createAudienceGroupWithHttpInfo($createAudienceGroupRequest, str
652652

653653

654654
switch($statusCode) {
655-
case 200:
655+
case 202:
656656
if ('\LINE\Clients\ManageAudience\Model\CreateAudienceGroupResponse' === '\SplFileObject') {
657657
$content = $response->getBody(); //stream goes to serializer
658658
} else {
@@ -724,7 +724,7 @@ public function createAudienceGroupWithHttpInfo($createAudienceGroupRequest, str
724724

725725
} catch (ApiException $e) {
726726
switch ($e->getCode()) {
727-
case 200:
727+
case 202:
728728
$data = ObjectSerializer::deserialize(
729729
$e->getResponseBody(),
730730
'\LINE\Clients\ManageAudience\Model\CreateAudienceGroupResponse',
@@ -955,7 +955,7 @@ public function createClickBasedAudienceGroupWithHttpInfo($createClickBasedAudie
955955

956956

957957
switch($statusCode) {
958-
case 200:
958+
case 202:
959959
if ('\LINE\Clients\ManageAudience\Model\CreateClickBasedAudienceGroupResponse' === '\SplFileObject') {
960960
$content = $response->getBody(); //stream goes to serializer
961961
} else {
@@ -1027,7 +1027,7 @@ public function createClickBasedAudienceGroupWithHttpInfo($createClickBasedAudie
10271027

10281028
} catch (ApiException $e) {
10291029
switch ($e->getCode()) {
1030-
case 200:
1030+
case 202:
10311031
$data = ObjectSerializer::deserialize(
10321032
$e->getResponseBody(),
10331033
'\LINE\Clients\ManageAudience\Model\CreateClickBasedAudienceGroupResponse',
@@ -1258,7 +1258,7 @@ public function createImpBasedAudienceGroupWithHttpInfo($createImpBasedAudienceG
12581258

12591259

12601260
switch($statusCode) {
1261-
case 200:
1261+
case 202:
12621262
if ('\LINE\Clients\ManageAudience\Model\CreateImpBasedAudienceGroupResponse' === '\SplFileObject') {
12631263
$content = $response->getBody(); //stream goes to serializer
12641264
} else {
@@ -1330,7 +1330,7 @@ public function createImpBasedAudienceGroupWithHttpInfo($createImpBasedAudienceG
13301330

13311331
} catch (ApiException $e) {
13321332
switch ($e->getCode()) {
1333-
case 200:
1333+
case 202:
13341334
$data = ObjectSerializer::deserialize(
13351335
$e->getResponseBody(),
13361336
'\LINE\Clients\ManageAudience\Model\CreateImpBasedAudienceGroupResponse',

src/clients/manage-audience/lib/Api/ManageAudienceBlobApi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ public function createAudienceForUploadingUserIdsWithHttpInfo($file, $descriptio
504504

505505

506506
switch($statusCode) {
507-
case 200:
507+
case 202:
508508
if ('\LINE\Clients\ManageAudience\Model\CreateAudienceGroupResponse' === '\SplFileObject') {
509509
$content = $response->getBody(); //stream goes to serializer
510510
} else {
@@ -576,7 +576,7 @@ public function createAudienceForUploadingUserIdsWithHttpInfo($file, $descriptio
576576

577577
} catch (ApiException $e) {
578578
switch ($e->getCode()) {
579-
case 200:
579+
case 202:
580580
$data = ObjectSerializer::deserialize(
581581
$e->getResponseBody(),
582582
'\LINE\Clients\ManageAudience\Model\CreateAudienceGroupResponse',

0 commit comments

Comments
 (0)