docapi 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. data/.document +5 -0
  2. data/.gitignore +5 -0
  3. data/LICENSE +20 -0
  4. data/README.rdoc +7 -0
  5. data/Rakefile +57 -0
  6. data/VERSION +1 -0
  7. data/bin/docapi +47 -0
  8. data/docapi.gemspec +76 -0
  9. data/files/javascripts/documentation/documentation.js +26 -0
  10. data/files/javascripts/documentation/highlight.pack.js +1 -0
  11. data/files/javascripts/documentation/jquery-1.3.2.min.js +19 -0
  12. data/files/javascripts/documentation/jquery.tableofcontents.min.js +12 -0
  13. data/files/stylesheets/documentation/highlighter/ascetic.css +42 -0
  14. data/files/stylesheets/documentation/highlighter/brown_paper.css +104 -0
  15. data/files/stylesheets/documentation/highlighter/brown_papersq.png +0 -0
  16. data/files/stylesheets/documentation/highlighter/dark.css +101 -0
  17. data/files/stylesheets/documentation/highlighter/default.css +103 -0
  18. data/files/stylesheets/documentation/highlighter/far.css +113 -0
  19. data/files/stylesheets/documentation/highlighter/github.css +90 -0
  20. data/files/stylesheets/documentation/highlighter/idea.css +74 -0
  21. data/files/stylesheets/documentation/highlighter/ir_black.css +67 -0
  22. data/files/stylesheets/documentation/highlighter/magula.css +105 -0
  23. data/files/stylesheets/documentation/highlighter/school_book.css +106 -0
  24. data/files/stylesheets/documentation/highlighter/school_book.png +0 -0
  25. data/files/stylesheets/documentation/highlighter/sunburst.css +112 -0
  26. data/files/stylesheets/documentation/highlighter/vs.css +68 -0
  27. data/files/stylesheets/documentation/highlighter/zenburn.css +113 -0
  28. data/files/stylesheets/documentation/layout.css +161 -0
  29. data/lib/docapi.rb +150 -0
  30. data/test/code/reference_api.rb +141 -0
  31. data/test/doc/1-README.md +17 -0
  32. data/test/doc/2-documentation/documentation.html +186 -0
  33. data/test/doc/3-tutorials/2-ruby/example-1.rb +12 -0
  34. metadata +89 -0
@@ -0,0 +1,17 @@
1
+ Title: Reference API Documentation
2
+ Use numbered headers: false
3
+ HTML use syntax: false
4
+
5
+ Reference API Documentation
6
+ {: class="page-title"}
7
+
8
+ Tip: you may hide the code listings by pressing 'h'. Press 'h' again to make them reappear.
9
+
10
+ # Synopsis
11
+ The reference API provides the reference data of Grid5000. Information such as the list of sites, clusters, nodes, environments, etc. can be queried using this API.
12
+ You can also obtain a specific version of any data, list all the versions of a given information, and get an archive of all or part of the data.
13
+
14
+
15
+ # Requirements
16
+ * You've read and understood the introduction given on this page: [API#Introduction](https://www.grid5000.fr/mediawiki/index.php/API)
17
+
@@ -0,0 +1,186 @@
1
+ <ol class="methods"><li>
2
+
3
+ <div class="synopsis"><a name="M000003">GET /:grid5000-resource[.:format]<a></div>
4
+
5
+
6
+
7
+
8
+ <p>
9
+ Get a specific version of a Grid5000 resource.
10
+ </p>
11
+ <h2>URI parameters</h2>
12
+ <table>
13
+ <tr><td valign="top"><tt>grid5000-resource</tt>:</td><td>the URI of the grid5000 resource.
14
+
15
+ </td></tr>
16
+ </table>
17
+ <h2>Query parameters</h2>
18
+ <table>
19
+ <tr><td valign="top"><tt>version</tt>:</td><td>the requested version. It can be a version id (40 characters), or a UNIX
20
+ timestamp [default=empty (most recent version is used)].
21
+
22
+ </td></tr>
23
+ <tr><td valign="top"><tt>depth</tt>:</td><td>the number of nested sub-resources to resolve [default=1].
24
+
25
+ </td></tr>
26
+ <tr><td valign="top"><tt>resolve</tt>:</td><td>a list of comma separated sub-resources names to resolve (to be used with
27
+ the <tt>depth</tt> parameter) [default=all].
28
+
29
+ </td></tr>
30
+ </table>
31
+ <h2>Content-Types</h2>
32
+ <table>
33
+ <tr><td valign="top"><tt>application/json</tt>:</td><td>JSON
34
+
35
+ </td></tr>
36
+ <tr><td valign="top"><tt>application/xml</tt>:</td><td>XML
37
+
38
+ </td></tr>
39
+ <tr><td valign="top"><tt>application/zip</tt>:</td><td>the ZIP format will return a zip archive containing the set of directories
40
+ and files corresponding to the required data, with all its sub-resources.
41
+
42
+ </td></tr>
43
+ </table>
44
+ <h2>Status codes</h2>
45
+ <table>
46
+ <tr><td valign="top"><tt>200</tt>:</td><td>OK, the response contains the description of the resource as it was at the
47
+ requested version.
48
+
49
+ </td></tr>
50
+ <tr><td valign="top"><tt>404</tt>:</td><td>the requested grid5000 resource cannot be found, or the requested version
51
+ does not exist.
52
+
53
+ </td></tr>
54
+ <tr><td valign="top"><tt>406</tt>:</td><td>Returns 406 if the requested format is not available.
55
+
56
+ </td></tr>
57
+ </table>
58
+
59
+
60
+
61
+ </li><li>
62
+
63
+ <div class="synopsis"><a name="M000001">GET /:grid5000-resource/versions[.:format]<a></div>
64
+
65
+
66
+
67
+
68
+ <p>
69
+ Get the list of all versions of a particular resource.
70
+ </p>
71
+ <h2>URI parameters</h2>
72
+ <table>
73
+ <tr><td valign="top"><tt>grid5000-resource</tt>:</td><td>the URI of the grid5000 resource.
74
+
75
+ </td></tr>
76
+ <tr><td valign="top"><tt>format</tt>:</td><td>the requested format [json,xml] if you do not use the <tt>Accept</tt>
77
+ header in your HTTP request.
78
+
79
+ </td></tr>
80
+ </table>
81
+ <h2>Query parameters</h2>
82
+ <table>
83
+ <tr><td valign="top"><tt>limit</tt>:</td><td>maximum number of versions to return.
84
+
85
+ </td></tr>
86
+ </table>
87
+ <h2>Content-Types</h2>
88
+ <table>
89
+ <tr><td valign="top"><tt>application/json</tt>:</td><td>JSON
90
+
91
+ </td></tr>
92
+ <tr><td valign="top"><tt>application/xml</tt>:</td><td>XML
93
+
94
+ </td></tr>
95
+ </table>
96
+ <h2>Status codes</h2>
97
+ <table>
98
+ <tr><td valign="top"><tt>200</tt>:</td><td>OK, the response contains the list of the versions of the requested
99
+ grid5000 resource.
100
+
101
+ </td></tr>
102
+ <tr><td valign="top"><tt>404</tt>:</td><td>the requested grid5000 resource cannot be found.
103
+
104
+ </td></tr>
105
+ <tr><td valign="top"><tt>406</tt>:</td><td>the requested format is not available.
106
+
107
+ </td></tr>
108
+ </table>
109
+ <h2>Usage</h2>
110
+ <p>
111
+ Get the 2 latest versions of the Rennes site:
112
+ </p>
113
+ <pre><code>
114
+ GET /grid5000/sites/rennes/versions?limit=2 HTTP/1.1
115
+ Accept: application/json
116
+
117
+ HTTP/1.1 200 OK
118
+ Date: Tue, 17 Mar 2009 13:41:45 GMT
119
+ ETag: &quot;0745dc6351cdd00919e8611f8f6952eb48fc9b56&quot;
120
+ Cache-Control: public, max-age=120
121
+ Age: 0
122
+ Content-Length: 496
123
+ Content-Type: application/json;charset=utf-8
124
+ [
125
+ {
126
+ &quot;message&quot;: &quot;Added network interfaces to helios and azur clusters.&quot;,
127
+ &quot;uri&quot;: &quot;\/sites\/versions\/29202872636a3f4023b956cc7bba38c15850ec9f&quot;,
128
+ &quot;date&quot;: &quot;Tue, 17 Mar 2009 09:28:27 GMT&quot;,
129
+ &quot;id&quot;: &quot;29202872636a3f4023b956cc7bba38c15850ec9f&quot;
130
+ },
131
+ {
132
+ &quot;message&quot;: &quot;Added network interfaces to genepi nodes.&quot;,
133
+ &quot;uri&quot;: &quot;\/sites\/versions\/7edfbafddb08beb8251c543c5c96e5d736bf23fa&quot;,
134
+ &quot;date&quot;: &quot;Tue, 17 Mar 2009 09:17:48 GMT&quot;,
135
+ &quot;id&quot;: &quot;7edfbafddb08beb8251c543c5c96e5d736bf23fa&quot;
136
+ }
137
+ ]
138
+ </code></pre>
139
+
140
+
141
+
142
+ </li><li>
143
+
144
+ <div class="synopsis"><a name="M000002">GET /:grid5000-resource/versions/:version[.:format]<a></div>
145
+
146
+
147
+
148
+
149
+ <p>
150
+ Get info about a specific version.
151
+ </p>
152
+ <h2>URI parameters</h2>
153
+ <table>
154
+ <tr><td valign="top"><tt>grid5000-resource</tt>:</td><td>the URI of the grid5000 resource.
155
+
156
+ </td></tr>
157
+ <tr><td valign="top"><tt>version</tt>:</td><td>the version id (40 characters long) or a UNIX timestamp.
158
+
159
+ </td></tr>
160
+ </table>
161
+ <h2>Content-Types</h2>
162
+ <table>
163
+ <tr><td valign="top"><tt>application/json</tt>:</td><td>JSON
164
+
165
+ </td></tr>
166
+ <tr><td valign="top"><tt>application/xml</tt>:</td><td>XML
167
+
168
+ </td></tr>
169
+ </table>
170
+ <h2>Status codes</h2>
171
+ <table>
172
+ <tr><td valign="top"><tt>200</tt>:</td><td>OK.
173
+
174
+ </td></tr>
175
+ <tr><td valign="top"><tt>404</tt>:</td><td>the requested grid5000 resource cannot be found, or the requested version
176
+ does not exist.
177
+
178
+ </td></tr>
179
+ <tr><td valign="top"><tt>406</tt>:</td><td>the requested format is not available.
180
+
181
+ </td></tr>
182
+ </table>
183
+
184
+
185
+
186
+ </li></ol>
@@ -0,0 +1,12 @@
1
+ =begin markdown
2
+ Comment `code` is good.
3
+ =end
4
+ def x
5
+ return "whatever"
6
+ end
7
+ =begin markdown
8
+ Comment
9
+ =end
10
+ =begin javascript
11
+
12
+ =end
metadata ADDED
@@ -0,0 +1,89 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: docapi
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.5
5
+ platform: ruby
6
+ authors:
7
+ - Cyril Rohr
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-12-04 00:00:00 +01:00
13
+ default_executable: docapi
14
+ dependencies: []
15
+
16
+ description: RDoc template for generating API documentation.
17
+ email: cyril.rohr@gmail.com
18
+ executables:
19
+ - docapi
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - LICENSE
24
+ - README.rdoc
25
+ files:
26
+ - .document
27
+ - .gitignore
28
+ - LICENSE
29
+ - README.rdoc
30
+ - Rakefile
31
+ - VERSION
32
+ - bin/docapi
33
+ - docapi.gemspec
34
+ - files/javascripts/documentation/documentation.js
35
+ - files/javascripts/documentation/highlight.pack.js
36
+ - files/javascripts/documentation/jquery-1.3.2.min.js
37
+ - files/javascripts/documentation/jquery.tableofcontents.min.js
38
+ - files/stylesheets/documentation/highlighter/ascetic.css
39
+ - files/stylesheets/documentation/highlighter/brown_paper.css
40
+ - files/stylesheets/documentation/highlighter/brown_papersq.png
41
+ - files/stylesheets/documentation/highlighter/dark.css
42
+ - files/stylesheets/documentation/highlighter/default.css
43
+ - files/stylesheets/documentation/highlighter/far.css
44
+ - files/stylesheets/documentation/highlighter/github.css
45
+ - files/stylesheets/documentation/highlighter/idea.css
46
+ - files/stylesheets/documentation/highlighter/ir_black.css
47
+ - files/stylesheets/documentation/highlighter/magula.css
48
+ - files/stylesheets/documentation/highlighter/school_book.css
49
+ - files/stylesheets/documentation/highlighter/school_book.png
50
+ - files/stylesheets/documentation/highlighter/sunburst.css
51
+ - files/stylesheets/documentation/highlighter/vs.css
52
+ - files/stylesheets/documentation/highlighter/zenburn.css
53
+ - files/stylesheets/documentation/layout.css
54
+ - lib/docapi.rb
55
+ - test/code/reference_api.rb
56
+ - test/doc/1-README.md
57
+ - test/doc/2-documentation/documentation.html
58
+ - test/doc/3-tutorials/2-ruby/example-1.rb
59
+ has_rdoc: true
60
+ homepage: http://github.com/crohr/docapi
61
+ licenses: []
62
+
63
+ post_install_message:
64
+ rdoc_options:
65
+ - --charset=UTF-8
66
+ require_paths:
67
+ - lib
68
+ required_ruby_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: "0"
73
+ version:
74
+ required_rubygems_version: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: "0"
79
+ version:
80
+ requirements: []
81
+
82
+ rubyforge_project:
83
+ rubygems_version: 1.3.5
84
+ signing_key:
85
+ specification_version: 3
86
+ summary: RDoc template for generating API documentation.
87
+ test_files:
88
+ - test/code/reference_api.rb
89
+ - test/doc/3-tutorials/2-ruby/example-1.rb