style: format haxe sources
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user