File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 1+ .idea
Original file line number Diff line number Diff line change 11{
22 "name" : " oneforge/forexquotes" ,
33 "type" : " library" ,
4- "version" : " 2.0.3 " ,
4+ "version" : " 2.0.4 " ,
55 "description" : " Library to fetch and parse realtime Forex quotes and convert currencies" ,
66 "keywords" : [
77 " forex" ,
Original file line number Diff line number Diff line change @@ -43,10 +43,16 @@ public function getSymbols()
4343 return json_decode ($ body , true );
4444 }
4545
46- public function getQuotes (array $ symbols )
46+ public function getQuotes (array $ symbols = null )
4747 {
48- $ pairs = implode (", " , $ symbols );
49- $ body = $ this ->fetch ('quotes?pairs= ' . $ pairs );
48+ if ($ symbols === null )
49+ {
50+ $ body = $ this ->fetch ('quotes?cache=false ' );
51+ }
52+ else {
53+ $ pairs = implode (", " , $ symbols );
54+ $ body = $ this ->fetch ('quotes?pairs= ' . $ pairs );
55+ }
5056
5157 $ quotes = json_decode ($ body );
5258
You can’t perform that action at this time.
0 commit comments