BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
_init_auto_complete.html.haml
app/views/layouts/_init_auto_complete.html.haml
+1
-1
README.md
doc/api/README.md
+1
-1
api.rb
lib/api.rb
+1
-1
No files found.
app/views/layouts/_init_auto_complete.html.haml
View file @
eaa99478
:javascript
$
(
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
.
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
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.
...
...
lib/api.rb
View file @
eaa99478
...
...
@@ -2,7 +2,7 @@ Dir["#{Rails.root}/lib/api/*.rb"].each {|file| require file}
module
Gitlab
class
API
<
Grape
::
API
version
'v
2
'
,
using: :path
version
'v
3
'
,
using: :path
rescue_from
ActiveRecord
::
RecordNotFound
do
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