-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdoggy_index_api_impl.rb
39 lines (37 loc) · 1003 Bytes
/
doggy_index_api_impl.rb
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
module DoggyComponent
class IndexApiImpl < Grape::API
# This can be dynamically generated using the Grape::API
# and then teh AppName/AppURL...
get '/' do
# This may need to be a list of all the concepts in this component
{
get: {
url_template: "https://pet-store-1231231231.herokuapp.com",
urn_path_template: "/doggy/dogs/:id",
url_variables: {
id: "the ID of the dog"
},
formats: [
:xml,
:json,
:binary,
:txt
],
available_methods: [:get, :put, :post, :delete]
},
random_dog: {
url_template: "https://pet-store-1231231231.herokuapp.com",
urn_path_template: "/doggy/dogs/random/random_dog",
url_variables: {},
formats: [
:xml,
:json,
:binary,
:txt
],
available_methods: [:get]
}
}
end
end
end