bank_scrap 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +48 -12
- data/lib/bank_scrap/banks/bankinter.rb +0 -1
- data/lib/bank_scrap/banks/bbva.rb +2 -0
- data/lib/bank_scrap/version.rb +1 -1
- data/lib/bank_scrap.rb +4 -4
- 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: 0a37e0cd7f424b6fcd7be561a34ea7990060f41a
|
4
|
+
data.tar.gz: 5f14a99961d2b82846a51c55d7df5f817e2e87b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef3a7d2ccc0312098bb22a5e70fbf5a31f768cd9c72fbe208691965886aff8d143a7c1532766d68fff2cb8487a961f05fabf828d6a9fdd5849d751c066a7b55c
|
7
|
+
data.tar.gz: b92c5292be30ec7f56e9e5e361e8d6be65c4528d4f33fc24bedfe91493f3fe697cf164c14798c6517b331083c15c4db932bd27ca5d284334886e4c9e5d46f27f
|
data/README.md
CHANGED
@@ -2,13 +2,28 @@
|
|
2
2
|
|
3
3
|
Ruby gem to extract balance and transactions from banks. You can use it either as command line tool or as a library.
|
4
4
|
|
5
|
-
The aim of this project is to build a library which interacts with some of the most used banks. We already know how boring is to look for your balance on the web, so let's do it with the command line.
|
6
|
-
|
7
5
|
Feel free to contribute and add your bank if it isn't supported.
|
8
6
|
|
9
7
|
## Supported banks
|
10
8
|
- Bankinter
|
11
|
-
- BBVA
|
9
|
+
- BBVA (only balance, transactions soon)
|
10
|
+
|
11
|
+
Work in progress:
|
12
|
+
- ING
|
13
|
+
|
14
|
+
Interested in any other bank? Open a new Issue and we'll try to help.
|
15
|
+
|
16
|
+
## Background and motivation
|
17
|
+
|
18
|
+
Most banks don't offer public APIs and the only way to access your data (balance and transactions) is through their websites... and most bank websites are a f*cking nightmare.
|
19
|
+
|
20
|
+
We are developers and we don't want to waste time doing things we are able to automate. Having to perform 20 clicks in an awful website just to check how much money we have is not something we like.
|
21
|
+
|
22
|
+
There are two approaches to solve this problem:
|
23
|
+
- Web scraping on the bank's site.
|
24
|
+
- Reverse engineering the bank's mobile app to use the same API the app uses.
|
25
|
+
|
26
|
+
Bankscrap uses both methods depending on the bank.
|
12
27
|
|
13
28
|
## Requirements
|
14
29
|
|
@@ -16,31 +31,52 @@ Some banks needs a JavaScript runtime in order to work. So if you find an error
|
|
16
31
|
|
17
32
|
## Installation
|
18
33
|
|
19
|
-
|
34
|
+
### From Git
|
20
35
|
|
21
|
-
|
22
|
-
|
23
|
-
|
36
|
+
You can check out the latest source from git:
|
37
|
+
|
38
|
+
git clone git://github.com/ismaGNU/bank_scrap
|
39
|
+
|
40
|
+
### From RubyGems
|
24
41
|
|
25
|
-
|
42
|
+
Installation from RubyGems:
|
26
43
|
|
27
|
-
|
44
|
+
gem install bank_scrap
|
28
45
|
|
29
|
-
Or
|
46
|
+
Or, if you're using Bundler, just add the following to your Gemfile:
|
30
47
|
|
31
|
-
|
48
|
+
gem 'bank_scrap'
|
32
49
|
|
33
50
|
## Usage
|
34
51
|
|
52
|
+
### From terminal
|
35
53
|
Retrieve balance account
|
36
54
|
|
37
55
|
$ bank_scrap balance BANK_NAME --user YOUR_USER --password YOUR_PASSWORD
|
38
56
|
|
39
57
|
BANK_NAME should be in underscore case (`bankinter`, `bbva`).
|
40
58
|
|
59
|
+
### From Ruby code
|
60
|
+
|
61
|
+
You can also use this gem from your own app as library. To do so first you must initialize a Bankscrapper::Bank object
|
62
|
+
|
63
|
+
```ruby
|
64
|
+
require 'bank_scrap'
|
65
|
+
@bank = BankScrap::Bbva.new(YOUR_BBVA_USER, YOUR_BBVA_PASSWORD)
|
66
|
+
```
|
67
|
+
|
68
|
+
(Replace Bbva with your own bank)
|
69
|
+
|
70
|
+
Now you can fetch your balance:
|
71
|
+
|
72
|
+
```ruby
|
73
|
+
@bank.get_balance
|
74
|
+
```
|
75
|
+
|
76
|
+
|
41
77
|
## Contributing
|
42
78
|
|
43
|
-
1. Fork it ( https://github.com/
|
79
|
+
1. Fork it ( https://github.com/ismaGNU/bank_scrap/fork )
|
44
80
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
45
81
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
46
82
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/lib/bank_scrap/version.rb
CHANGED
data/lib/bank_scrap.rb
CHANGED
@@ -2,9 +2,9 @@ require 'bank_scrap/version'
|
|
2
2
|
require 'bank_scrap/cli'
|
3
3
|
require 'bank_scrap/bank'
|
4
4
|
|
5
|
-
# TODO: load banks dynamically
|
6
|
-
require 'bank_scrap/banks/bankinter'
|
7
|
-
require 'bank_scrap/banks/bbva'
|
8
|
-
|
9
5
|
module BankScrap
|
6
|
+
# autoload only requires the file when the specified
|
7
|
+
# constant is used for the first time
|
8
|
+
autoload :Bankinter, 'bank_scrap/banks/bankinter'
|
9
|
+
autoload :Bbva, 'bank_scrap/banks/bbva'
|
10
10
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bank_scrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ismael Sánchez
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-11-
|
14
|
+
date: 2014-11-02 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|