Up API version to v3

This commit is contained in:
Riyad Preukschas 2012-12-21 18:55:39 +01:00
parent 8f01190eb5
commit eaa99478a7
3 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,6 @@
:javascript
$(function() {
GitLab.GfmAutoComplete.Members.url = "#{ "/api/v2/projects/#{@project.id}/members" if @project }";
GitLab.GfmAutoComplete.Members.url = "#{ "/api/v3/projects/#{@project.id}/members" if @project }";
GitLab.GfmAutoComplete.Members.params.private_token = "#{current_user.private_token}";
GitLab.GfmAutoComplete.Emoji.data = #{raw emoji_autocomplete_source};

View file

@ -15,7 +15,7 @@ API requests should be prefixed with `api` and the API version. The API version
Example of a valid API request:
```
GET http://example.com/api/v2/projects?private_token=QVy1PB7sTxfy4pqfZM1U
GET http://example.com/api/v3/projects?private_token=QVy1PB7sTxfy4pqfZM1U
```
The API uses JSON to serialize data. You don't need to specify `.json` at the end of API URL.

View file

@ -2,7 +2,7 @@ Dir["#{Rails.root}/lib/api/*.rb"].each {|file| require file}
module Gitlab
class API < Grape::API
version 'v2', using: :path
version 'v3', using: :path
rescue_from ActiveRecord::RecordNotFound do
rack_response({'message' => '404 Not found'}.to_json, 404)