diff options
author | David McMackins II <contact@mcmackins.org> | 2015-08-24 10:31:00 -0500 |
---|---|---|
committer | David McMackins II <contact@mcmackins.org> | 2015-08-24 10:31:00 -0500 |
commit | 2c512acd6c91d6d79b44ebbbcae2af91470306d5 (patch) | |
tree | 0083e402b7a2dde71dce049ef8bdc9bf65536fe5 | |
parent | d54509fa7b231f96e7cdd659e007f84ae40ce159 (diff) |
Added CryptoCoin charts plugin
-rw-r--r-- | plugins/ccc.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/plugins/ccc.py b/plugins/ccc.py new file mode 100644 index 0000000..6da59e4 --- /dev/null +++ b/plugins/ccc.py @@ -0,0 +1,28 @@ +## +## coinfetch-api-ccc - CryptoCoin Charts API plugin for coinfetch +## Copyright (C) 2015 Delwink, LLC +## +## This program is free software: you can redistribute it and/or modify +## it under the terms of the GNU Affero General Public License as published by +## the Free Software Foundation, version 3 only. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU Affero General Public License for more details. +## +## You should have received a copy of the GNU Affero General Public License +## along with this program. If not, see <http://www.gnu.org/licenses/>. +## + +from coinfetch import register_ticker, Ticker + +class CccTicker(Ticker): + def __init__(self, path, kind='price'): + super().__init__(path, kind) + + def get_pair_data(self, response, pair=None): + return response.json() + +register_ticker('ccc', 'The CryptoCoin Charts ticker', + CccTicker('http://api.cryptocoincharts.info/tradingPair/')) |