finapps 0.0.16.pre → 0.0.17.pre
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/finapps/rest/client.rb +6 -1
- data/lib/finapps/rest/institutions.rb +2 -2
- data/lib/finapps/rest/users.rb +1 -0
- data/lib/finapps/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47fcc75ca928b988ae5d066eda4e8220517c516d
|
4
|
+
data.tar.gz: c06290cc44ae7027033abca8285a5f3023d7b57c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 190fb00200d1e600ba1d7f07ee00f9c7c03aa817ee4cbfad811451785055e403b8a737422c4d249d07fa4fccc84ff43fde2abb32cb9002705b9bbff372355070
|
7
|
+
data.tar.gz: 0232a0734e5afeb619c29bb2f869744c8bd5c57e446324d8fafc7c8bf46b5214035defb0e6836cdf907b1a1b405affc1a8ed0dd8951ea90469a8ddf36a91eba2
|
data/lib/finapps/rest/client.rb
CHANGED
@@ -43,11 +43,14 @@ module FinApps
|
|
43
43
|
# @return [Hash,Array<String>]
|
44
44
|
def get(path, &proc)
|
45
45
|
logger.debug "##{__method__.to_s} => Started"
|
46
|
+
raise MissingArgumentsError.new 'Missing argument: path.' if path.blank?
|
46
47
|
response, result, error_messages = nil, nil, nil
|
47
48
|
|
48
49
|
begin
|
49
50
|
logger.debug "##{__method__.to_s} => GET path:#{path}"
|
50
|
-
response = @connection.get
|
51
|
+
response = @connection.get do |req|
|
52
|
+
req.url path
|
53
|
+
end
|
51
54
|
if response.present? && block_given?
|
52
55
|
result = proc.call(response)
|
53
56
|
logger.debug "##{__method__.to_s} => parsed result: #{result.pretty_inspect}" if result.present?
|
@@ -72,6 +75,7 @@ module FinApps
|
|
72
75
|
# @return [Hash,Array<String>]
|
73
76
|
def post(path, params = {}, &proc)
|
74
77
|
logger.debug "##{__method__.to_s} => Started"
|
78
|
+
raise MissingArgumentsError.new 'Missing argument: path.' if path.blank?
|
75
79
|
response, result, error_messages = nil, nil, nil
|
76
80
|
|
77
81
|
begin
|
@@ -104,6 +108,7 @@ module FinApps
|
|
104
108
|
# @return [Hash,Array<String>]
|
105
109
|
def delete(path, params = {}, &proc)
|
106
110
|
logger.debug "##{__method__.to_s} => Started"
|
111
|
+
raise MissingArgumentsError.new 'Missing argument: path.' if path.blank?
|
107
112
|
response, result, error_messages = nil, nil, nil
|
108
113
|
|
109
114
|
begin
|
@@ -2,6 +2,7 @@ module FinApps
|
|
2
2
|
module REST
|
3
3
|
|
4
4
|
class Institutions < FinApps::REST::Resources
|
5
|
+
include FinApps::REST::Defaults
|
5
6
|
|
6
7
|
# @param [String] term
|
7
8
|
# @return [Array<FinApps::REST::Institution>, Array<String>]
|
@@ -11,7 +12,7 @@ module FinApps
|
|
11
12
|
raise MissingArgumentsError.new 'Missing argument: term.' if term.blank?
|
12
13
|
logger.debug "##{__method__.to_s} => term: #{term}"
|
13
14
|
|
14
|
-
path = END_POINTS[:institutions_search].sub! ':search_term', term.to_s
|
15
|
+
path = Defaults::END_POINTS[:institutions_search].sub! ':search_term', term.to_s
|
15
16
|
logger.debug "##{__method__.to_s} => path: #{path}"
|
16
17
|
|
17
18
|
institutions, error_messages = @client.get(path) do |r|
|
@@ -22,7 +23,6 @@ module FinApps
|
|
22
23
|
return institutions, error_messages
|
23
24
|
end
|
24
25
|
|
25
|
-
|
26
26
|
end
|
27
27
|
|
28
28
|
class Institution < FinApps::REST::Resource
|
data/lib/finapps/rest/users.rb
CHANGED
data/lib/finapps/version.rb
CHANGED