We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a572f6b + 6a26445 commit 51242d8Copy full SHA for 51242d8
lib/Gitlab/Api/Repositories.php
@@ -337,16 +337,14 @@ public function contributors($project_id)
337
}
338
339
/**
340
- * File content is base64 encoded and placed in the "content" index of the returning array.
341
- * You can then save the content with the tar.gz extension
342
- *
343
* @param int $project_id
344
* @param array $params
+ * @param string $format Options: "tar.gz", "zip", "tar.bz2" and "tar"
345
* @return mixed
346
*/
347
- public function archive($project_id, $params = array())
+ public function archive($project_id, $params = array(), $format = 'tar.gz')
348
{
349
- return $this->get($this->getProjectPath($project_id, 'repository/archive'), $params);
+ return $this->get($this->getProjectPath($project_id, 'repository/archive.'.$format), $params);
350
351
352
0 commit comments