hetzner 0.0.9 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fac0ee13fb334c49349d3644ca56f8c3b5627d7c63faf08e4534885c67f6647b
4
- data.tar.gz: 28ea05f3afd9c38505e77633a5ead66d6ed1b0ce674cc6de7f66590bacda1666
3
+ metadata.gz: 8564112b50c1ebdc702892b47be85fcb7eb9b5c7cb58de764e9c727c7de0adc6
4
+ data.tar.gz: 1ee7d2a3f5e0f359255b30dc1692fe41e7c58af1c66a178493d3d612f1cbd3f1
5
5
  SHA512:
6
- metadata.gz: fd669ee716f7f5d932d83449f4929325a1a690dfca934e7cb16efdb9a2ae7de21379a1ef0a656b54cee89b08360952fa0df2a114c3d6e70e5da948ccc24c8c43
7
- data.tar.gz: f3ce36ac9f874e57f196ee232d462fe136c3dd28182225acbcd10e8216ed77f90c84bcfb166d883a175ef6c2e588dc7f39e52e59834eb5af5b1df3e2b727311d
6
+ metadata.gz: b4a62122c785ab66045a1417c26812ab5a6090f522d971522f909330d270cc163bd51f6569ee579048cc3911ba84e56a7a0f20f99066d63cd09a6e2932ab6109
7
+ data.tar.gz: fa778bd705d95a67bfb532ceaf0cb0dfe2696ca1509dbcfd917466925a58325924af1196f9ba5adc7c82a7fda4e192fd471c1e0d88111414ad9e1283d4fd295f
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
  require "faraday"
3
3
  require "oj"
4
+ Dir["commands/*.rb"].each {|file| require file }
4
5
 
5
6
  module Hetzner
6
7
  class Client
@@ -12,206 +13,6 @@ module Hetzner
12
13
  @api_token = api_token
13
14
  end
14
15
 
15
- def servers
16
- get("/v1/servers")
17
- end
18
-
19
- def server(id)
20
- get("/v1/servers/#{id}")
21
- end
22
-
23
- def server_actions(id)
24
- get("/v1/servers/#{id}/actions")
25
- end
26
-
27
- def server_action(id, action)
28
- get("/v1/servers/#{id}/actions/#{action}")
29
- end
30
-
31
- def server_types
32
- get("/v1/server_types")
33
- end
34
-
35
- def server_type(id)
36
- get("/v1/server_types/#{id}")
37
- end
38
-
39
- def pricing
40
- get("/v1/pricing")
41
- end
42
-
43
- def actions
44
- get("/v1/actions")
45
- end
46
-
47
- def action(id)
48
- get("/v1/actions/#{id}")
49
- end
50
-
51
- def certificates
52
- get("/v1/certificates")
53
- end
54
-
55
- def certificate(id)
56
- get("/v1/certificates/#{id}")
57
- end
58
-
59
- def certificate_actions(id)
60
- get("/v1/certificates/#{id}/actions")
61
- end
62
-
63
- def certificate_action(id, action)
64
- get("/v1/certificates/#{id}/actions/#{action}")
65
- end
66
-
67
- def datacenters
68
- get("/v1/datacenters")
69
- end
70
-
71
- def datacenter(id)
72
- get("/v1/datacenters/#{id}")
73
- end
74
-
75
- def firewalls
76
- get("/v1/firewalls")
77
- end
78
-
79
- def firewall(id)
80
- get("/v1/firewalls/#{id}")
81
- end
82
-
83
- def firewall_actions(id)
84
- get("/v1/firewalls/#{id}/actions")
85
- end
86
-
87
- def firewall_action(id, action)
88
- get("/v1/firewalls/#{id}/actions/#{action}")
89
- end
90
-
91
- def floating_ips
92
- get("/v1/floating_ips")
93
- end
94
-
95
- def floating_ip(id)
96
- get("/v1/floating_ips/#{id}")
97
- end
98
-
99
- def floating_ip_actions(id)
100
- get("/v1/floating_ips/#{id}/actions")
101
- end
102
-
103
- def floating_ip_action(id, action)
104
- get("/v1/floating_ips/#{id}/actions/#{action}")
105
- end
106
-
107
- def images
108
- get("/v1/images")
109
- end
110
-
111
- def image(id)
112
- get("/v1/images/#{id}")
113
- end
114
-
115
- def image_actions(id)
116
- get("/v1/images/#{id}/actions")
117
- end
118
-
119
- def image_action(id, action)
120
- get("/v1/images/#{id}/actions/#{action}")
121
- end
122
-
123
- def isos
124
- get("/v1/isos")
125
- end
126
-
127
- def iso(id)
128
- get("/v1/isos/#{id}")
129
- end
130
-
131
- def load_balancers
132
- get("/v1/load_balancers")
133
- end
134
-
135
- def load_balancer(id)
136
- get("/v1/load_balancers/#{id}")
137
- end
138
-
139
- def load_balancer_metrics(id)
140
- get("/v1/load_balancer/#{id}/metrics")
141
- end
142
-
143
- def load_balancer_actions(id)
144
- get("/v1/load_balancers/#{id}/actions")
145
- end
146
-
147
- def load_balancer_action(id, action)
148
- get("/v1/load_balancers/#{id}/actions/#{action}")
149
- end
150
-
151
- def load_balancer_types
152
- get("/v1/load_balancer_types")
153
- end
154
-
155
- def load_balancer_type(id)
156
- get("/v1/load_balancer_types/#{id}")
157
- end
158
-
159
- def locations
160
- get("/v1/locations")
161
- end
162
-
163
- def location(id)
164
- get("/v1/locations/#{id}")
165
- end
166
-
167
- def networks
168
- get("/v1/networks")
169
- end
170
-
171
- def network(id)
172
- get("/v1/networks/#{id}")
173
- end
174
-
175
- def network_actions(id)
176
- get("/v1/networks/#{id}/actions")
177
- end
178
-
179
- def network_action(id, action)
180
- get("/v1/networks/#{id}/actions/#{action}")
181
- end
182
-
183
- def placement_groups
184
- get("/v1/placement_groups")
185
- end
186
-
187
- def placement_group(id)
188
- get("/v1/placement_groups/#{id}")
189
- end
190
-
191
- def ssh_keys
192
- get("/v1/ssh_keys")
193
- end
194
-
195
- def ssh_key(id)
196
- get("/v1/ssh_keys/#{id}")
197
- end
198
-
199
- def volumes
200
- get("/v1/volumes")
201
- end
202
-
203
- def volume(id)
204
- get("/v1/volumes/#{id}")
205
- end
206
-
207
- def volume_actions(id)
208
- get("/v1/volumes/#{id}/actions")
209
- end
210
-
211
- def volume_action(id, action)
212
- get("/v1/volumes/#{id}/actions/#{action}")
213
- end
214
-
215
16
  private
216
17
 
217
18
  def client
@@ -0,0 +1,11 @@
1
+ module Hetzner
2
+ class Client
3
+ def actions
4
+ get("/v1/actions")
5
+ end
6
+
7
+ def action(id)
8
+ get("/v1/actions/#{id}")
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,19 @@
1
+ module Hetzner
2
+ class Client
3
+ def certificates
4
+ get("/v1/certificates")
5
+ end
6
+
7
+ def certificate(id)
8
+ get("/v1/certificates/#{id}")
9
+ end
10
+
11
+ def certificate_actions(id)
12
+ get("/v1/certificates/#{id}/actions")
13
+ end
14
+
15
+ def certificate_action(id, action)
16
+ get("/v1/certificates/#{id}/actions/#{action}")
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,11 @@
1
+ module Hetzner
2
+ class Client
3
+ def datacenters
4
+ get("/v1/datacenters")
5
+ end
6
+
7
+ def datacenter(id)
8
+ get("/v1/datacenters/#{id}")
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,19 @@
1
+ module Hetzner
2
+ class Client
3
+ def firewalls
4
+ get("/v1/firewalls")
5
+ end
6
+
7
+ def firewall(id)
8
+ get("/v1/firewalls/#{id}")
9
+ end
10
+
11
+ def firewall_actions(id)
12
+ get("/v1/firewalls/#{id}/actions")
13
+ end
14
+
15
+ def firewall_action(id, action)
16
+ get("/v1/firewalls/#{id}/actions/#{action}")
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ module Hetzner
2
+ class Client
3
+ def images
4
+ get("/v1/images")
5
+ end
6
+
7
+ def image(id)
8
+ get("/v1/images/#{id}")
9
+ end
10
+
11
+ def image_actions(id)
12
+ get("/v1/images/#{id}/actions")
13
+ end
14
+
15
+ def image_action(id, action)
16
+ get("/v1/images/#{id}/actions/#{action}")
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ module Hetzner
2
+ class Client
3
+ def floating_ips
4
+ get("/v1/floating_ips")
5
+ end
6
+
7
+ def floating_ip(id)
8
+ get("/v1/floating_ips/#{id}")
9
+ end
10
+
11
+ def floating_ip_actions(id)
12
+ get("/v1/floating_ips/#{id}/actions")
13
+ end
14
+
15
+ def floating_ip_action(id, action)
16
+ get("/v1/floating_ips/#{id}/actions/#{action}")
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,11 @@
1
+ module Hetzner
2
+ class Client
3
+ def isos
4
+ get("/v1/isos")
5
+ end
6
+
7
+ def iso(id)
8
+ get("/v1/isos/#{id}")
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,31 @@
1
+ module Hetzner
2
+ class Client
3
+ def load_balancers
4
+ get("/v1/load_balancers")
5
+ end
6
+
7
+ def load_balancer(id)
8
+ get("/v1/load_balancers/#{id}")
9
+ end
10
+
11
+ def load_balancer_metrics(id)
12
+ get("/v1/load_balancer/#{id}/metrics")
13
+ end
14
+
15
+ def load_balancer_actions(id)
16
+ get("/v1/load_balancers/#{id}/actions")
17
+ end
18
+
19
+ def load_balancer_action(id, action)
20
+ get("/v1/load_balancers/#{id}/actions/#{action}")
21
+ end
22
+
23
+ def load_balancer_types
24
+ get("/v1/load_balancer_types")
25
+ end
26
+
27
+ def load_balancer_type(id)
28
+ get("/v1/load_balancer_types/#{id}")
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,11 @@
1
+ module Hetzner
2
+ class Client
3
+ def locations
4
+ get("/v1/locations")
5
+ end
6
+
7
+ def location(id)
8
+ get("/v1/locations/#{id}")
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,19 @@
1
+ module Hetzner
2
+ class Client
3
+ def networks
4
+ get("/v1/networks")
5
+ end
6
+
7
+ def network(id)
8
+ get("/v1/networks/#{id}")
9
+ end
10
+
11
+ def network_actions(id)
12
+ get("/v1/networks/#{id}/actions")
13
+ end
14
+
15
+ def network_action(id, action)
16
+ get("/v1/networks/#{id}/actions/#{action}")
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,11 @@
1
+ module Hetzner
2
+ class Client
3
+ def placement_groups
4
+ get("/v1/placement_groups")
5
+ end
6
+
7
+ def placement_group(id)
8
+ get("/v1/placement_groups/#{id}")
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,7 @@
1
+ module Hetzner
2
+ class Client
3
+ def pricing
4
+ get("/v1/pricing")
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,27 @@
1
+ module Hetzner
2
+ class Client
3
+ def servers
4
+ get("/v1/servers")
5
+ end
6
+
7
+ def server(id)
8
+ get("/v1/servers/#{id}")
9
+ end
10
+
11
+ def server_actions(id)
12
+ get("/v1/servers/#{id}/actions")
13
+ end
14
+
15
+ def server_action(id, action)
16
+ get("/v1/servers/#{id}/actions/#{action}")
17
+ end
18
+
19
+ def server_types
20
+ get("/v1/server_types")
21
+ end
22
+
23
+ def server_type(id)
24
+ get("/v1/server_types/#{id}")
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,11 @@
1
+ module Hetzner
2
+ class Client
3
+ def ssh_keys
4
+ get("/v1/ssh_keys")
5
+ end
6
+
7
+ def ssh_key(id)
8
+ get("/v1/ssh_keys/#{id}")
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,19 @@
1
+ module Hetzner
2
+ class Client
3
+ def volumes
4
+ get("/v1/volumes")
5
+ end
6
+
7
+ def volume(id)
8
+ get("/v1/volumes/#{id}")
9
+ end
10
+
11
+ def volume_actions(id)
12
+ get("/v1/volumes/#{id}/actions")
13
+ end
14
+
15
+ def volume_action(id, action)
16
+ get("/v1/volumes/#{id}/actions/#{action}")
17
+ end
18
+ end
19
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Hetzner
4
- VERSION = "0.0.9"
4
+ VERSION = "0.0.13"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hetzner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abe Shalash
@@ -52,9 +52,23 @@ files:
52
52
  - Rakefile
53
53
  - bin/console
54
54
  - bin/setup
55
- - hetzner-0.0.8.gem
56
55
  - lib/hetzner.rb
57
56
  - lib/hetzner/client.rb
57
+ - lib/hetzner/commands/actions.rb
58
+ - lib/hetzner/commands/certificates.rb
59
+ - lib/hetzner/commands/datacenters.rb
60
+ - lib/hetzner/commands/firewalls.rb
61
+ - lib/hetzner/commands/images.rb
62
+ - lib/hetzner/commands/ips.rb
63
+ - lib/hetzner/commands/isos.rb
64
+ - lib/hetzner/commands/load_balancers.rb
65
+ - lib/hetzner/commands/locations.rb
66
+ - lib/hetzner/commands/networks.rb
67
+ - lib/hetzner/commands/placement_groups.rb
68
+ - lib/hetzner/commands/pricing.rb
69
+ - lib/hetzner/commands/servers.rb
70
+ - lib/hetzner/commands/ssh.rb
71
+ - lib/hetzner/commands/volumes.rb
58
72
  - lib/hetzner/version.rb
59
73
  - sig/hetzner.rbs
60
74
  homepage: https://github.com/Serviox/hetzner.git
data/hetzner-0.0.8.gem DELETED
Binary file