Skip to content

Commit 3359120

Browse files
committed
Merge pull request #121 from hvanoch/master
Added repository/archive endpoint
2 parents 8a11504 + c6fd92e commit 3359120

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/Gitlab/Api/Repositories.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,19 @@ public function contributors($project_id)
289289
return $this->get($this->getProjectPath($project_id, 'repository/contributors'));
290290
}
291291

292+
/**
293+
* File content is base64 encoded and placed in the "content" index of the returning array.
294+
* You can then save the content with the tar.gz extension
295+
*
296+
* @param int $project_id
297+
* @param array $params
298+
* @return mixed
299+
*/
300+
public function archive($project_id, $params = array())
301+
{
302+
return $this->get($this->getProjectPath($project_id, 'repository/archive'), $params);
303+
}
304+
292305
/**
293306
* @param string $path
294307
* @return string

0 commit comments

Comments
 (0)