Skip to content

Commit

Permalink
Merge pull request #462 from keboola/zajca-kbc-161
Browse files Browse the repository at this point in the history
KBC-161 File expiration in ListFiles response
  • Loading branch information
zajca authored Aug 12, 2020
2 parents 7fefaf3 + 2125e6e commit 4766dff
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apiary.apib
Original file line number Diff line number Diff line change
Expand Up @@ -4095,6 +4095,8 @@ list of files (including addition and removal of a file).
+ Default: 100
+ offset (optional, number) - Pagination offset
+ Default: 0
+ showExpired (optional, boolean) - Include expired files in response
Default: false

+ Request
+ Headers
Expand Down
22 changes: 22 additions & 0 deletions src/Keboola/StorageApi/Options/ListFilesOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ class ListFilesOptions

private $runId;

/** @var bool */
private $showExpired = false;

/**
* @return array
*/
Expand Down Expand Up @@ -89,6 +92,7 @@ public function toArray()
'sinceId' => $this->getSinceId(),
'maxId' => $this->getMaxId(),
'runId' => $this->getRunId(),
'showExpired' => $this->getShowExpired(),
);
}

Expand Down Expand Up @@ -160,4 +164,22 @@ public function setRunId($runId)
$this->runId = $runId;
return $this;
}

/**
* @return bool
*/
public function getShowExpired()
{
return $this->showExpired;
}

/**
* @param bool $showExpired
* @return ListFilesOptions
*/
public function setShowExpired($showExpired)
{
$this->showExpired = $showExpired;
return $this;
}
}

0 comments on commit 4766dff

Please sign in to comment.