mirror of
https://github.com/hydrosquall/tiingo-python.git
synced 2025-12-18 20:24:19 +01:00
Merge pull request #325 from hydrosquall/feature/rename-sources-url-parameter
[feature] Rename internal sources URL parameter to source
This commit is contained in:
@@ -2,9 +2,9 @@
|
|||||||
History
|
History
|
||||||
=======
|
=======
|
||||||
|
|
||||||
0.11.x (2019-XX-XX)
|
0.11.x (2019-09-XX)
|
||||||
--------------------
|
--------------------
|
||||||
* Update me as new features are added
|
* [/news] Internally rename sources parameter to "source", ensure lists are passed as comma separated values
|
||||||
|
|
||||||
0.10.x (2019-05-11)
|
0.10.x (2019-05-11)
|
||||||
--------------------
|
--------------------
|
||||||
|
|||||||
4
tests/fixtures/news.yaml
vendored
4
tests/fixtures/news.yaml
vendored
@@ -7,9 +7,9 @@ interactions:
|
|||||||
Authorization: [Token 0000000000000000000000000000000000000000]
|
Authorization: [Token 0000000000000000000000000000000000000000]
|
||||||
Connection: [keep-alive]
|
Connection: [keep-alive]
|
||||||
Content-Type: [application/json]
|
Content-Type: [application/json]
|
||||||
User-Agent: [tiingo-python-client 0.3.2]
|
User-Agent: [tiingo-python-client 0.11.0]
|
||||||
method: GET
|
method: GET
|
||||||
uri: https://api.tiingo.com/tiingo/news?limit=1&offset=0&sortBy=publishedDate&tickers=aapl&tickers=googl&sources=washingtonpost.com&sources=altcointoday.com&tags=Technology&tags=Bitcoin&startDate=2016-01-01&endDate=2017-08-31
|
uri: https://api.tiingo.com/tiingo/news?limit=1&offset=0&sortBy=publishedDate&tickers=aapl&tickers=googl&source=cnbc.com,altcointoday.com&tags=Technology&tags=Bitcoin&startDate=2016-01-01&endDate=2017-08-31
|
||||||
response:
|
response:
|
||||||
body: {string: '[{
|
body: {string: '[{
|
||||||
"publishedDate": "2016-01-11T23:13:00Z",
|
"publishedDate": "2016-01-11T23:13:00Z",
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ class TestNews(TestCase):
|
|||||||
"tags": ["Technology", "Bitcoin"],
|
"tags": ["Technology", "Bitcoin"],
|
||||||
"startDate": "2016-01-01",
|
"startDate": "2016-01-01",
|
||||||
"endDate": "2017-08-31",
|
"endDate": "2017-08-31",
|
||||||
"sources": ['washingtonpost.com', 'altcointoday.com'],
|
"sources": ['cnbc.com', 'altcointoday.com'],
|
||||||
"limit": self.num_articles
|
"limit": self.num_articles
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ class TiingoClient(RestClient):
|
|||||||
'offset': offset,
|
'offset': offset,
|
||||||
'sortBy': sortBy,
|
'sortBy': sortBy,
|
||||||
'tickers': tickers,
|
'tickers': tickers,
|
||||||
'sources': sources,
|
'source': (",").join(sources),
|
||||||
'tags': tags,
|
'tags': tags,
|
||||||
'startDate': startDate,
|
'startDate': startDate,
|
||||||
'endDate': endDate
|
'endDate': endDate
|
||||||
|
|||||||
Reference in New Issue
Block a user