fdic 0.1.0 → 0.2.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.
- checksums.yaml +4 -4
- data/README.md +22 -12
- data/lib/fdic/bank.rb +4 -0
- data/lib/fdic/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc5a8ff797a755ee5bdad38dd9965d5abc5c9e7a
|
4
|
+
data.tar.gz: 91529a0138f771be7e9c45eebb47858b9864f9f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
40
|
+
The FDIC API lets you find an Institution if you have its FDIC Certificate Number:
|
41
41
|
|
42
42
|
```
|
43
|
-
|
44
|
-
FDIC.find_bank('Dedicated Community Bank') #=> [FDIC::Bank, FDIC::Bank, ...]
|
43
|
+
institution = FDIC.find_institution(26588) #=> FDIC::Institution
|
45
44
|
```
|
46
45
|
|
47
|
-
|
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
|
-
|
51
|
-
FDIC.find_institution(26588) #=> FDIC::Institution
|
49
|
+
banks = FDIC.find_bank('Dedicated Community Bank') #=> [FDIC::Bank, FDIC::Bank, ...]
|
52
50
|
```
|
53
51
|
|
54
|
-
|
52
|
+
Once you have a Bank, you can get its Institution, which has much more data available:
|
55
53
|
|
56
54
|
```
|
57
|
-
#
|
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
|
-
|
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
|
-
|
65
|
-
FDIC.
|
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
data/lib/fdic/version.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2015-08-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|