cc-terminal 0.0.5 → 0.0.6
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.
- checksums.yaml +4 -4
- data/lib/terminal.rb +1 -0
- data/lib/terminal/api.rb +1 -6
- data/lib/terminal/modules/usage_and_credits.rb +55 -0
- data/lib/terminal/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd0647e6330a42db7f46eaffc0420ac2dc668964
|
4
|
+
data.tar.gz: c11854578f35eb1e3481c7c1afbf008a1284057c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 556e3451fda18ff3cbd9b6c1d4c2fe777ab82743545651846fb1b196338d860dd62cd8196699ccd1a6ff72febfa7765c7f3065baf1ef1ba62d4c92b59f25952a
|
7
|
+
data.tar.gz: 26688a09ba52fd9956f7df422bf153fe102f33a77be2979a02cfae609eeb355c6b2db5b7e0038c3590751caed93bbfb70ae54fbaf18c91c3fcf2d99ae12faef3
|
data/lib/terminal.rb
CHANGED
@@ -7,6 +7,7 @@ require "terminal/modules/create_and_manage_terminals"
|
|
7
7
|
require "terminal/modules/create_and_manage_snapshots"
|
8
8
|
require "terminal/modules/request_progress"
|
9
9
|
require "terminal/modules/browse_snapshots_and_users"
|
10
|
+
require "terminal/modules/usage_and_credits"
|
10
11
|
require "terminal/api"
|
11
12
|
require "terminal/request"
|
12
13
|
require "terminal/utils"
|
data/lib/terminal/api.rb
CHANGED
@@ -4,12 +4,7 @@ module Terminal
|
|
4
4
|
include Terminal::Modules::CreateAndManageTerminals
|
5
5
|
include Terminal::Modules::CreateAndManageSnapshots
|
6
6
|
include Terminal::Modules::RequestProgress
|
7
|
-
|
8
|
-
# include Terminal::Modules::ManageSnapshots
|
9
|
-
# include Terminal::Modules::BrowseSnapshots
|
10
|
-
# include Terminal::Modules::ManageUsers
|
11
|
-
# include Terminal::Modules::BrowseUsers
|
12
|
-
# include Terminal::Modules::ManageUsageAndCredits
|
7
|
+
include Terminal::Modules::UsageAndCredits
|
13
8
|
end
|
14
9
|
end
|
15
10
|
|
@@ -0,0 +1,55 @@
|
|
1
|
+
require 'terminal/utils'
|
2
|
+
|
3
|
+
module Terminal
|
4
|
+
module Modules
|
5
|
+
module UsageAndCredits
|
6
|
+
include Terminal::Utils
|
7
|
+
|
8
|
+
# Get the current balance of your account
|
9
|
+
#
|
10
|
+
# @see https://www.terminal.com/api/docs#balance
|
11
|
+
# @authentication Requires user_token and access_token
|
12
|
+
# @return [Hash] of balance as a key
|
13
|
+
def balance
|
14
|
+
options = {}
|
15
|
+
options[:auth] = true
|
16
|
+
perform(:post, 'balance', options)
|
17
|
+
end
|
18
|
+
|
19
|
+
# Get a history of charges to your account balance
|
20
|
+
#
|
21
|
+
# @see https://www.terminal.com/api/docs#burn-history
|
22
|
+
# @authentication Requires user_token and access_token
|
23
|
+
# @return [Hash] of history of account balance
|
24
|
+
def burn_history
|
25
|
+
options = {}
|
26
|
+
options[:auth] = true
|
27
|
+
perform(:post, 'burn_history', options)
|
28
|
+
end
|
29
|
+
|
30
|
+
# Get a summary of current active charges to your account balance
|
31
|
+
#
|
32
|
+
# @see https://www.terminal.com/api/docs#burn-state
|
33
|
+
# @authentication Requires user_token and access_token
|
34
|
+
# @return [Hash] of current account balance
|
35
|
+
def burn_state
|
36
|
+
options = {}
|
37
|
+
options[:auth] = true
|
38
|
+
perform(:post, 'burn_state', options)
|
39
|
+
end
|
40
|
+
|
41
|
+
# Get a summary of the chargers to your account, based on each Terminal
|
42
|
+
# instance to you have provisions
|
43
|
+
#
|
44
|
+
# @see https://www.terminal.com/api/docs#burn-estimates
|
45
|
+
# @authentication Requires user_token and access_token
|
46
|
+
# @return [Hash] of burn estimates
|
47
|
+
def burn_estimates
|
48
|
+
options = {}
|
49
|
+
options[:auth] = true
|
50
|
+
perform(:post, 'burn_estimates', options)
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
data/lib/terminal/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cc-terminal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Timor Tsentsiper
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -61,6 +61,7 @@ files:
|
|
61
61
|
- lib/terminal/modules/create_and_manage_snapshots.rb
|
62
62
|
- lib/terminal/modules/create_and_manage_terminals.rb
|
63
63
|
- lib/terminal/modules/request_progress.rb
|
64
|
+
- lib/terminal/modules/usage_and_credits.rb
|
64
65
|
- lib/terminal/request.rb
|
65
66
|
- lib/terminal/request/encode_json.rb
|
66
67
|
- lib/terminal/response/parse_json.rb
|