summaryrefslogtreecommitdiff
path: root/src/models.rs
diff options
context:
space:
mode:
authorDavid Blajda <blajda@hotmail.com>2018-12-27 04:46:10 +0000
committerDavid Blajda <blajda@hotmail.com>2018-12-27 04:46:10 +0000
commitcb1b144e48ee357a76f551433d4886f092d259c8 (patch)
tree15606dc621e4d68f3bf3e9d27a44e6fd02a00fc5 /src/models.rs
parent2e08d0c8abbfb9f989c61acb4f6c580719a65b42 (diff)
Use a generic client for both helix and kraken
Diffstat (limited to 'src/models.rs')
-rw-r--r--src/models.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/models.rs b/src/models.rs
new file mode 100644
index 0000000..f68e60f
--- /dev/null
+++ b/src/models.rs
@@ -0,0 +1,16 @@
+extern crate serde_json;
+
+use crate::client::PaginationTrait;
+
+impl PaginationTrait for Credentials {
+ fn cursor<'a>(&'a self) -> Option<&'a str> { None }
+}
+
+#[derive(Debug, Deserialize)]
+pub struct Credentials {
+ pub access_token: String,
+ pub refresh_token: Option<String>,
+ pub expires_in: u32,
+ pub scope: Option<Vec<String>>,
+ pub token_type: String,
+}