From 875b9ee83a45ac03573a0af7f5de17fb8062dc5d Mon Sep 17 00:00:00 2001 From: Paul Chen Date: Wed, 16 Aug 2023 21:55:46 +0800 Subject: [PATCH] feat: add instagram data source to oracle script (#125) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR adds Instagram data source to oracle script. ## Description ## Checklist - [x] Targeted PR against correct branch. - [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work. - [ ] Wrote unit tests. - [ ] Updated the documentation. - [ ] Re-reviewed `Files changed` in the Github PR explorer. --- oracle-scripts/src/script.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/oracle-scripts/src/script.rs b/oracle-scripts/src/script.rs index 5fdd901..19ed631 100644 --- a/oracle-scripts/src/script.rs +++ b/oracle-scripts/src/script.rs @@ -6,6 +6,9 @@ const DATA_SOURCE_GITHUB: i64 = 63; const DATA_SOURCE_DISCORD: i64 = 62; const DATA_SOURCE_TWITCH: i64 = 60; const DATA_SOURCE_DOMAIN: i64 = 67; +const DATA_SOURCE_YOUTUBE: i64 = 101; +const DATA_SOURCE_TELEGRAM: i64 = 102; +const DATA_SOURCE_INSTAGRAM: i64 = 111; /// CallData contains the data that must be sent when calling this script #[derive(OBIEncode, OBIDecode, OBISchema, Debug)] @@ -40,6 +43,12 @@ fn get_data_source(application: String) -> i64 { return DATA_SOURCE_TWITCH; } else if application == "domain" { return DATA_SOURCE_DOMAIN; + } else if application == "youtube" { + return DATA_SOURCE_YOUTUBE + } else if application == "telegram" { + return DATA_SOURCE_TELEGRAM + } else if application == "instagram" { + return DATA_SOURCE_INSTAGRAM } panic!("Invalid application type")