Skip to content

Commit

Permalink
Get file API
Browse files Browse the repository at this point in the history
  • Loading branch information
vieilles committed Jun 19, 2014
1 parent 3f0e7df commit abd8736
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/Gitlab/Api/Repositories.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ public function blob($project_id, $sha, $filepath)
));
}

public function getFile($project_id, $file_path, $ref)
{
return $this->get('projects/'.urlencode($project_id).'/repository/files', array(
'file_path' => $file_path,
'ref' => $ref
));
}

public function createFile($project_id, $file_path, $content, $branch_name, $commit_message)
{
return $this->post('projects/'.urlencode($project_id).'/repository/files', array(
Expand Down

0 comments on commit abd8736

Please sign in to comment.