Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
eaa99478
Commit
eaa99478
authored
Dec 21, 2012
by
Riyad Preukschas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Up API version to v3
parent
8f01190e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
app/views/layouts/_init_auto_complete.html.haml
app/views/layouts/_init_auto_complete.html.haml
+1
-1
doc/api/README.md
doc/api/README.md
+1
-1
lib/api.rb
lib/api.rb
+1
-1
No files found.
app/views/layouts/_init_auto_complete.html.haml
View file @
eaa99478
:javascript
:javascript
$
(
function
()
{
$
(
function
()
{
GitLab
.
GfmAutoComplete
.
Members
.
url
=
"
#{
"/api/v
2
/projects/#{@project.id}/members"
if
@project
}
"
;
GitLab
.
GfmAutoComplete
.
Members
.
url
=
"
#{
"/api/v
3
/projects/#{@project.id}/members"
if
@project
}
"
;
GitLab
.
GfmAutoComplete
.
Members
.
params
.
private_token
=
"
#{
current_user
.
private_token
}
"
;
GitLab
.
GfmAutoComplete
.
Members
.
params
.
private_token
=
"
#{
current_user
.
private_token
}
"
;
GitLab
.
GfmAutoComplete
.
Emoji
.
data
=
#{
raw
emoji_autocomplete_source
}
;
GitLab
.
GfmAutoComplete
.
Emoji
.
data
=
#{
raw
emoji_autocomplete_source
}
;
...
...
doc/api/README.md
View file @
eaa99478
...
@@ -15,7 +15,7 @@ API requests should be prefixed with `api` and the API version. The API version
...
@@ -15,7 +15,7 @@ API requests should be prefixed with `api` and the API version. The API version
Example of a valid API request:
Example of a valid API request:
```
```
GET http://example.com/api/v
2
/projects?private_token=QVy1PB7sTxfy4pqfZM1U
GET http://example.com/api/v
3
/projects?private_token=QVy1PB7sTxfy4pqfZM1U
```
```
The API uses JSON to serialize data. You don't need to specify
`.json`
at the end of API URL.
The API uses JSON to serialize data. You don't need to specify
`.json`
at the end of API URL.
...
...
lib/api.rb
View file @
eaa99478
...
@@ -2,7 +2,7 @@ Dir["#{Rails.root}/lib/api/*.rb"].each {|file| require file}
...
@@ -2,7 +2,7 @@ Dir["#{Rails.root}/lib/api/*.rb"].each {|file| require file}
module
Gitlab
module
Gitlab
class
API
<
Grape
::
API
class
API
<
Grape
::
API
version
'v
2
'
,
using: :path
version
'v
3
'
,
using: :path
rescue_from
ActiveRecord
::
RecordNotFound
do
rescue_from
ActiveRecord
::
RecordNotFound
do
rack_response
({
'message'
=>
'404 Not found'
}.
to_json
,
404
)
rack_response
({
'message'
=>
'404 Not found'
}.
to_json
,
404
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment