[update] (pixabay) update query
This commit is contained in:
@@ -63,7 +63,7 @@ class PixabaySource implements IImageSource<PixabayCategory> {
|
||||
|
||||
public function getList(?type:PixabayCategory):Promise<Array<ImageId>> {
|
||||
return new JsonLoader<PixabayResponse>()
|
||||
.GET('${baseUrl}?key=${key}&category=${type}&image_type=${PixabayImageType.PHOTO}')
|
||||
.GET('${baseUrl}?key=${key}&category=${type}&image_type=${PixabayImageType.PHOTO}&editors_choice=true')
|
||||
.then((response:PixabayResponse) -> {
|
||||
var result = [];
|
||||
for (item in response.hits) {
|
||||
@@ -86,6 +86,6 @@ class PixabaySource implements IImageSource<PixabayCategory> {
|
||||
|
||||
public function loadImage(id:ImageId, preview:Bool = false):Promise<BitmapData> {
|
||||
return getImage(id)
|
||||
.pipe((data:PixabayImage) -> return new ImageLoader().GET(preview ? data.previewURL : data.largeImageURL));
|
||||
.pipe((data:PixabayImage) -> return new ImageLoader().GET(preview ? data.webformatURL : data.largeImageURL));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user