hetzner 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.DS_Store +0 -0
- data/lib/hetzner/client.rb +18 -4
- data/lib/hetzner/version.rb +1 -1
- metadata +2 -3
- data/hetzner-0.0.1.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b5ca0eac03202917aa68fe603eef4121927ee43953ba5b00f7c0fd150906432
|
4
|
+
data.tar.gz: dc7c1f2e2084aca567ae95a7006f24ec9ce35650c6fdf6bd86bf9f1f95a13d7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d480251d9901c2eedb0c20aa4642313032bc4327927e4a06aff07cf1a54f5e93b067f85915b9aa0b1b5ebf124a89605c296145c2e7751f7806f2af125f8dcafb
|
7
|
+
data.tar.gz: f14ec223b9d31434c7e519057b94b1191fc166c18fac47d521f36e8f995bf1bb2ced644c1a1cea810d566a52a9e752a36e8ae6a036c9a1b651214e755fce0980
|
data/.DS_Store
CHANGED
Binary file
|
data/lib/hetzner/client.rb
CHANGED
@@ -12,20 +12,34 @@ module Hetzner
|
|
12
12
|
@api_token = api_token
|
13
13
|
end
|
14
14
|
|
15
|
-
def
|
15
|
+
def server_types
|
16
16
|
request(
|
17
17
|
http_method: :get,
|
18
18
|
endpoint: "/server_types"
|
19
19
|
)
|
20
20
|
end
|
21
21
|
|
22
|
+
def server_type(id)
|
23
|
+
request(
|
24
|
+
http_method: :get,
|
25
|
+
endpoint: "/server_types/#{id}"
|
26
|
+
)
|
27
|
+
end
|
28
|
+
|
29
|
+
def pricing
|
30
|
+
request(
|
31
|
+
http_method: :get,
|
32
|
+
endpoint: "/pricing"
|
33
|
+
)
|
34
|
+
end
|
35
|
+
|
22
36
|
private
|
23
37
|
|
24
38
|
def client
|
25
39
|
@_client ||= Faraday.new(API_ENDPOINT) do |client|
|
26
|
-
|
27
|
-
|
28
|
-
|
40
|
+
client.request :url_encoded
|
41
|
+
client.adapter Faraday.default_adapter
|
42
|
+
client.headers['Authorization'] = "Bearer #{@api_token}" if @api_token.present?
|
29
43
|
end
|
30
44
|
end
|
31
45
|
|
data/lib/hetzner/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hetzner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Abe Shalash
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-12-
|
11
|
+
date: 2021-12-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -52,7 +52,6 @@ files:
|
|
52
52
|
- Rakefile
|
53
53
|
- bin/console
|
54
54
|
- bin/setup
|
55
|
-
- hetzner-0.0.1.gem
|
56
55
|
- lib/hetzner.rb
|
57
56
|
- lib/hetzner/client.rb
|
58
57
|
- lib/hetzner/version.rb
|
data/hetzner-0.0.1.gem
DELETED
Binary file
|