api.rb 477 Bytes
Newer Older
Nihad Abbasov's avatar
Nihad Abbasov committed
1
Dir["#{Rails.root}/lib/api/*.rb"].each {|file| require file}
Nihad Abbasov's avatar
Nihad Abbasov committed
2
3
4

module Gitlab
  class API < Grape::API
Riyad Preukschas's avatar
Riyad Preukschas committed
5
    version 'v3', using: :path
Nihad Abbasov's avatar
Nihad Abbasov committed
6

7
8
9
10
    rescue_from ActiveRecord::RecordNotFound do
      rack_response({'message' => '404 Not found'}.to_json, 404)
    end

Nihad Abbasov's avatar
Nihad Abbasov committed
11
12
    format :json
    helpers APIHelpers
13
14
    
    mount Groups
Nihad Abbasov's avatar
Nihad Abbasov committed
15
16
    mount Users
    mount Projects
Nihad Abbasov's avatar
Nihad Abbasov committed
17
    mount Issues
Robert Speicher's avatar
Robert Speicher committed
18
    mount Milestones
19
    mount Session
Valeriy Sizov's avatar
Valeriy Sizov committed
20
    mount MergeRequests
21
    mount Notes
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
22
    mount Internal
Nihad Abbasov's avatar
Nihad Abbasov committed
23
  end
24
end