code: function (key, query, options, validate) {
      if (options === void 0) { options = {}; }
      if (validate === void 0) { validate = true; }
      return __awaiter(_this, void 0, void 0, function () {
          var requestData, response, responseData;
          return __generator(this, function (_a) {
              switch (_a.label) {
                  case 0:
                      requestData = __assign({}, options, { key: key, q: query });
                      if (validate) {
                          ValidateRequest_1.validateRequest(requestData);
                      }
                      return [4 /*yield*/, axios_1.default.post(PIXABAY_URL_IMAGES + QueryString.stringify(requestData))];
                  case 1:
                      response = _a.sent();
                      responseData = response.data;
                      if (!responseData.hits && !responseData.total && !responseData.totalHits) {
                          throw new Error("BadResponse: hits total totalHits are missing. make sure that you have right access token.");
                      }
                      return [2 /*return*/, responseData];
              }
          });
      });
  }
docs: Search for images on pixabay
  @param key - you can obtain your authentication key by sign up on pixabay
  @param query - search for image names, should not exceed 100 characters
  @param options - pixabay request options, for more information visit
  @param validate - should validate request ? It'll throw an error if validation fail
  @throws {BadResponse}