style: format haxe sources

This commit is contained in:
2026-10-09 12:41:58 +03:00
parent a99490ec05
commit 9e245fea4b
11 changed files with 57 additions and 19 deletions
+4 -2
View File
@@ -60,7 +60,8 @@ class PixabayApi {
return '${baseUrl}?${query}';
}
public function getPage(page:Int, perPage:Int, category:PixabayCategory = PixabayCategory.NATURE):Promise<PixabayResponse> {
public function getPage(page:Int, perPage:Int,
category:PixabayCategory = PixabayCategory.NATURE):Promise<PixabayResponse> {
return new JsonLoader<PixabayResponse>().GET(buildRequest([
"category" => category,
"image_type" => PixabayImageType.PHOTO,
@@ -71,6 +72,7 @@ class PixabayApi {
}
public function get(id:Int):Promise<PixabayImage> {
return new JsonLoader<PixabayResponse>().GET(buildRequest(["id" => id])).then((response:PixabayResponse) -> response.hits[0]);
return new JsonLoader<PixabayResponse>().GET(buildRequest(["id" => id]))
.then((response:PixabayResponse) -> response.hits[0]);
}
}