arkecosystem-client 0.1.0 → 1.0.0

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.
@@ -1,22 +0,0 @@
1
- require 'arkecosystem/client/api/base'
2
-
3
- module ArkEcosystem
4
- module Client
5
- module API
6
- # Methods for Version 1 of the API
7
- #
8
- # @see https://docs.ark.io/v1.0/reference#api-v1-signatures
9
- module One
10
- # Methods for the Signatures API
11
- class Signatures < Base
12
- # Get the signatures fee.
13
- #
14
- # @return [Faraday::Response]
15
- def fee
16
- @client.get('signatures/fee')
17
- end
18
- end
19
- end
20
- end
21
- end
22
- end
@@ -1,51 +0,0 @@
1
- require 'arkecosystem/client/api/base'
2
-
3
- module ArkEcosystem
4
- module Client
5
- module API
6
- # Methods for Version 1 of the API
7
- #
8
- # @see https://docs.ark.io/v1.0/reference#api-v1-transactions
9
- module One
10
- # Methods for the Transactions API
11
- class Transactions < Base
12
- # Get all transactions.
13
- #
14
- # @param parameters [Hash]
15
- #
16
- # @return [Faraday::Response]
17
- def all(parameters = {})
18
- @client.get('transactions', parameters)
19
- end
20
-
21
- # Get the transaction by the given id.
22
- #
23
- # @param id [String]
24
- #
25
- # @return [Faraday::Response]
26
- def show(id)
27
- @client.get('transactions/get', id: id)
28
- end
29
-
30
- # Get all unconfirmed transactions.
31
- #
32
- # @param parameters [Hash]
33
- #
34
- # @return [Faraday::Response]
35
- def all_unconfirmed(parameters = {})
36
- @client.get('transactions/unconfirmed', parameters)
37
- end
38
-
39
- # Get the unconfirmed transaction by the given id.
40
- #
41
- # @param id [String]
42
- #
43
- # @return [Faraday::Response]
44
- def show_unconfirmed(id)
45
- @client.get('transactions/unconfirmed/get', id: id)
46
- end
47
- end
48
- end
49
- end
50
- end
51
- end
@@ -1,52 +0,0 @@
1
- require 'arkecosystem/client/api/base'
2
-
3
- module ArkEcosystem
4
- module Client
5
- module API
6
- # Methods for Version 2 of the API
7
- #
8
- # @see https://docs.ark.io/v1.0/reference#api-v2-blocks
9
- module Two
10
- # Methods for the Blocks API
11
- class Blocks < Base
12
- # Get all blocks.
13
- #
14
- # @param parameters [String]
15
- #
16
- # @return [Faraday::Response]
17
- def all(parameters = {})
18
- @client.get('blocks', parameters)
19
- end
20
-
21
- # Get the block by the given id.
22
- #
23
- # @param id [String]
24
- #
25
- # @return [Faraday::Response]
26
- def show(id)
27
- @client.get("blocks/#{id}")
28
- end
29
-
30
- # Get the transaction for the given block.
31
- #
32
- # @param id [String]
33
- # @param parameters [Hash]
34
- #
35
- # @return [Faraday::Response]
36
- def transactions(id, parameters = {})
37
- @client.get("blocks/#{id}/transactions", parameters)
38
- end
39
-
40
- # Search all blocks.
41
- #
42
- # @param parameters [Hash]
43
- #
44
- # @return [Faraday::Response]
45
- def search(parameters)
46
- @client.post('blocks/search', parameters)
47
- end
48
- end
49
- end
50
- end
51
- end
52
- end
@@ -1,53 +0,0 @@
1
- require 'arkecosystem/client/api/base'
2
-
3
- module ArkEcosystem
4
- module Client
5
- module API
6
- # Methods for Version 2 of the API
7
- #
8
- # @see https://docs.ark.io/v1.0/reference#api-v2-delegates
9
- module Two
10
- # Methods for the Delegates API
11
- class Delegates < Base
12
- # Get all delegates.
13
- #
14
- # @param parameters [Hash]
15
- #
16
- # @return [Faraday::Response]
17
- def all(parameters = {})
18
- @client.get('delegates', parameters)
19
- end
20
-
21
- # Get the delegate by the given id.
22
- #
23
- # @param id [String]
24
- #
25
- # @return [Faraday::Response]
26
- def show(id)
27
- @client.get("delegates/#{id}")
28
- end
29
-
30
- # Get the blocks for the given delegate.
31
- #
32
- # @param id [String]
33
- # @param parameters [Hash]
34
- #
35
- # @return [Faraday::Response]
36
- def blocks(id, parameters = {})
37
- @client.get("delegates/#{id}/blocks", parameters)
38
- end
39
-
40
- # Get the votes for the given delegate.
41
- #
42
- # @param id [String]
43
- # @param parameters [Hash]
44
- #
45
- # @return [Faraday::Response]
46
- def voters(id, parameters = {})
47
- @client.get("delegates/#{id}/voters", parameters)
48
- end
49
- end
50
- end
51
- end
52
- end
53
- end
@@ -1,36 +0,0 @@
1
- require 'arkecosystem/client/api/base'
2
-
3
- module ArkEcosystem
4
- module Client
5
- module API
6
- # Methods for Version 2 of the API
7
- #
8
- # @see https://docs.ark.io/v1.0/reference#api-v2-node
9
- module Two
10
- # Methods for the Node API
11
- class Node < Base
12
- # Get the loader status.
13
- #
14
- # @return [Faraday::Response]
15
- def status
16
- @client.get('node/status')
17
- end
18
-
19
- # Get the loader syncing status.
20
- #
21
- # @return [Faraday::Response]
22
- def syncing
23
- @client.get('node/syncing')
24
- end
25
-
26
- # Get the loader configuration.
27
- #
28
- # @return [Faraday::Response]
29
- def configuration
30
- @client.get('node/configuration')
31
- end
32
- end
33
- end
34
- end
35
- end
36
- end
@@ -1,33 +0,0 @@
1
- require 'arkecosystem/client/api/base'
2
-
3
- module ArkEcosystem
4
- module Client
5
- module API
6
- # Methods for Version 2 of the API
7
- #
8
- # @see https://docs.ark.io/v1.0/reference#api-v2-peers
9
- module Two
10
- # Methods for the Peers API
11
- class Peers < Base
12
- # Get all peers.
13
- #
14
- # @param parameters [Hash]
15
- #
16
- # @return [Faraday::Response]
17
- def all(parameters = {})
18
- @client.get('peers', parameters)
19
- end
20
-
21
- # Get the peer by the given ip.
22
- #
23
- # @param ip_addr [String]
24
- #
25
- # @return [Faraday::Response]
26
- def show(ip_addr)
27
- @client.get("peers/#{ip_addr}")
28
- end
29
- end
30
- end
31
- end
32
- end
33
- end
@@ -1,76 +0,0 @@
1
- require 'arkecosystem/client/api/base'
2
-
3
- module ArkEcosystem
4
- module Client
5
- module API
6
- # Methods for Version 2 of the API
7
- #
8
- # @see https://docs.ark.io/v1.0/reference#api-v2-transactions
9
- module Two
10
- # Methods for the Transactions API
11
- class Transactions < Base
12
- # Get all transactions.
13
- #
14
- # @param parameters [Hash]
15
- #
16
- # @return [Faraday::Response]
17
- def all(parameters = {})
18
- @client.get('transactions', parameters)
19
- end
20
-
21
- # Create new transactions.
22
- #
23
- # @param parameters [Hash]
24
- #
25
- # @return [Faraday::Response]
26
- def create(parameters)
27
- @client.post('transactions', parameters)
28
- end
29
-
30
- # Get the transaction by the given id.
31
- #
32
- # @param id [String]
33
- #
34
- # @return [Faraday::Response]
35
- def show(id)
36
- @client.get("transactions/#{id}")
37
- end
38
-
39
- # Get all unconfirmed transactions.
40
- #
41
- # @param parameters [Hash]
42
- #
43
- # @return [Faraday::Response]
44
- def all_unconfirmed(parameters = {})
45
- @client.get('transactions/unconfirmed', parameters)
46
- end
47
-
48
- # Get the unconfirmed transaction by the given id.
49
- #
50
- # @param id [String]
51
- #
52
- # @return [Faraday::Response]
53
- def show_unconfirmed(id)
54
- @client.get("transactions/unconfirmed/#{id}")
55
- end
56
-
57
- # Search all transactions.
58
- #
59
- # @param parameters [Hash]
60
- #
61
- # @return [Faraday::Response]
62
- def search(parameters)
63
- @client.post('transactions/search', parameters)
64
- end
65
-
66
- # Get a list of all transaction types.
67
- #
68
- # @return [Faraday::Response]
69
- def types
70
- @client.get('transactions/types')
71
- end
72
- end
73
- end
74
- end
75
- end
76
- end
@@ -1,33 +0,0 @@
1
- require 'arkecosystem/client/api/base'
2
-
3
- module ArkEcosystem
4
- module Client
5
- module API
6
- # Methods for Version 2 of the API
7
- #
8
- # @see https://docs.ark.io/v1.0/reference#api-v2-votes
9
- module Two
10
- # Methods for the Votes API
11
- class Votes < Base
12
- # Get all votes.
13
- #
14
- # @param parameters [Hash]
15
- #
16
- # @return [Faraday::Response]
17
- def all(parameters = {})
18
- @client.get('votes', parameters)
19
- end
20
-
21
- # Get the vote by the given id.
22
- #
23
- # @param id [String]
24
- #
25
- # @return [Faraday::Response]
26
- def show(id)
27
- @client.get("votes/#{id}")
28
- end
29
- end
30
- end
31
- end
32
- end
33
- end
@@ -1,90 +0,0 @@
1
- require 'arkecosystem/client/api/base'
2
-
3
- module ArkEcosystem
4
- module Client
5
- module API
6
- # Methods for Version 2 of the API
7
- #
8
- # @see https://docs.ark.io/v1.0/reference#api-v2-wallets
9
- module Two
10
- # Methods for the Wallets API
11
- class Wallets < Base
12
- # Get all wallets.
13
- #
14
- # @param parameters [Hash]
15
- #
16
- # @return [Faraday::Response]
17
- def all(parameters = {})
18
- @client.get('wallets', parameters)
19
- end
20
-
21
- # Get all wallets sorted by balance.
22
- #
23
- # @param parameters [Hash]
24
- #
25
- # @return [Faraday::Response]
26
- def top(parameters = {})
27
- @client.get('wallets/top', parameters)
28
- end
29
-
30
- # Get the wallet by the given id.
31
- #
32
- # @param id [String]
33
- #
34
- # @return [Faraday::Response]
35
- def show(id)
36
- @client.get("wallets/#{id}")
37
- end
38
-
39
- # Get the transactions for the given wallet.
40
- #
41
- # @param id [String]
42
- # @param parameters [Hash]
43
- #
44
- # @return [Faraday::Response]
45
- def transactions(id, parameters = {})
46
- @client.get("wallets/#{id}/transactions", parameters)
47
- end
48
-
49
- # Get the sent transactions for the given wallet.
50
- #
51
- # @param id [String]
52
- # @param parameters [Hash]
53
- #
54
- # @return [Faraday::Response]
55
- def sent_transactions(id, parameters = {})
56
- @client.get("wallets/#{id}/transactions/sent", parameters)
57
- end
58
-
59
- # Get the received transactions for the given wallet.
60
- #
61
- # @param id [String]
62
- # @param parameters [Hash]
63
- #
64
- # @return [Faraday::Response]
65
- def received_transaction(id, parameters = {})
66
- @client.get("wallets/#{id}/transactions/received", parameters)
67
- end
68
-
69
- # Get the votes for the given wallet.
70
- #
71
- # @param if [String]
72
- #
73
- # @return [Faraday::Response]
74
- def votes(id)
75
- @client.get("wallets/#{id}/votes")
76
- end
77
-
78
- # Search all wallets.
79
- #
80
- # @param parameters [Hash]
81
- #
82
- # @return [Faraday::Response]
83
- def search(parameters)
84
- @client.post('wallets/search', parameters)
85
- end
86
- end
87
- end
88
- end
89
- end
90
- end