From 67452cb27dfbc6eda0c0664737d12ffaadb040f8 Mon Sep 17 00:00:00 2001 From: 42lince <42.duxiaoxi@gmail.com> Date: Tue, 27 Sep 2016 02:08:51 -0400 Subject: [PATCH 01/21] add basic code --- index.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/index.html b/index.html index 6524157..037db29 100644 --- a/index.html +++ b/index.html @@ -4,5 +4,15 @@ Mashup + + From 710dba35c7415b19dd05bddb9fbc63dab3411863 Mon Sep 17 00:00:00 2001 From: 42lince <42.duxiaoxi@gmail.com> Date: Tue, 27 Sep 2016 02:19:05 -0400 Subject: [PATCH 02/21] some basic code --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 037db29..bd260a5 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ - + + +

+

+
+ + From ec06ae3e47ef9c88c2aaca396be65c4f23c18c83 Mon Sep 17 00:00:00 2001 From: 42lince <42.duxiaoxi@gmail.com> Date: Tue, 27 Sep 2016 18:20:54 -0400 Subject: [PATCH 04/21] Add styling --- index.html | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index f68ed1c..8089828 100644 --- a/index.html +++ b/index.html @@ -2,13 +2,20 @@ Mashup + - - -

-

-
+

A Simple Stock Query Tool

+

powered by Markit On Demand API

+
+ + +
+

+ - + + diff --git a/query.js b/query.js new file mode 100644 index 0000000..93ee3aa --- /dev/null +++ b/query.js @@ -0,0 +1,29 @@ +$('#action-button').click(function() { + $.ajax({ + url: 'http://dev.markitondemand.com/Api/v2/Lookup/jsonp', + data: { + input: document.getElementById('symbolsearch').value + }, + error: function() { + alert('An error has occurred'); + }, + dataType: 'jsonp', + success: function(data) { + $.ajax({ + url: 'http://dev.markitondemand.com/Api/v2/Quote/jsonp', + data: { + symbol: data[0].Symbol, + }, + error: function() { + alert('An error has occured'); + }, + dataType: 'jsonp', + success: function(result){ + $('#quote').html(data[0].Name + "'s Last Price on ("+ data[0].Exchange + "): "+ result.LastPrice); + }, + type: 'GET' + }); + }, + type: 'GET' + }); +}); From 953b88e7be2d546b65beec9fb53663f547d8e42c Mon Sep 17 00:00:00 2001 From: 42lince <42.duxiaoxi@gmail.com> Date: Tue, 27 Sep 2016 18:47:36 -0400 Subject: [PATCH 10/21] change domain --- query.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/query.js b/query.js index 93ee3aa..706d525 100644 --- a/query.js +++ b/query.js @@ -1,6 +1,6 @@ $('#action-button').click(function() { $.ajax({ - url: 'http://dev.markitondemand.com/Api/v2/Lookup/jsonp', + url: '//dev.markitondemand.com/Api/v2/Lookup/jsonp', data: { input: document.getElementById('symbolsearch').value }, @@ -10,7 +10,7 @@ $('#action-button').click(function() { dataType: 'jsonp', success: function(data) { $.ajax({ - url: 'http://dev.markitondemand.com/Api/v2/Quote/jsonp', + url: '//dev.markitondemand.com/Api/v2/Quote/jsonp', data: { symbol: data[0].Symbol, }, From 70e2b82d01573867cdffaed7dbf9b26359c536c6 Mon Sep 17 00:00:00 2001 From: 42lince <42.duxiaoxi@gmail.com> Date: Tue, 27 Sep 2016 18:56:24 -0400 Subject: [PATCH 11/21] Add separate js file --- query.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/query.js b/query.js index 706d525..908bf56 100644 --- a/query.js +++ b/query.js @@ -1,6 +1,6 @@ $('#action-button').click(function() { $.ajax({ - url: '//dev.markitondemand.com/Api/v2/Lookup/jsonp', + url: '//dev.markitondemand.com/Api/v2/Lookup', data: { input: document.getElementById('symbolsearch').value }, @@ -10,7 +10,7 @@ $('#action-button').click(function() { dataType: 'jsonp', success: function(data) { $.ajax({ - url: '//dev.markitondemand.com/Api/v2/Quote/jsonp', + url: '//dev.markitondemand.com/Api/v2/Quote', data: { symbol: data[0].Symbol, }, From 86b3666738a987364b1e17e79cc661360c242518 Mon Sep 17 00:00:00 2001 From: 42lince <42.duxiaoxi@gmail.com> Date: Tue, 27 Sep 2016 19:01:16 -0400 Subject: [PATCH 12/21] try something else --- query.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/query.js b/query.js index 908bf56..706d525 100644 --- a/query.js +++ b/query.js @@ -1,6 +1,6 @@ $('#action-button').click(function() { $.ajax({ - url: '//dev.markitondemand.com/Api/v2/Lookup', + url: '//dev.markitondemand.com/Api/v2/Lookup/jsonp', data: { input: document.getElementById('symbolsearch').value }, @@ -10,7 +10,7 @@ $('#action-button').click(function() { dataType: 'jsonp', success: function(data) { $.ajax({ - url: '//dev.markitondemand.com/Api/v2/Quote', + url: '//dev.markitondemand.com/Api/v2/Quote/jsonp', data: { symbol: data[0].Symbol, }, From cf386b97947d4fa3c7d06e3745832dfcdfa0adef Mon Sep 17 00:00:00 2001 From: 42lince <42.duxiaoxi@gmail.com> Date: Tue, 27 Sep 2016 19:04:12 -0400 Subject: [PATCH 13/21] bring back script --- index.html | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 4e7ab63..cf92c2b 100644 --- a/index.html +++ b/index.html @@ -17,6 +17,36 @@

A Simple Stock Query Tool

- + From 4abdbdb776e2277d5faf83ee029526cb4f87a5f8 Mon Sep 17 00:00:00 2001 From: 42lince <42.duxiaoxi@gmail.com> Date: Tue, 27 Sep 2016 19:05:51 -0400 Subject: [PATCH 14/21] try --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index cf92c2b..3a22e52 100644 --- a/index.html +++ b/index.html @@ -20,7 +20,7 @@

A Simple Stock Query Tool

- + diff --git a/query.js b/query.js index 706d525..93ee3aa 100644 --- a/query.js +++ b/query.js @@ -1,6 +1,6 @@ $('#action-button').click(function() { $.ajax({ - url: '//dev.markitondemand.com/Api/v2/Lookup/jsonp', + url: 'http://dev.markitondemand.com/Api/v2/Lookup/jsonp', data: { input: document.getElementById('symbolsearch').value }, @@ -10,7 +10,7 @@ $('#action-button').click(function() { dataType: 'jsonp', success: function(data) { $.ajax({ - url: '//dev.markitondemand.com/Api/v2/Quote/jsonp', + url: 'http://dev.markitondemand.com/Api/v2/Quote/jsonp', data: { symbol: data[0].Symbol, }, From bffec34e70b4c3f1c322755ed7bcc68ca1830096 Mon Sep 17 00:00:00 2001 From: 42lince <42.duxiaoxi@gmail.com> Date: Tue, 27 Sep 2016 19:24:29 -0400 Subject: [PATCH 16/21] change protocol --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 4e7ab63..6bd4f64 100644 --- a/index.html +++ b/index.html @@ -16,7 +16,7 @@

A Simple Stock Query Tool

- + From 385fd79c45b29cb3ca975e877b6089b3dc411e4c Mon Sep 17 00:00:00 2001 From: 42lince <42.duxiaoxi@gmail.com> Date: Tue, 27 Sep 2016 19:26:18 -0400 Subject: [PATCH 17/21] another try --- index.html | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 6bd4f64..bb647cf 100644 --- a/index.html +++ b/index.html @@ -17,6 +17,36 @@

A Simple Stock Query Tool

- + From 9b1be92062c5a7b5c22d4c967d6ee118c02d26b4 Mon Sep 17 00:00:00 2001 From: 42lince <42.duxiaoxi@gmail.com> Date: Tue, 27 Sep 2016 19:27:39 -0400 Subject: [PATCH 18/21] another tyr --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index bb647cf..d1d00cb 100644 --- a/index.html +++ b/index.html @@ -20,7 +20,7 @@

A Simple Stock Query Tool

+ +