@@ -83,9 +83,6 @@ class BuildsApi
8383 'getProjectBuilds ' => [
8484 'application/json ' ,
8585 ],
86- 'getProjectBuildsInChannel ' => [
87- 'application/json ' ,
88- ],
8986 ];
9087
9188 /**
@@ -1091,325 +1088,6 @@ public function getProjectBuildsRequest(
10911088 );
10921089 }
10931090
1094- /**
1095- * Operation getProjectBuildsInChannel
1096- *
1097- * Get all builds for a project in a specific release channel
1098- *
1099- * @param string $project The name of the project (required)
1100- * @param string $channel The release channel (e.g., stable, beta) (required)
1101- * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getProjectBuildsInChannel'] to see the possible values for this operation
1102- *
1103- * @throws ApiException on non-2xx response or if the response body is not in the expected format
1104- * @throws InvalidArgumentException
1105- * @return \Aternos\BlobBuild\Model\BuildListResponse|\Aternos\BlobBuild\Model\ErrorResponse
1106- */
1107- public function getProjectBuildsInChannel (
1108- string $ project ,
1109- string $ channel ,
1110- string $ contentType = self ::contentTypes['getProjectBuildsInChannel ' ][0 ]
1111- ): \Aternos \BlobBuild \Model \BuildListResponse |\Aternos \BlobBuild \Model \ErrorResponse
1112- {
1113- list ($ response ) = $ this ->getProjectBuildsInChannelWithHttpInfo ($ project , $ channel , $ contentType );
1114- return $ response ;
1115- }
1116-
1117- /**
1118- * Operation getProjectBuildsInChannelWithHttpInfo
1119- *
1120- * Get all builds for a project in a specific release channel
1121- *
1122- * @param string $project The name of the project (required)
1123- * @param string $channel The release channel (e.g., stable, beta) (required)
1124- * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getProjectBuildsInChannel'] to see the possible values for this operation
1125- *
1126- * @throws ApiException on non-2xx response or if the response body is not in the expected format
1127- * @throws InvalidArgumentException
1128- * @return array of \Aternos\BlobBuild\Model\BuildListResponse|\Aternos\BlobBuild\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings)
1129- */
1130- public function getProjectBuildsInChannelWithHttpInfo (
1131- string $ project ,
1132- string $ channel ,
1133- string $ contentType = self ::contentTypes['getProjectBuildsInChannel ' ][0 ]
1134- ): array
1135- {
1136- $ request = $ this ->getProjectBuildsInChannelRequest ($ project , $ channel , $ contentType );
1137-
1138- try {
1139- $ options = $ this ->createHttpClientOption ();
1140- try {
1141- $ response = $ this ->client ->send ($ request , $ options );
1142- } catch (RequestException $ e ) {
1143- throw new ApiException (
1144- "[ {$ e ->getCode ()}] {$ e ->getMessage ()}" ,
1145- (int ) $ e ->getCode (),
1146- $ e ->getResponse () ? $ e ->getResponse ()->getHeaders () : null ,
1147- $ e ->getResponse () ? (string ) $ e ->getResponse ()->getBody () : null
1148- );
1149- } catch (ConnectException $ e ) {
1150- throw new ApiException (
1151- "[ {$ e ->getCode ()}] {$ e ->getMessage ()}" ,
1152- (int ) $ e ->getCode (),
1153- null ,
1154- null
1155- );
1156- }
1157-
1158- $ statusCode = $ response ->getStatusCode ();
1159-
1160- switch ($ statusCode ) {
1161- case 200 :
1162- return $ this ->handleResponseWithDataType (
1163- '\Aternos\BlobBuild\Model\BuildListResponse ' ,
1164- $ request ,
1165- $ response ,
1166- );
1167- case 404 :
1168- return $ this ->handleResponseWithDataType (
1169- '\Aternos\BlobBuild\Model\ErrorResponse ' ,
1170- $ request ,
1171- $ response ,
1172- );
1173- }
1174-
1175-
1176- if ($ statusCode < 200 || $ statusCode > 299 ) {
1177- throw new ApiException (
1178- sprintf (
1179- '[%d] Error connecting to the API (%s) ' ,
1180- $ statusCode ,
1181- (string ) $ request ->getUri ()
1182- ),
1183- $ statusCode ,
1184- $ response ->getHeaders (),
1185- (string ) $ response ->getBody ()
1186- );
1187- }
1188-
1189- return $ this ->handleResponseWithDataType (
1190- '\Aternos\BlobBuild\Model\BuildListResponse ' ,
1191- $ request ,
1192- $ response ,
1193- );
1194- } catch (ApiException $ e ) {
1195- switch ($ e ->getCode ()) {
1196- case 200 :
1197- $ data = ObjectSerializer::deserialize (
1198- $ e ->getResponseBody (),
1199- '\Aternos\BlobBuild\Model\BuildListResponse ' ,
1200- $ e ->getResponseHeaders ()
1201- );
1202- $ e ->setResponseObject ($ data );
1203- throw $ e ;
1204- case 404 :
1205- $ data = ObjectSerializer::deserialize (
1206- $ e ->getResponseBody (),
1207- '\Aternos\BlobBuild\Model\ErrorResponse ' ,
1208- $ e ->getResponseHeaders ()
1209- );
1210- $ e ->setResponseObject ($ data );
1211- throw $ e ;
1212- }
1213-
1214- throw $ e ;
1215- }
1216- }
1217-
1218- /**
1219- * Operation getProjectBuildsInChannelAsync
1220- *
1221- * Get all builds for a project in a specific release channel
1222- *
1223- * @param string $project The name of the project (required)
1224- * @param string $channel The release channel (e.g., stable, beta) (required)
1225- * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getProjectBuildsInChannel'] to see the possible values for this operation
1226- *
1227- * @throws InvalidArgumentException
1228- * @return PromiseInterface
1229- */
1230- public function getProjectBuildsInChannelAsync (
1231- string $ project ,
1232- string $ channel ,
1233- string $ contentType = self ::contentTypes['getProjectBuildsInChannel ' ][0 ]
1234- ): PromiseInterface
1235- {
1236- return $ this ->getProjectBuildsInChannelAsyncWithHttpInfo ($ project , $ channel , $ contentType )
1237- ->then (
1238- function ($ response ) {
1239- return $ response [0 ];
1240- }
1241- );
1242- }
1243-
1244- /**
1245- * Operation getProjectBuildsInChannelAsyncWithHttpInfo
1246- *
1247- * Get all builds for a project in a specific release channel
1248- *
1249- * @param string $project The name of the project (required)
1250- * @param string $channel The release channel (e.g., stable, beta) (required)
1251- * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getProjectBuildsInChannel'] to see the possible values for this operation
1252- *
1253- * @throws InvalidArgumentException
1254- * @return PromiseInterface
1255- */
1256- public function getProjectBuildsInChannelAsyncWithHttpInfo (
1257- string $ project ,
1258- string $ channel ,
1259- string $ contentType = self ::contentTypes['getProjectBuildsInChannel ' ][0 ]
1260- ): PromiseInterface
1261- {
1262- $ returnType = '\Aternos\BlobBuild\Model\BuildListResponse ' ;
1263- $ request = $ this ->getProjectBuildsInChannelRequest ($ project , $ channel , $ contentType );
1264-
1265- return $ this ->client
1266- ->sendAsync ($ request , $ this ->createHttpClientOption ())
1267- ->then (
1268- function ($ response ) use ($ returnType ) {
1269- if (in_array ($ returnType , ['\SplFileObject ' , '\Psr\Http\Message\StreamInterface ' ])) {
1270- $ content = $ response ->getBody (); //stream goes to serializer
1271- } else {
1272- $ content = (string ) $ response ->getBody ();
1273- if ($ returnType !== 'string ' ) {
1274- $ content = json_decode ($ content );
1275- }
1276- }
1277-
1278- return [
1279- ObjectSerializer::deserialize ($ content , $ returnType , []),
1280- $ response ->getStatusCode (),
1281- $ response ->getHeaders ()
1282- ];
1283- },
1284- function ($ exception ) {
1285- $ response = $ exception ->getResponse ();
1286- $ statusCode = $ response ->getStatusCode ();
1287- throw new ApiException (
1288- sprintf (
1289- '[%d] Error connecting to the API (%s) ' ,
1290- $ statusCode ,
1291- $ exception ->getRequest ()->getUri ()
1292- ),
1293- $ statusCode ,
1294- $ response ->getHeaders (),
1295- (string ) $ response ->getBody ()
1296- );
1297- }
1298- );
1299- }
1300-
1301- /**
1302- * Create request for operation 'getProjectBuildsInChannel'
1303- *
1304- * @param string $project The name of the project (required)
1305- * @param string $channel The release channel (e.g., stable, beta) (required)
1306- * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getProjectBuildsInChannel'] to see the possible values for this operation
1307- *
1308- * @throws InvalidArgumentException
1309- * @return \GuzzleHttp\Psr7\Request
1310- */
1311- public function getProjectBuildsInChannelRequest (
1312- string $ project ,
1313- string $ channel ,
1314- string $ contentType = self ::contentTypes['getProjectBuildsInChannel ' ][0 ]
1315- ): Request
1316- {
1317-
1318- // verify the required parameter 'project' is set
1319- if ($ project === null || (is_array ($ project ) && count ($ project ) === 0 )) {
1320- throw new InvalidArgumentException (
1321- 'Missing the required parameter $project when calling getProjectBuildsInChannel '
1322- );
1323- }
1324-
1325- // verify the required parameter 'channel' is set
1326- if ($ channel === null || (is_array ($ channel ) && count ($ channel ) === 0 )) {
1327- throw new InvalidArgumentException (
1328- 'Missing the required parameter $channel when calling getProjectBuildsInChannel '
1329- );
1330- }
1331-
1332-
1333- $ resourcePath = '/builds/{project}/{channel}/ ' ;
1334- $ formParams = [];
1335- $ queryParams = [];
1336- $ headerParams = [];
1337- $ httpBody = '' ;
1338- $ multipart = false ;
1339-
1340-
1341-
1342- // path params
1343- if ($ project !== null ) {
1344- $ resourcePath = str_replace (
1345- '{ ' . 'project ' . '} ' ,
1346- ObjectSerializer::toPathValue ($ project ),
1347- $ resourcePath
1348- );
1349- }
1350- // path params
1351- if ($ channel !== null ) {
1352- $ resourcePath = str_replace (
1353- '{ ' . 'channel ' . '} ' ,
1354- ObjectSerializer::toPathValue ($ channel ),
1355- $ resourcePath
1356- );
1357- }
1358-
1359-
1360- $ headers = $ this ->headerSelector ->selectHeaders (
1361- ['application/json ' , ],
1362- $ contentType ,
1363- $ multipart
1364- );
1365-
1366- // for model (json/xml)
1367- if (count ($ formParams ) > 0 ) {
1368- if ($ multipart ) {
1369- $ multipartContents = [];
1370- foreach ($ formParams as $ formParamName => $ formParamValue ) {
1371- $ formParamValueItems = is_array ($ formParamValue ) ? $ formParamValue : [$ formParamValue ];
1372- foreach ($ formParamValueItems as $ formParamValueItem ) {
1373- $ multipartContents [] = [
1374- 'name ' => $ formParamName ,
1375- 'contents ' => $ formParamValueItem
1376- ];
1377- }
1378- }
1379- // for HTTP post (form)
1380- $ httpBody = new MultipartStream ($ multipartContents );
1381-
1382- } elseif (stripos ($ headers ['Content-Type ' ], 'application/json ' ) !== false ) {
1383- # if Content-Type contains "application/json", json_encode the form parameters
1384- $ httpBody = \GuzzleHttp \Utils::jsonEncode ($ formParams );
1385- } else {
1386- // for HTTP post (form)
1387- $ httpBody = ObjectSerializer::buildQuery ($ formParams );
1388- }
1389- }
1390-
1391-
1392- $ defaultHeaders = [];
1393- if ($ this ->config ->getUserAgent ()) {
1394- $ defaultHeaders ['User-Agent ' ] = $ this ->config ->getUserAgent ();
1395- }
1396-
1397- $ headers = array_merge (
1398- $ defaultHeaders ,
1399- $ headerParams ,
1400- $ headers
1401- );
1402-
1403- $ operationHost = $ this ->config ->getHost ();
1404- $ query = ObjectSerializer::buildQuery ($ queryParams );
1405- return new Request (
1406- 'GET ' ,
1407- $ operationHost . $ resourcePath . ($ query ? "? {$ query }" : '' ),
1408- $ headers ,
1409- $ httpBody
1410- );
1411- }
1412-
14131091 /**
14141092 * Create http client option
14151093 *
0 commit comments