Client for consuming Gitlab and Github APIs.
Add this line to your application's Gemfile:
gem 'git_client'
And then execute:
$ bundle
Or install it yourself as:
$ gem install git_client
client = GitClient::GitClient.new({provider: :gitlab, base_url: <repository_url>, private_token: <token>}).client
request = client.projects
projects = request.parsed_response
raw_response = request.response
###Retrieving file:
request = client.file project_id: 92, filepath: "Gemfile.lock", commit_sha: '83eb671a5'
file_contents = request.response
errors = request.parsed_errors
- Fork it ( https://github.com/[my-github-username]/git_client/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request