code: protected function query($api, $from, $to, array $ext = [])
      {
          $params = [
              'begin_date' => $from,
              'end_date' => $to,
          ];
  
          if (!empty($ext)) {
              $params = array_merge($params, $ext);
          }
  
          return $this->parseJSON('json', [$api, $params]);
      }
docs: 查询数据.
  
  @param string $api
  @param string $from
  @param string $to
  
  @return \EasyWeChat\Support\Collection