fdic 0.1.0 → 0.2.0

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
  SHA1:
3
- metadata.gz: add200a412197e304c2a7e2248ebf6a602e6b107
4
- data.tar.gz: 066321ccc3f906f473c0ee1fff106f7d06887a8c
3
+ metadata.gz: bc5a8ff797a755ee5bdad38dd9965d5abc5c9e7a
4
+ data.tar.gz: 91529a0138f771be7e9c45eebb47858b9864f9f7
5
5
  SHA512:
6
- metadata.gz: 6afed6e86475264c939298e6d17e785a29d636343a48426aa55d920939b8aaa8c2de58dfb3e35c8e70f11ea3e17e8755f835139ffbda0e3d256ac401727c5dcf
7
- data.tar.gz: 390906519e45984ddf10404b71495f1f5f671dd1efca79f89fadd606db87c25f8d24f9ab69fcf03ed3f2e8573abbd624096e7aba2233e1f899c13cafb3f9eeb5
6
+ metadata.gz: 400441df58e68ca125e0f894e5e101f417a328c31cc1aadee571ffc92c504685c3cabe35189770a1a2884e7f578af3adcb302844a0b3061c8ba127f93173b3eb
7
+ data.tar.gz: 76282f49a6c5defaafab038d03ec54f218444606d56d60cae9aab8f472e93b00bf88a3eaa0114a594f0557e3c421d3c98725da6af19cf854686402bd80abc1fb
data/README.md CHANGED
@@ -37,34 +37,44 @@ Or install it yourself as:
37
37
 
38
38
  ## Usage
39
39
 
40
- You can look up a Bank by its name, and find all matching Banks:
40
+ The FDIC API lets you find an Institution if you have its FDIC Certificate Number:
41
41
 
42
42
  ```
43
- # Returns an Array:
44
- FDIC.find_bank('Dedicated Community Bank') #=> [FDIC::Bank, FDIC::Bank, ...]
43
+ institution = FDIC.find_institution(26588) #=> FDIC::Institution
45
44
  ```
46
45
 
47
- You can look up an Institution by its FDIC Certificate number:
46
+ If you don't have the certificate number, you can search for a Bank by name, and get back all matching Banks:
48
47
 
49
48
  ```
50
- # Returns only one:
51
- FDIC.find_institution(26588) #=> FDIC::Institution
49
+ banks = FDIC.find_bank('Dedicated Community Bank') #=> [FDIC::Bank, FDIC::Bank, ...]
52
50
  ```
53
51
 
54
- You can look up a Bank's branches by its FDIC Certificate number:
52
+ Once you have a Bank, you can get its Institution, which has much more data available:
55
53
 
56
54
  ```
57
- # Returns an Array:
58
- FDIC.find_branches(25688) #=> [FDIC::Branch, FDIC::Branch, ...]
55
+ institution = banks.first.find_institution! # Bang, because it's another network request
59
56
  ```
60
57
 
61
- You can look up a Bank's history by its name and FDIC Certificate number:
58
+ The API also exposes information about an Institution's branches, and its history. You can query both of these on the FDIC module directly, or on the Institution:
62
59
 
63
60
  ```
64
- # Returns an Array:
65
- FDIC.find_history_events('Dedicated Community Bank', 26588) #=> [FDIC::HistoryEvent, ...]
61
+ institution.find_branches! #=> [FDIC::Branch, FDIC::Branch, ...]
62
+ FDIC.find_branches(25688) #=> [FDIC::Branch, FDIC::Branch, ...]
63
+
64
+ institution.find_history_events! #=> [FDIC::HistoryEvent, ...]
65
+ FDIC.find_history_events('Dedicated Community Bank', 26588) #=> [FDIC::HistoryEvent, ...]
66
+ ```
67
+
68
+ Since a `Bank` knows its certificate number, it can look up its branch and history information, too.
69
+
70
+ ```
71
+ # These work just like they do on Institutions:
72
+ bank.find_branches!
73
+ bank.find_history_events!
66
74
  ```
67
75
 
76
+ There are more fields exposed in the Institution API then what we've exposed. Where the field names are obscure or acronym-y, we'd like to clarify them; since we're pre-1.0, if we haven't looked up a field's meaning quite yet, we're holding off. (You can still get all the fields via `#attributes`.)
77
+
68
78
  ## Contributing
69
79
 
70
80
  Bug reports and pull requests are welcome on GitHub at https://github.com/ContinuityControl/fdic.
data/lib/fdic/bank.rb CHANGED
@@ -18,5 +18,9 @@ module FDIC
18
18
  def find_history_events!
19
19
  @history_events ||= FDIC.find_history_events(legal_name, certificate_number)
20
20
  end
21
+
22
+ def find_branches!
23
+ @branches ||= FDIC.find_branches(certificate_number)
24
+ end
21
25
  end
22
26
  end
data/lib/fdic/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module FDIC
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fdic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Reznick
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2015-08-03 00:00:00.000000000 Z
12
+ date: 2015-08-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty