1and1 1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (290) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +2 -0
  3. data/1and1-1.0.gem +0 -0
  4. data/1and1.gemspec +20 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE +201 -0
  7. data/README.md +499 -0
  8. data/docs/reference.md +2447 -0
  9. data/examples/dvd_examples.rb +15 -0
  10. data/examples/example_app.rb +100 -0
  11. data/examples/firewall_examples.rb +137 -0
  12. data/examples/image_examples.rb +48 -0
  13. data/examples/load_balancer_examples.rb +145 -0
  14. data/examples/log_examples.rb +15 -0
  15. data/examples/monitoring_center_examples.rb +15 -0
  16. data/examples/monitoring_policy_examples.rb +343 -0
  17. data/examples/private_network_examples.rb +86 -0
  18. data/examples/public_ip_examples.rb +42 -0
  19. data/examples/role_examples.rb +113 -0
  20. data/examples/server_appliance_examples.rb +15 -0
  21. data/examples/server_examples.rb +438 -0
  22. data/examples/shared_storage_examples.rb +108 -0
  23. data/examples/usage_examples.rb +6 -0
  24. data/examples/user_examples.rb +113 -0
  25. data/examples/vpn_examples.rb +56 -0
  26. data/lib/1and1/datacenter.rb +73 -0
  27. data/lib/1and1/dvd.rb +73 -0
  28. data/lib/1and1/firewall.rb +427 -0
  29. data/lib/1and1/image.rb +231 -0
  30. data/lib/1and1/load_balancer.rb +448 -0
  31. data/lib/1and1/log.rb +77 -0
  32. data/lib/1and1/monitoring_center.rb +84 -0
  33. data/lib/1and1/monitoring_policy.rb +598 -0
  34. data/lib/1and1/oneandone.rb +57 -0
  35. data/lib/1and1/ping.rb +41 -0
  36. data/lib/1and1/ping_auth.rb +41 -0
  37. data/lib/1and1/pricing.rb +41 -0
  38. data/lib/1and1/private_network.rb +333 -0
  39. data/lib/1and1/public_ip.rb +192 -0
  40. data/lib/1and1/role.rb +381 -0
  41. data/lib/1and1/server.rb +1208 -0
  42. data/lib/1and1/server_appliance.rb +73 -0
  43. data/lib/1and1/shared_storage.rb +379 -0
  44. data/lib/1and1/usage.rb +58 -0
  45. data/lib/1and1/user.rb +374 -0
  46. data/lib/1and1/vpn.rb +249 -0
  47. data/lib/oneandone.rb +27 -0
  48. data/sphinx/Makefile +192 -0
  49. data/sphinx/_build/doctrees/dvds.doctree +0 -0
  50. data/sphinx/_build/doctrees/environment.pickle +0 -0
  51. data/sphinx/_build/doctrees/firewalls.doctree +0 -0
  52. data/sphinx/_build/doctrees/images.doctree +0 -0
  53. data/sphinx/_build/doctrees/index.doctree +0 -0
  54. data/sphinx/_build/doctrees/load_balancers.doctree +0 -0
  55. data/sphinx/_build/doctrees/logs.doctree +0 -0
  56. data/sphinx/_build/doctrees/monitoring_center.doctree +0 -0
  57. data/sphinx/_build/doctrees/monitoring_policies.doctree +0 -0
  58. data/sphinx/_build/doctrees/private_networks.doctree +0 -0
  59. data/sphinx/_build/doctrees/public_ips.doctree +0 -0
  60. data/sphinx/_build/doctrees/server_appliances.doctree +0 -0
  61. data/sphinx/_build/doctrees/servers.doctree +0 -0
  62. data/sphinx/_build/doctrees/shared_storages.doctree +0 -0
  63. data/sphinx/_build/doctrees/usages.doctree +0 -0
  64. data/sphinx/_build/doctrees/users.doctree +0 -0
  65. data/sphinx/_build/html/.buildinfo +4 -0
  66. data/sphinx/_build/html/_sources/dvds.txt +42 -0
  67. data/sphinx/_build/html/_sources/firewalls.txt +189 -0
  68. data/sphinx/_build/html/_sources/images.txt +101 -0
  69. data/sphinx/_build/html/_sources/index.txt +499 -0
  70. data/sphinx/_build/html/_sources/load_balancers.txt +231 -0
  71. data/sphinx/_build/html/_sources/logs.txt +55 -0
  72. data/sphinx/_build/html/_sources/monitoring_center.txt +55 -0
  73. data/sphinx/_build/html/_sources/monitoring_policies.txt +288 -0
  74. data/sphinx/_build/html/_sources/private_networks.txt +146 -0
  75. data/sphinx/_build/html/_sources/public_ips.txt +78 -0
  76. data/sphinx/_build/html/_sources/server_appliances.txt +42 -0
  77. data/sphinx/_build/html/_sources/servers.txt +630 -0
  78. data/sphinx/_build/html/_sources/shared_storages.txt +160 -0
  79. data/sphinx/_build/html/_sources/usages.txt +45 -0
  80. data/sphinx/_build/html/_sources/users.txt +172 -0
  81. data/sphinx/_build/html/_static/ajax-loader.gif +0 -0
  82. data/sphinx/_build/html/_static/alabaster.css +585 -0
  83. data/sphinx/_build/html/_static/basic.css +599 -0
  84. data/sphinx/_build/html/_static/comment-bright.png +0 -0
  85. data/sphinx/_build/html/_static/comment-close.png +0 -0
  86. data/sphinx/_build/html/_static/comment.png +0 -0
  87. data/sphinx/_build/html/_static/doctools.js +263 -0
  88. data/sphinx/_build/html/_static/down-pressed.png +0 -0
  89. data/sphinx/_build/html/_static/down.png +0 -0
  90. data/sphinx/_build/html/_static/file.png +0 -0
  91. data/sphinx/_build/html/_static/jquery-1.11.1.js +10308 -0
  92. data/sphinx/_build/html/_static/jquery.js +4 -0
  93. data/sphinx/_build/html/_static/minus.png +0 -0
  94. data/sphinx/_build/html/_static/plus.png +0 -0
  95. data/sphinx/_build/html/_static/pygments.css +63 -0
  96. data/sphinx/_build/html/_static/searchtools.js +651 -0
  97. data/sphinx/_build/html/_static/underscore-1.3.1.js +999 -0
  98. data/sphinx/_build/html/_static/underscore.js +31 -0
  99. data/sphinx/_build/html/_static/up-pressed.png +0 -0
  100. data/sphinx/_build/html/_static/up.png +0 -0
  101. data/sphinx/_build/html/_static/websupport.js +808 -0
  102. data/sphinx/_build/html/dvds.html +151 -0
  103. data/sphinx/_build/html/firewalls.html +397 -0
  104. data/sphinx/_build/html/genindex.html +114 -0
  105. data/sphinx/_build/html/images.html +236 -0
  106. data/sphinx/_build/html/index.html +571 -0
  107. data/sphinx/_build/html/load_balancers.html +409 -0
  108. data/sphinx/_build/html/logs.html +160 -0
  109. data/sphinx/_build/html/monitoring_center.html +160 -0
  110. data/sphinx/_build/html/monitoring_policies.html +530 -0
  111. data/sphinx/_build/html/objects.inv +0 -0
  112. data/sphinx/_build/html/private_networks.html +316 -0
  113. data/sphinx/_build/html/public_ips.html +215 -0
  114. data/sphinx/_build/html/rb-modindex.html +106 -0
  115. data/sphinx/_build/html/search.html +99 -0
  116. data/sphinx/_build/html/searchindex.js +1 -0
  117. data/sphinx/_build/html/server_appliances.html +153 -0
  118. data/sphinx/_build/html/servers.html +994 -0
  119. data/sphinx/_build/html/shared_storages.html +349 -0
  120. data/sphinx/_build/html/usages.html +140 -0
  121. data/sphinx/_build/html/users.html +363 -0
  122. data/sphinx/conf.py +287 -0
  123. data/sphinx/dvds.rst +42 -0
  124. data/sphinx/firewalls.rst +189 -0
  125. data/sphinx/images.rst +101 -0
  126. data/sphinx/index.rst +499 -0
  127. data/sphinx/load_balancers.rst +231 -0
  128. data/sphinx/logs.rst +55 -0
  129. data/sphinx/make.bat +263 -0
  130. data/sphinx/monitoring_center.rst +55 -0
  131. data/sphinx/monitoring_policies.rst +288 -0
  132. data/sphinx/private_networks.rst +146 -0
  133. data/sphinx/public_ips.rst +78 -0
  134. data/sphinx/server_appliances.rst +42 -0
  135. data/sphinx/servers.rst +630 -0
  136. data/sphinx/shared_storages.rst +160 -0
  137. data/sphinx/usages.rst +45 -0
  138. data/sphinx/users.rst +172 -0
  139. data/test/mock-api/add-firewall.json +66 -0
  140. data/test/mock-api/add-hdd.json +49 -0
  141. data/test/mock-api/add-lb.json +71 -0
  142. data/test/mock-api/add-new-ip.json +18 -0
  143. data/test/mock-api/add-pn.json +66 -0
  144. data/test/mock-api/add-port-mp.json +81 -0
  145. data/test/mock-api/add-process-mp.json +20 -0
  146. data/test/mock-api/add-rule-fp.json +33 -0
  147. data/test/mock-api/add-rule-lb.json +40 -0
  148. data/test/mock-api/add-server-ip.json +66 -0
  149. data/test/mock-api/add-server-mp.json +66 -0
  150. data/test/mock-api/assign-ip-fp.json +32 -0
  151. data/test/mock-api/assign-server-lb.json +39 -0
  152. data/test/mock-api/attach-server-pn.json +14 -0
  153. data/test/mock-api/attach-server-storage.json +24 -0
  154. data/test/mock-api/change-api-key.json +15 -0
  155. data/test/mock-api/change-password.json +5 -0
  156. data/test/mock-api/change-server-status.json +70 -0
  157. data/test/mock-api/clone-server.json +29 -0
  158. data/test/mock-api/create-fp.json +26 -0
  159. data/test/mock-api/create-image.json +30 -0
  160. data/test/mock-api/create-lb.json +33 -0
  161. data/test/mock-api/create-mp.json +81 -0
  162. data/test/mock-api/create-pn.json +11 -0
  163. data/test/mock-api/create-public-ip.json +10 -0
  164. data/test/mock-api/create-server.json +34 -0
  165. data/test/mock-api/create-snapshot.json +74 -0
  166. data/test/mock-api/create-storage.json +13 -0
  167. data/test/mock-api/create-user.json +14 -0
  168. data/test/mock-api/delete-fp.json +26 -0
  169. data/test/mock-api/delete-image.json +26 -0
  170. data/test/mock-api/delete-ip.json +15 -0
  171. data/test/mock-api/delete-lb.json +33 -0
  172. data/test/mock-api/delete-mp.json +71 -0
  173. data/test/mock-api/delete-pn.json +11 -0
  174. data/test/mock-api/delete-public-ip.json +10 -0
  175. data/test/mock-api/delete-rule-fp.json +26 -0
  176. data/test/mock-api/delete-server.json +50 -0
  177. data/test/mock-api/delete-snapshot.json +74 -0
  178. data/test/mock-api/delete-storage.json +24 -0
  179. data/test/mock-api/delete-user.json +15 -0
  180. data/test/mock-api/detach-server-lb.json +33 -0
  181. data/test/mock-api/detach-server-mp.json +65 -0
  182. data/test/mock-api/detach-server-storage.json +19 -0
  183. data/test/mock-api/edit-image.json +26 -0
  184. data/test/mock-api/eject-dvd.json +66 -0
  185. data/test/mock-api/fixed-server-flavors.json +70 -0
  186. data/test/mock-api/get-appliance.json +16 -0
  187. data/test/mock-api/get-dvd.json +9 -0
  188. data/test/mock-api/get-firewall.json +26 -0
  189. data/test/mock-api/get-fixed-server.json +17 -0
  190. data/test/mock-api/get-fp-rule.json +7 -0
  191. data/test/mock-api/get-hardware.json +13 -0
  192. data/test/mock-api/get-hdd.json +5 -0
  193. data/test/mock-api/get-image.json +26 -0
  194. data/test/mock-api/get-lb-rule.json +7 -0
  195. data/test/mock-api/get-lb-server.json +5 -0
  196. data/test/mock-api/get-load-balancer.json +33 -0
  197. data/test/mock-api/get-log.json +23 -0
  198. data/test/mock-api/get-monitoring-center.json +161 -0
  199. data/test/mock-api/get-mp-port.json +7 -0
  200. data/test/mock-api/get-mp-process.json +6 -0
  201. data/test/mock-api/get-mp-server.json +4 -0
  202. data/test/mock-api/get-mp.json +65 -0
  203. data/test/mock-api/get-pn-server.json +4 -0
  204. data/test/mock-api/get-private-network.json +20 -0
  205. data/test/mock-api/get-public-ip.json +10 -0
  206. data/test/mock-api/get-server-dvd.json +4 -0
  207. data/test/mock-api/get-server-image.json +4 -0
  208. data/test/mock-api/get-server-ip-fp.json +4 -0
  209. data/test/mock-api/get-server-ip.json +8 -0
  210. data/test/mock-api/get-server-pn.json +16 -0
  211. data/test/mock-api/get-server-status.json +4 -0
  212. data/test/mock-api/get-server-storage.json +5 -0
  213. data/test/mock-api/get-server.json +44 -0
  214. data/test/mock-api/get-storage.json +19 -0
  215. data/test/mock-api/get-usage.json +161 -0
  216. data/test/mock-api/get-user-api-key.json +3 -0
  217. data/test/mock-api/get-user-api.json +7 -0
  218. data/test/mock-api/get-user.json +15 -0
  219. data/test/mock-api/list-appliances.json +66 -0
  220. data/test/mock-api/list-credentials.json +5 -0
  221. data/test/mock-api/list-dvds.json +128 -0
  222. data/test/mock-api/list-firewalls.json +54 -0
  223. data/test/mock-api/list-fp-rules.json +16 -0
  224. data/test/mock-api/list-hdds.json +7 -0
  225. data/test/mock-api/list-images.json +54 -0
  226. data/test/mock-api/list-lb-rules.json +16 -0
  227. data/test/mock-api/list-lb-servers.json +12 -0
  228. data/test/mock-api/list-load-balancers.json +68 -0
  229. data/test/mock-api/list-logs.json +49 -0
  230. data/test/mock-api/list-monitoring-center-usages.json +90 -0
  231. data/test/mock-api/list-mp-ports.json +16 -0
  232. data/test/mock-api/list-mp-processes.json +14 -0
  233. data/test/mock-api/list-mp-servers.json +10 -0
  234. data/test/mock-api/list-mps.json +152 -0
  235. data/test/mock-api/list-pn-servers.json +10 -0
  236. data/test/mock-api/list-private-networks.json +24 -0
  237. data/test/mock-api/list-public-ips.json +44 -0
  238. data/test/mock-api/list-server-fps.json +4 -0
  239. data/test/mock-api/list-server-ips-fp.json +7 -0
  240. data/test/mock-api/list-server-ips.json +10 -0
  241. data/test/mock-api/list-server-lbs.json +6 -0
  242. data/test/mock-api/list-server-pns.json +6 -0
  243. data/test/mock-api/list-servers.json +66 -0
  244. data/test/mock-api/list-snapshots.json +7 -0
  245. data/test/mock-api/list-storages.json +47 -0
  246. data/test/mock-api/list-usages.json +144 -0
  247. data/test/mock-api/list-user-ips.json +5 -0
  248. data/test/mock-api/list-users.json +31 -0
  249. data/test/mock-api/load-dvd.json +63 -0
  250. data/test/mock-api/modify-fp.json +26 -0
  251. data/test/mock-api/modify-lb.json +33 -0
  252. data/test/mock-api/modify-mp.json +81 -0
  253. data/test/mock-api/modify-pn.json +20 -0
  254. data/test/mock-api/modify-port-mp.json +81 -0
  255. data/test/mock-api/modify-process-mp.json +73 -0
  256. data/test/mock-api/modify-public-ip.json +10 -0
  257. data/test/mock-api/modify-server-hardware.json +44 -0
  258. data/test/mock-api/modify-server-hdd.json +54 -0
  259. data/test/mock-api/modify-server.json +44 -0
  260. data/test/mock-api/modify-storage.json +19 -0
  261. data/test/mock-api/modify-user-api.json +15 -0
  262. data/test/mock-api/modify-user.json +15 -0
  263. data/test/mock-api/reinstall-image.json +52 -0
  264. data/test/mock-api/remove-firewall-policy.json +26 -0
  265. data/test/mock-api/remove-hdd.json +54 -0
  266. data/test/mock-api/remove-ip-fp.json +26 -0
  267. data/test/mock-api/remove-lb.json +66 -0
  268. data/test/mock-api/remove-pn.json +71 -0
  269. data/test/mock-api/remove-port-mp.json +73 -0
  270. data/test/mock-api/remove-process-mp.json +66 -0
  271. data/test/mock-api/remove-rule-lb.json +33 -0
  272. data/test/mock-api/remove-server-ip.json +58 -0
  273. data/test/mock-api/remove-server-pn.json +16 -0
  274. data/test/mock-api/restore-snapshot.json +55 -0
  275. data/test/mock-api/storage-servers.json +12 -0
  276. data/test/test_mock_dvd.rb +55 -0
  277. data/test/test_mock_firewall.rb +309 -0
  278. data/test/test_mock_image.rb +123 -0
  279. data/test/test_mock_load_balancer.rb +312 -0
  280. data/test/test_mock_log.rb +55 -0
  281. data/test/test_mock_monitoring_center.rb +55 -0
  282. data/test/test_mock_monitoring_policy.rb +587 -0
  283. data/test/test_mock_private_network.rb +206 -0
  284. data/test/test_mock_public_ip.rb +118 -0
  285. data/test/test_mock_server.rb +929 -0
  286. data/test/test_mock_server_appliance.rb +55 -0
  287. data/test/test_mock_shared_storage.rb +256 -0
  288. data/test/test_mock_usage.rb +34 -0
  289. data/test/test_mock_user.rb +270 -0
  290. metadata +360 -0
@@ -0,0 +1,160 @@
1
+ Shared Storages
2
+ *****************
3
+
4
+ .. rb:class:: OneAndOne::SharedStorage()
5
+
6
+ The :rb:class:`SharedStorage` class allows a user to perform actions against the 1and1 API.
7
+
8
+
9
+ .. rb:method:: list(page: nil, per_page: nil, sort: nil, q: nil, fields: nil)
10
+
11
+ Return a list of all shared storages.
12
+
13
+ :param page: Allows the use of pagination. Indicate which page to start on.
14
+ :type page: ``int``
15
+
16
+ :param per_page: Number of items per page.
17
+ :type per_page: ``int``
18
+
19
+ :param sort: ``sort: 'name'`` retrieves a list of elements sorted
20
+ alphabetically. ``sort: 'creation_date'`` retrieves a list of elements
21
+ sorted by their creation date in descending order.
22
+ :type sort: ``str``
23
+
24
+ :param q: ``q`` is for query. Use this parameter to return only the items
25
+ that match your search query.
26
+ :type q: ``str``
27
+
28
+ :param fields: Returns only the parameters requested.
29
+ (i.e. fields: 'id, name, description, hardware.ram')
30
+ :type fields: ``str``
31
+
32
+ :rtype: JSON
33
+
34
+
35
+ .. rb:method:: create(name: nil, description: nil, size: nil)
36
+
37
+ Create a shared storage.
38
+
39
+ :param name: shared storage name.
40
+ :type name: ``str``
41
+
42
+ :param description: shared storage description.
43
+ :type description: ``str``
44
+
45
+ :param size: shared storage size.
46
+ :type size: ``int``
47
+
48
+ :rtype: JSON
49
+
50
+
51
+ .. rb:method:: get(shared_storage_id: @id)
52
+
53
+ Returns a shared storage's current specs.
54
+
55
+ :param shared_storage_id: the unique identifier for the shared storage.
56
+ :type shared_storage_id: ``str``
57
+
58
+ :rtype: JSON
59
+
60
+
61
+ .. rb:method:: modify(shared_storage_id: @id, name: nil, description: nil, size: nil)
62
+
63
+ Modify a shared storage.
64
+
65
+ :param shared_storage_id: the unique identifier for the shared storage.
66
+ :type shared_storage_id: ``str``
67
+
68
+ :param name: shared storage name.
69
+ :type name: ``str``
70
+
71
+ :param description: shared storage description.
72
+ :type description: ``str``
73
+
74
+ :param size: shared storage size. Must be a multiple of ``50``.
75
+ :type size: ``int``
76
+
77
+ :rtype: JSON
78
+
79
+
80
+ .. rb:method:: delete(shared_storage_id: @id)
81
+
82
+ Delete a shared storage.
83
+
84
+ :param shared_storage_id: the unique identifier for the shared storage.
85
+ :type shared_storage_id: ``str``
86
+
87
+ :rtype: JSON
88
+
89
+
90
+ .. rb:method:: add_servers(shared_storage_id: @id, servers: nil)
91
+
92
+ Add servers to a shared storage.
93
+
94
+ :param shared_storage_id: the unique identifier for the shared storage.
95
+ :type shared_storage_id: ``str``
96
+
97
+ :param servers: an array of server hashes.
98
+ :type servers: ``array``
99
+
100
+ :rtype: JSON
101
+
102
+
103
+ .. rb:method:: servers(shared_storage_id: @id)
104
+
105
+ List a shared storage's servers.
106
+
107
+ :param shared_storage_id: the unique identifier for the shared storage.
108
+ :type shared_storage_id: ``str``
109
+
110
+ :rtype: JSON
111
+
112
+
113
+ .. rb:method:: server(shared_storage_id: @id, server_id: nil)
114
+
115
+ Returns information about a shared storage's server.
116
+
117
+ :param shared_storage_id: the unique identifier for the shared storage.
118
+ :type shared_storage_id: ``str``
119
+
120
+ :param server_id: the unique identifier for the server.
121
+ :type server_id: ``str``
122
+
123
+ :rtype: JSON
124
+
125
+
126
+ .. rb:method:: remove_server(shared_storage_id: @id, server_id: nil)
127
+
128
+ Remove a server from a shared storage.
129
+
130
+ :param shared_storage_id: the unique identifier for the shared storage.
131
+ :type shared_storage_id: ``str``
132
+
133
+ :param server_id: the unique identifier for the server.
134
+ :type server_id: ``str``
135
+
136
+ :rtype: JSON
137
+
138
+
139
+ .. rb:method:: access()
140
+
141
+ Retrieve the credentials for accessing shared storages.
142
+
143
+ :rtype: JSON
144
+
145
+
146
+ .. rb:method:: change_password(password: nil)
147
+
148
+ Change the password for accessing shared storages.
149
+
150
+ :param password: new shared storage password.
151
+ :type password: ``str``
152
+
153
+ :rtype: JSON
154
+
155
+
156
+ .. rb:method:: wait_for()
157
+
158
+ Polls the shared storage until an "ACTIVE" state is returned. Use this when chaining actions.
159
+
160
+ :rtype: ``nil``
@@ -0,0 +1,45 @@
1
+ Usages
2
+ *****************
3
+
4
+ .. rb:class:: OneAndOne::Usage()
5
+
6
+ The :rb:class:`Usage` class allows a user to perform actions against the 1and1 API.
7
+
8
+
9
+ .. rb:method:: list(page: nil, per_page: nil, sort: nil, q: nil, fields: nil, period: 'LAST_24H', start_date: nil, end_date: nil)
10
+
11
+ List all usages by time period.
12
+
13
+ :param page: Allows the use of pagination. Indicate which page to start on.
14
+ :type page: ``int``
15
+
16
+ :param per_page: Number of items per page.
17
+ :type per_page: ``int``
18
+
19
+ :param sort: ``sort: 'name'`` retrieves a list of elements sorted
20
+ alphabetically. ``sort: 'creation_date'`` retrieves a list of elements
21
+ sorted by their creation date in descending order.
22
+ :type sort: ``str``
23
+
24
+ :param q: ``q`` is for query. Use this parameter to return only the items
25
+ that match your search query.
26
+ :type q: ``str``
27
+
28
+ :param fields: Returns only the parameters requested.
29
+ (i.e. fields: 'id, name, description, hardware.ram')
30
+ :type fields: ``str``
31
+
32
+ :param period: the time range of logs to be shown. Possible values are
33
+ ``'LAST_HOUR'``, ``'LAST_24H'``, ``'LAST_7D'``, ``'LAST_30D'``,
34
+ ``'LAST_365D'``, or ``'CUSTOM'``
35
+ :type period: ``str``
36
+
37
+ :param start_date: start point. Only required if using ``'CUSTOM'`` for the
38
+ ``period`` parameter. *Format:* ``2015-19-05T00:05:00Z``
39
+ :type start_date: ``str``
40
+
41
+ :param end_date: end point. Only required if using ``'CUSTOM'`` for the
42
+ ``period`` parameter. *Format:* ``2015-19-05T00:10:00Z``
43
+ :type end_date: ``str``
44
+
45
+ :rtype: JSON
@@ -0,0 +1,172 @@
1
+ Users
2
+ *****************
3
+
4
+ .. rb:class:: OneAndOne::User()
5
+
6
+ The :rb:class:`User` class allows a user to perform actions against the 1and1 API.
7
+
8
+
9
+ .. rb:method:: list(page: nil, per_page: nil, sort: nil, q: nil, fields: nil)
10
+
11
+ List all users on your account.
12
+
13
+ :param page: Allows the use of pagination. Indicate which page to start on.
14
+ :type page: ``int``
15
+
16
+ :param per_page: Number of items per page.
17
+ :type per_page: ``int``
18
+
19
+ :param sort: ``sort: 'name'`` retrieves a list of elements sorted
20
+ alphabetically. ``sort: 'creation_date'`` retrieves a list of elements
21
+ sorted by their creation date in descending order.
22
+ :type sort: ``str``
23
+
24
+ :param q: ``q`` is for query. Use this parameter to return only the items
25
+ that match your search query.
26
+ :type q: ``str``
27
+
28
+ :param fields: Returns only the parameters requested.
29
+ (i.e. fields: 'id, name, description, hardware.ram')
30
+ :type fields: ``str``
31
+
32
+ :rtype: JSON
33
+
34
+
35
+ .. rb:method:: create(name: nil, description: nil, password: nil, email: nil)
36
+
37
+ Create a new user account.
38
+
39
+ :param name: user name.
40
+ :type name: ``str``
41
+
42
+ :param description: user description.
43
+ :type description: ``str``
44
+
45
+ :param password: user password.
46
+ :type password: ``str``
47
+
48
+ :param email: user email.
49
+ :type email: ``str``
50
+
51
+ :rtype: JSON
52
+
53
+
54
+ .. rb:method:: get(user_id: @id)
55
+
56
+ Returns a user account's current specs.
57
+
58
+ :param user_id: the unique identifier for the user.
59
+ :type user_id: ``str``
60
+
61
+ :rtype: JSON
62
+
63
+
64
+ .. rb:method:: modify(user_id: @id, description: nil, password: nil, email: nil, state: nil)
65
+
66
+ Modify a user account.
67
+
68
+ :param user_id: the unique identifier for the user.
69
+ :type user_id: ``str``
70
+
71
+ :param password: user password.
72
+ :type password: ``str``
73
+
74
+ :param email: user email.
75
+ :type email: ``str``
76
+
77
+ :param description: user description.
78
+ :type description: ``str``
79
+
80
+ :param state: allows you to enable and disable users. Possible values are ``"ACTIVE"`` or ``"DISABLE"``.
81
+ :type state: ``str``
82
+
83
+ :rtype: JSON
84
+
85
+
86
+ .. rb:method:: delete(user_id: @id)
87
+
88
+ Delete a user account.
89
+
90
+ :param user_id: the unique identifier for the user.
91
+ :type user_id: ``str``
92
+
93
+ :rtype: JSON
94
+
95
+
96
+ .. rb:method:: api(user_id: @id)
97
+
98
+ Return a user's API access credentials.
99
+
100
+ :param user_id: the unique identifier for the user.
101
+ :type user_id: ``str``
102
+
103
+ :rtype: JSON
104
+
105
+
106
+ .. rb:method:: enable_api(user_id: @id, active: nil)
107
+
108
+ Enable or disable a user's API access.
109
+
110
+ :param user_id: the unique identifier for the user.
111
+ :type user_id: ``str``
112
+
113
+ :param active: API access.
114
+ :type active: ``bool``
115
+
116
+ :rtype: JSON
117
+
118
+
119
+ .. rb:method:: api_key(user_id: @id)
120
+
121
+ Return a user's API key.
122
+
123
+ :param user_id: the unique identifier for the user.
124
+ :type user_id: ``str``
125
+
126
+ :rtype: JSON
127
+
128
+
129
+ .. rb:method:: change_key(user_id: @id)
130
+
131
+ Change a user's API key.
132
+
133
+ :param user_id: the unique identifier for the user.
134
+ :type user_id: ``str``
135
+
136
+ :rtype: JSON
137
+
138
+
139
+ .. rb:method:: ips(user_id: @id)
140
+
141
+ List the IP's from which a user can access the API.
142
+
143
+ :param user_id: the unique identifier for the user.
144
+ :type user_id: ``str``
145
+
146
+ :rtype: JSON
147
+
148
+
149
+ .. rb:method:: add_ips(user_id: @id, ips: nil)
150
+
151
+ Add IP's from which a user can access the API.
152
+
153
+ :param user_id: the unique identifier for the user.
154
+ :type user_id: ``str``
155
+
156
+ :param ips: an array containing at least one IP string.
157
+ :type ips: ``array``
158
+
159
+ :rtype: JSON
160
+
161
+
162
+ .. rb:method:: remove_ip(user_id: @id, ip: nil)
163
+
164
+ Remove API access for an IP.
165
+
166
+ :param user_id: the unique identifier for the user.
167
+ :type user_id: ``str``
168
+
169
+ :param ip: IP to be removed.
170
+ :type ip: ``str``
171
+
172
+ :rtype: JSON
@@ -0,0 +1,585 @@
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+ @import url("basic.css");
19
+
20
+ /* -- page layout ----------------------------------------------------------- */
21
+
22
+ body {
23
+ font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro', serif;
24
+ font-size: 17px;
25
+ background-color: white;
26
+ color: #000;
27
+ margin: 0;
28
+ padding: 0;
29
+ }
30
+
31
+ div.document {
32
+ width: 940px;
33
+ margin: 30px auto 0 auto;
34
+ }
35
+
36
+ div.documentwrapper {
37
+ float: left;
38
+ width: 100%;
39
+ }
40
+
41
+ div.bodywrapper {
42
+ margin: 0 0 0 220px;
43
+ }
44
+
45
+ div.sphinxsidebar {
46
+ width: 220px;
47
+ }
48
+
49
+ hr {
50
+ border: 1px solid #B1B4B6;
51
+ }
52
+
53
+ div.body {
54
+ background-color: #ffffff;
55
+ color: #3E4349;
56
+ padding: 0 30px 0 30px;
57
+ }
58
+
59
+ div.footer {
60
+ width: 940px;
61
+ margin: 20px auto 30px auto;
62
+ font-size: 14px;
63
+ color: #888;
64
+ text-align: right;
65
+ }
66
+
67
+ div.footer a {
68
+ color: #888;
69
+ }
70
+
71
+
72
+ div.relations {
73
+ display: none;
74
+ }
75
+
76
+
77
+ div.sphinxsidebar a {
78
+ color: #444;
79
+ text-decoration: none;
80
+ border-bottom: 1px dotted #999;
81
+ }
82
+
83
+ div.sphinxsidebar a:hover {
84
+ border-bottom: 1px solid #999;
85
+ }
86
+
87
+ div.sphinxsidebar {
88
+ font-size: 14px;
89
+ line-height: 1.5;
90
+ }
91
+
92
+ div.sphinxsidebarwrapper {
93
+ padding: 18px 10px;
94
+ }
95
+
96
+ div.sphinxsidebarwrapper p.logo {
97
+ padding: 0;
98
+ margin: -10px 0 0 0px;
99
+ text-align: center;
100
+ }
101
+
102
+ div.sphinxsidebarwrapper h1.logo {
103
+ margin-top: -10px;
104
+ text-align: center;
105
+ margin-bottom: 5px;
106
+ text-align: left;
107
+ }
108
+
109
+ div.sphinxsidebarwrapper h1.logo-name {
110
+ margin-top: 0px;
111
+ }
112
+
113
+ div.sphinxsidebarwrapper p.blurb {
114
+ margin-top: 0;
115
+ font-style: normal;
116
+ }
117
+
118
+ div.sphinxsidebar h3,
119
+ div.sphinxsidebar h4 {
120
+ font-family: 'Garamond', 'Georgia', serif;
121
+ color: #444;
122
+ font-size: 24px;
123
+ font-weight: normal;
124
+ margin: 0 0 5px 0;
125
+ padding: 0;
126
+ }
127
+
128
+ div.sphinxsidebar h4 {
129
+ font-size: 20px;
130
+ }
131
+
132
+ div.sphinxsidebar h3 a {
133
+ color: #444;
134
+ }
135
+
136
+ div.sphinxsidebar p.logo a,
137
+ div.sphinxsidebar h3 a,
138
+ div.sphinxsidebar p.logo a:hover,
139
+ div.sphinxsidebar h3 a:hover {
140
+ border: none;
141
+ }
142
+
143
+ div.sphinxsidebar p {
144
+ color: #555;
145
+ margin: 10px 0;
146
+ }
147
+
148
+ div.sphinxsidebar ul {
149
+ margin: 10px 0;
150
+ padding: 0;
151
+ color: #000;
152
+ }
153
+
154
+ div.sphinxsidebar ul li.toctree-l1 > a {
155
+ font-size: 120%;
156
+ }
157
+
158
+ div.sphinxsidebar ul li.toctree-l2 > a {
159
+ font-size: 110%;
160
+ }
161
+
162
+ div.sphinxsidebar input {
163
+ border: 1px solid #CCC;
164
+ font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro', serif;
165
+ font-size: 1em;
166
+ }
167
+
168
+ div.sphinxsidebar hr {
169
+ border: none;
170
+ height: 1px;
171
+ color: #999;
172
+ background: #999;
173
+
174
+ text-align: left;
175
+ margin-left: 0;
176
+ width: 50%;
177
+ }
178
+
179
+ /* -- body styles ----------------------------------------------------------- */
180
+
181
+ a {
182
+ color: #004B6B;
183
+ text-decoration: underline;
184
+ }
185
+
186
+ a:hover {
187
+ color: #6D4100;
188
+ text-decoration: underline;
189
+ }
190
+
191
+ div.body h1,
192
+ div.body h2,
193
+ div.body h3,
194
+ div.body h4,
195
+ div.body h5,
196
+ div.body h6 {
197
+ font-family: 'Garamond', 'Georgia', serif;
198
+ font-weight: normal;
199
+ margin: 30px 0px 10px 0px;
200
+ padding: 0;
201
+ }
202
+
203
+ div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; }
204
+ div.body h2 { font-size: 180%; }
205
+ div.body h3 { font-size: 150%; }
206
+ div.body h4 { font-size: 130%; }
207
+ div.body h5 { font-size: 100%; }
208
+ div.body h6 { font-size: 100%; }
209
+
210
+ a.headerlink {
211
+ color: #DDD;
212
+ padding: 0 4px;
213
+ text-decoration: none;
214
+ }
215
+
216
+ a.headerlink:hover {
217
+ color: #444;
218
+ background: #EAEAEA;
219
+ }
220
+
221
+ div.body p, div.body dd, div.body li {
222
+ line-height: 1.4em;
223
+ }
224
+
225
+ div.admonition {
226
+ margin: 20px 0px;
227
+ padding: 10px 30px;
228
+ background-color: #FCC;
229
+ border: 1px solid #FAA;
230
+ }
231
+
232
+ div.admonition tt.xref, div.admonition a tt {
233
+ border-bottom: 1px solid #fafafa;
234
+ }
235
+
236
+ dd div.admonition {
237
+ margin-left: -60px;
238
+ padding-left: 60px;
239
+ }
240
+
241
+ div.admonition p.admonition-title {
242
+ font-family: 'Garamond', 'Georgia', serif;
243
+ font-weight: normal;
244
+ font-size: 24px;
245
+ margin: 0 0 10px 0;
246
+ padding: 0;
247
+ line-height: 1;
248
+ }
249
+
250
+ div.admonition p.last {
251
+ margin-bottom: 0;
252
+ }
253
+
254
+ div.highlight {
255
+ background-color: white;
256
+ }
257
+
258
+ dt:target, .highlight {
259
+ background: #FAF3E8;
260
+ }
261
+
262
+ div.note {
263
+ background-color: #EEE;
264
+ border: 1px solid #CCC;
265
+ }
266
+
267
+ div.seealso {
268
+ background-color: #EEE;
269
+ border: 1px solid #CCC;
270
+ }
271
+
272
+ div.topic {
273
+ background-color: #eee;
274
+ }
275
+
276
+ p.admonition-title {
277
+ display: inline;
278
+ }
279
+
280
+ p.admonition-title:after {
281
+ content: ":";
282
+ }
283
+
284
+ pre, tt, code {
285
+ font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
286
+ font-size: 0.9em;
287
+ }
288
+
289
+ .hll {
290
+ background-color: #FFC;
291
+ margin: 0 -12px;
292
+ padding: 0 12px;
293
+ display: block;
294
+ }
295
+
296
+ img.screenshot {
297
+ }
298
+
299
+ tt.descname, tt.descclassname, code.descname, code.descclassname {
300
+ font-size: 0.95em;
301
+ }
302
+
303
+ tt.descname, code.descname {
304
+ padding-right: 0.08em;
305
+ }
306
+
307
+ img.screenshot {
308
+ -moz-box-shadow: 2px 2px 4px #eee;
309
+ -webkit-box-shadow: 2px 2px 4px #eee;
310
+ box-shadow: 2px 2px 4px #eee;
311
+ }
312
+
313
+ table.docutils {
314
+ border: 1px solid #888;
315
+ -moz-box-shadow: 2px 2px 4px #eee;
316
+ -webkit-box-shadow: 2px 2px 4px #eee;
317
+ box-shadow: 2px 2px 4px #eee;
318
+ }
319
+
320
+ table.docutils td, table.docutils th {
321
+ border: 1px solid #888;
322
+ padding: 0.25em 0.7em;
323
+ }
324
+
325
+ table.field-list, table.footnote {
326
+ border: none;
327
+ -moz-box-shadow: none;
328
+ -webkit-box-shadow: none;
329
+ box-shadow: none;
330
+ }
331
+
332
+ table.footnote {
333
+ margin: 15px 0;
334
+ width: 100%;
335
+ border: 1px solid #EEE;
336
+ background: #FDFDFD;
337
+ font-size: 0.9em;
338
+ }
339
+
340
+ table.footnote + table.footnote {
341
+ margin-top: -15px;
342
+ border-top: none;
343
+ }
344
+
345
+ table.field-list th {
346
+ padding: 0 0.8em 0 0;
347
+ }
348
+
349
+ table.field-list td {
350
+ padding: 0;
351
+ }
352
+
353
+ table.footnote td.label {
354
+ width: 0px;
355
+ padding: 0.3em 0 0.3em 0.5em;
356
+ }
357
+
358
+ table.footnote td {
359
+ padding: 0.3em 0.5em;
360
+ }
361
+
362
+ dl {
363
+ margin: 0;
364
+ padding: 0;
365
+ }
366
+
367
+ dl dd {
368
+ margin-left: 30px;
369
+ }
370
+
371
+ blockquote {
372
+ margin: 0 0 0 30px;
373
+ padding: 0;
374
+ }
375
+
376
+ ul, ol {
377
+ margin: 10px 0 10px 30px;
378
+ padding: 0;
379
+ }
380
+
381
+ pre {
382
+ background: #EEE;
383
+ padding: 7px 30px;
384
+ margin: 15px 0px;
385
+ line-height: 1.3em;
386
+ }
387
+
388
+ dl pre, blockquote pre, li pre {
389
+ margin-left: 0;
390
+ padding-left: 30px;
391
+ }
392
+
393
+ dl dl pre {
394
+ margin-left: -90px;
395
+ padding-left: 90px;
396
+ }
397
+
398
+ tt, code {
399
+ background-color: #ecf0f3;
400
+ color: #222;
401
+ /* padding: 1px 2px; */
402
+ }
403
+
404
+ tt.xref, code.xref, a tt {
405
+ background-color: #FBFBFB;
406
+ border-bottom: 1px solid white;
407
+ }
408
+
409
+ a.reference {
410
+ text-decoration: none;
411
+ border-bottom: 1px dotted #004B6B;
412
+ }
413
+
414
+ a.reference:hover {
415
+ border-bottom: 1px solid #6D4100;
416
+ }
417
+
418
+ a.footnote-reference {
419
+ text-decoration: none;
420
+ font-size: 0.7em;
421
+ vertical-align: top;
422
+ border-bottom: 1px dotted #004B6B;
423
+ }
424
+
425
+ a.footnote-reference:hover {
426
+ border-bottom: 1px solid #6D4100;
427
+ }
428
+
429
+ a:hover tt, a:hover code {
430
+ background: #EEE;
431
+ }
432
+
433
+
434
+ @media screen and (max-width: 870px) {
435
+
436
+ div.sphinxsidebar {
437
+ display: none;
438
+ }
439
+
440
+ div.document {
441
+ width: 100%;
442
+
443
+ }
444
+
445
+ div.documentwrapper {
446
+ margin-left: 0;
447
+ margin-top: 0;
448
+ margin-right: 0;
449
+ margin-bottom: 0;
450
+ }
451
+
452
+ div.bodywrapper {
453
+ margin-top: 0;
454
+ margin-right: 0;
455
+ margin-bottom: 0;
456
+ margin-left: 0;
457
+ }
458
+
459
+ ul {
460
+ margin-left: 0;
461
+ }
462
+
463
+ .document {
464
+ width: auto;
465
+ }
466
+
467
+ .footer {
468
+ width: auto;
469
+ }
470
+
471
+ .bodywrapper {
472
+ margin: 0;
473
+ }
474
+
475
+ .footer {
476
+ width: auto;
477
+ }
478
+
479
+ .github {
480
+ display: none;
481
+ }
482
+
483
+
484
+
485
+ }
486
+
487
+
488
+
489
+ @media screen and (max-width: 875px) {
490
+
491
+ body {
492
+ margin: 0;
493
+ padding: 20px 30px;
494
+ }
495
+
496
+ div.documentwrapper {
497
+ float: none;
498
+ background: white;
499
+ }
500
+
501
+ div.sphinxsidebar {
502
+ display: block;
503
+ float: none;
504
+ width: 102.5%;
505
+ margin: 50px -30px -20px -30px;
506
+ padding: 10px 20px;
507
+ background: #333;
508
+ color: #FFF;
509
+ }
510
+
511
+ div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p,
512
+ div.sphinxsidebar h3 a {
513
+ color: white;
514
+ }
515
+
516
+ div.sphinxsidebar a {
517
+ color: #AAA;
518
+ }
519
+
520
+ div.sphinxsidebar p.logo {
521
+ display: none;
522
+ }
523
+
524
+ div.document {
525
+ width: 100%;
526
+ margin: 0;
527
+ }
528
+
529
+ div.footer {
530
+ display: none;
531
+ }
532
+
533
+ div.bodywrapper {
534
+ margin: 0;
535
+ }
536
+
537
+ div.body {
538
+ min-height: 0;
539
+ padding: 0;
540
+ }
541
+
542
+ .rtd_doc_footer {
543
+ display: none;
544
+ }
545
+
546
+ .document {
547
+ width: auto;
548
+ }
549
+
550
+ .footer {
551
+ width: auto;
552
+ }
553
+
554
+ .footer {
555
+ width: auto;
556
+ }
557
+
558
+ .github {
559
+ display: none;
560
+ }
561
+ }
562
+
563
+
564
+ /* misc. */
565
+
566
+ .revsys-inline {
567
+ display: none!important;
568
+ }
569
+
570
+ /* Make nested-list/multi-paragraph items look better in Releases changelog
571
+ * pages. Without this, docutils' magical list fuckery causes inconsistent
572
+ * formatting between different release sub-lists.
573
+ */
574
+ div#changelog > div.section > ul > li > p:only-child {
575
+ margin-bottom: 0;
576
+ }
577
+
578
+ /* Hide fugly table cell borders in ..bibliography:: directive output */
579
+ table.docutils.citation, table.docutils.citation td, table.docutils.citation th {
580
+ border: none;
581
+ /* Below needed in some edge cases; if not applied, bottom shadows appear */
582
+ -moz-box-shadow: none;
583
+ -webkit-box-shadow: none;
584
+ box-shadow: none;
585
+ }