diff --git a/src/haxe/ru/m/puzzlez/storage/PixabayStorage.hx b/src/haxe/ru/m/puzzlez/storage/PixabayStorage.hx index 48c8cea..8729f17 100644 --- a/src/haxe/ru/m/puzzlez/storage/PixabayStorage.hx +++ b/src/haxe/ru/m/puzzlez/storage/PixabayStorage.hx @@ -11,6 +11,28 @@ typedef PixabayResponse = { }> } +enum PixabayCategory { + FASHION; + NATURE; + BACKGROUNDS; + SCIENCE; + EDUCATION; + PEOPLE; + FEELINGS; + RELIGION; + HEALTH; + PLACES; + ANIMALS; + INDUSTRY; + FOOD; + COMPUTER; + SPORTS; + TRANSPORTATION; + TRAVEL; BUILDINGS; + BUSINESS; + MUSIC; +} + @:provide class PixabayStorage extends SharedObjectStorage implements ISourceStorage { private var key:String; @@ -26,7 +48,7 @@ typedef PixabayResponse = { return enabled && exists(type) ? Promise.promise(read(type)) : new JsonLoader() - .GET('https://pixabay.com/api/?key=${key}&category=${type}') + .GET('https://pixabay.com/api/?key=${key}&q=${type}') .then(function(result:PixabayResponse) { var result = [for (item in result.hits) URL(item.largeImageURL)]; if (enabled) {