forked from nschairer/CryptoParser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCoin.js
More file actions
57 lines (44 loc) · 1.29 KB
/
Coin.js
File metadata and controls
57 lines (44 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
class Coin {
constructor(id, name, symbol) {
this.id = id;
this.name = name;
this.symbol = symbol;
}
};
//CoinMarketCap ID map
class Coin_ID_MAP extends Coin {
constructor(id, name, symbol, first, last) {
super(id, name, symbol);
this.first = first;
this.last = last;
}
}
//CoinMarketCap Metadata
class Coin_Metadata extends Coin {
constructor(id, name, symbol, category, logo, website, source_code, SocialMediaUrls) {
super(id,name,symbol);
this.category = category;
this.logo = logo;
this.website = website;
this.source_code = source_code;
this.SocialMediaUrls = SocialMediaUrls;
}
}
//CoinMarketCap - List All CryptoCurrencies (latest)
class Coins_Latest extends Coin {
constructor(id, name, symbol, rank, circ_supply, tot_supply, max_supply, date_added, price, vol_24, change_1, change_24, change_7d, marketcap) {
super(id,name,symbol);
this.rank = rank;
this.circ_supply = circ_supply;
this.tot_supply = tot_supply;
this.max_supply = max_supply;
this.date_added = date_added;
this.price = price;
this.vol_24 = vol_24;
this.change_1 = change_1;
this.change_24 = change_24;
this.change_7d = change_7d;
this.marketcap = marketcap;
}
}
module.exports = {Coin: Coin, Coin_ID_MAP: Coin_ID_MAP, Coin_Metadata: Coin_Metadata, Coins_Latest: Coins_Latest};