From d5cea57c092b4225eec1a519bd5d04163d350257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Terje=20S=C3=B8rensen?= Date: Sun, 17 Sep 2023 10:47:24 +0200 Subject: [PATCH] Started implementing clients --- .../defillama/model/protocols/Protocol.java | 141 ++++++++++-------- .../model/protocols/ProtocolsResponse.java | 12 -- 2 files changed, 75 insertions(+), 78 deletions(-) delete mode 100644 src/main/java/no/jansoren/defillama/model/protocols/ProtocolsResponse.java diff --git a/src/main/java/no/jansoren/defillama/model/protocols/Protocol.java b/src/main/java/no/jansoren/defillama/model/protocols/Protocol.java index 5de6b78..c48e330 100644 --- a/src/main/java/no/jansoren/defillama/model/protocols/Protocol.java +++ b/src/main/java/no/jansoren/defillama/model/protocols/Protocol.java @@ -8,103 +8,112 @@ public record Protocol( - @JsonProperty("symbol") - String symbol, + @JsonProperty("symbol") + String symbol, - @JsonProperty("change_7d") - Object change7d, + @JsonProperty("change_7d") + Object change7d, - @JsonProperty("gecko_id") - Object geckoId, + @JsonProperty("gecko_id") + Object geckoId, - @JsonProperty("chains") - List chains, + @JsonProperty("chains") + List chains, - @JsonProperty("forkedFrom") - List forkedFrom, + @JsonProperty("forkedFrom") + List forkedFrom, - @JsonProperty("audit_note") - Object auditNote, + @JsonProperty("audit_note") + Object auditNote, - @JsonProperty("description") - String description, + @JsonProperty("description") + String description, - @JsonProperty("cmcId") - Object cmcId, + @JsonProperty("cmcId") + Object cmcId, - @JsonProperty("twitter") - String twitter, + @JsonProperty("twitter") + String twitter, - @JsonProperty("oracles") - List oracles, + @JsonProperty("oracles") + List oracles, - @JsonProperty("logo") - String logo, + @JsonProperty("logo") + String logo, - @JsonProperty("id") - String id, + @JsonProperty("id") + String id, - @JsonProperty("audits") - String audits, + @JsonProperty("parentProtocol") + String parentProtocol, - @JsonProperty("slug") - String slug, + @JsonProperty("audits") + String audits, - @JsonProperty("chain") - String chain, + @JsonProperty("slug") + String slug, - @JsonProperty("address") - Object address, + @JsonProperty("stablecoins") + List stablecoins, - @JsonProperty("module") - String module, + @JsonProperty("chain") + String chain, - @JsonProperty("tvl") - Object tvl, + @JsonProperty("address") + String address, - @JsonProperty("listedAt") - int listedAt, + @JsonProperty("module") + String module, - @JsonProperty("url") - String url, + @JsonProperty("tvl") + Object tvl, - @JsonProperty("tokenBreakdowns") - Object tokenBreakdowns, + @JsonProperty("listedAt") + int listedAt, - @JsonProperty("mcap") - Object mcap, + @JsonProperty("url") + String url, - @JsonProperty("name") - String name, + @JsonProperty("audit_links") + List auditLinks, - @JsonProperty("chainTvls") - Map chainTvls, + @JsonProperty("tokenBreakdowns") + TokenBreakdowns tokenBreakdowns, - @JsonProperty("change_1h") - Object change1h, + @JsonProperty("mcap") + Object mcap, - @JsonProperty("category") - String category, + @JsonProperty("name") + String name, - @JsonProperty("change_1d") - Object change1d, + @JsonProperty("chainTvls") + Map chainTvls, - @JsonProperty("openSource") - boolean openSource, + @JsonProperty("change_1h") + Object change1h, - @JsonProperty("governanceID") - List governanceID, + @JsonProperty("category") + String category, - @JsonProperty("referralUrl") - String referralUrl, + @JsonProperty("change_1d") + Object change1d, - @JsonProperty("github") - List github, + @JsonProperty("openSource") + boolean openSource, - @JsonProperty("audit_links") - List auditLinks, + @JsonProperty("governanceID") + List governanceID, - @JsonProperty("treasury") - String treasury + @JsonProperty("referralUrl") + String referralUrl, + + @JsonProperty("github") + List github, + + @JsonProperty("audit_links") + List auditLinks, + + @JsonProperty("treasury") + String treasury ) { } \ No newline at end of file diff --git a/src/main/java/no/jansoren/defillama/model/protocols/ProtocolsResponse.java b/src/main/java/no/jansoren/defillama/model/protocols/ProtocolsResponse.java deleted file mode 100644 index 52d8549..0000000 --- a/src/main/java/no/jansoren/defillama/model/protocols/ProtocolsResponse.java +++ /dev/null @@ -1,12 +0,0 @@ -package no.jansoren.defillama.model.protocols; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.List; - -public record ProtocolsResponse ( - - @JsonProperty("protocols") - List protocols -){ -}