-
Notifications
You must be signed in to change notification settings - Fork 23
/
api_v1.html.haml
63 lines (57 loc) · 2.12 KB
/
api_v1.html.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
!!!
%html
%head
%title Grape-Doorkeeper documentation
%link{:href => "//fonts.googleapis.com/css?family=Droid+Sans:400,700", :rel => "stylesheet", :type => "text/css"}/
= stylesheet_link_tag "documentation", media: "all"
:coffeescript
window.base_url = "#{ENV['BASE_URL']}"
window.api_version = "v1"
= javascript_include_tag "documentation"
%body.swagger-section
%header#header.content-header
.container
%form#api_selector.form
.api-header-group.api-header-url
%label{ for: 'baseUrl' }
Grape Doorkeeper
%input#input_baseUrl.form-control{name: 'baseUrl', placeholder: 'https://grape-doorkeeper.herokuapp.com/api/v1', type: 'text'}
.api-header-group.api-header-key
%label{ for: 'baseUrl' }
API key
%input#input_apiKey.form-control{name: 'apiKey', placeholder: 'api_key', type: 'text'}
%a#explore.btn.btn-primary{href: '#'}
Explore
.container
.outside-info
%h2
Grape-Doorkeeper endpoints
.outside-info
%h2
Sending the authentication token
%p
%strong
In the header
You can send the authentication for a user in the header of your request.
%code
Authorization: Bearer TOKEN_STRING
%em
This is what Swagger does on this page. It's the recommended approach.
%p
%strong
in query
as an <code>access_token</code> parameter, e.g.
%a{ href: "#" }
#{ENV['BASE_URL']}/api/v1/me?access_token=TOKEN_STRING
%hr
#message-bar.swagger-ui-wrap
#swagger-ui-container.swagger-ui-wrap
.applications-panel
.container
.api-info-header
%h2
Applications:
%span.pull-right.less-strong
= link_to "Add an application", "/oauth/applications"
= render partial: 'api_v1_applications'
%footer#footer