Skip to content

Commit 544ba36

Browse files
committed
Merge pull request #45 from iamluc/master
Get file API
2 parents 3f0e7df + abd8736 commit 544ba36

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/Gitlab/Api/Repositories.php

+8
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ public function blob($project_id, $sha, $filepath)
6161
));
6262
}
6363

64+
public function getFile($project_id, $file_path, $ref)
65+
{
66+
return $this->get('projects/'.urlencode($project_id).'/repository/files', array(
67+
'file_path' => $file_path,
68+
'ref' => $ref
69+
));
70+
}
71+
6472
public function createFile($project_id, $file_path, $content, $branch_name, $commit_message)
6573
{
6674
return $this->post('projects/'.urlencode($project_id).'/repository/files', array(

0 commit comments

Comments
 (0)