Skip to content

Commit 9792399

Browse files
refactored
1 parent cbd43a1 commit 9792399

File tree

2 files changed

+47
-46
lines changed

2 files changed

+47
-46
lines changed

src/models/models.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ class Resolution(BaseModel):
3131

3232

3333
class Thumbnail(BaseModel):
34-
resolutions: list[Resolution]
34+
resolutions: list[Resolution] | None
3535

3636

3737
class ArticleData(BaseModel):
38-
datetime_published: str
39-
link: str
40-
providerPublishTime: int
41-
publisher: str
42-
sentiment: Sentiment
38+
datetime_published: str | None
39+
link: str | None
40+
providerPublishTime: int | None
41+
publisher: str | None
42+
sentiment: Sentiment | None
4343
thumbnail: Thumbnail
4444
tickers: list[str] | None
4545
title: str

src/tasks/schedulers.py

Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -33,46 +33,47 @@ def compose_default_tweets(api_name, tweet_lines, media_ids=None):
3333
return tweet
3434

3535

36-
DEFAULT_TWEETS = [
37-
compose_default_tweets("EOD Stock Market API", [
38-
"- Exchange & Ticker Data",
39-
"- (EOD) Stock Data",
40-
"- Fundamental Data",
41-
"- Financial News API",
42-
"- Social Media Trend Data For Stocks",
43-
"Create A free API Key today",
44-
"https://eod-stock-api.site/plan-descriptions/basic"
45-
], media_ids=["1647575420009603073"]),
46-
compose_default_tweets("Financial & Business News API", [
47-
"- Articles By UUID",
48-
"- Articles By Publishing Date",
49-
"- Articles By Stock Tickers",
50-
"- Articles By Exchange",
51-
"- Get List of Exchanges & Tickers",
52-
"- Get List of Publishers & Articles By Publisher",
53-
"Create A free API Key today",
54-
"https://bit.ly/financial-business-news-api"
55-
], media_ids=["1647575420009603073"]),
56-
compose_default_tweets("Financial & Business Professional Plan", [
57-
"- Exchange & Ticker Data",
58-
"- (EOD) Stock Data",
59-
"- Fundamental Data",
60-
"- Financial News API",
61-
"- Social Media Trend Data For Stocks",
62-
"Subscribe to our Professional Plan Today",
63-
"https://eod-stock-api.site/plan-descriptions/professional"
64-
], media_ids=["1647575420009603073"]),
65-
compose_default_tweets("Financial & Business Business Plan", [
66-
"- Exchange & Ticker Data",
67-
"- (EOD) Stock Data",
68-
"- Fundamental Data",
69-
"- Financial News API",
70-
"- Social Media Trend Data For Stocks",
71-
"Subscribe to our Business Plan Today",
72-
"https://eod-stock-api.site/plan-descriptions/business"
73-
], media_ids=["1647575420009603073"])
74-
]
75-
36+
# DEFAULT_TWEETS = [
37+
# compose_default_tweets("EOD Stock Market API", [
38+
# "- Exchange & Ticker Data",
39+
# "- (EOD) Stock Data",
40+
# "- Fundamental Data",
41+
# "- Financial News API",
42+
# "- Social Media Trend Data For Stocks",
43+
# "Create A free API Key today",
44+
# "https://eod-stock-api.site/plan-descriptions/basic"
45+
# ], media_ids=["1647575420009603073"]),
46+
# compose_default_tweets("Financial & Business News API", [
47+
# "- Articles By UUID",
48+
# "- Articles By Publishing Date",
49+
# "- Articles By Stock Tickers",
50+
# "- Articles By Exchange",
51+
# "- Get List of Exchanges & Tickers",
52+
# "- Get List of Publishers & Articles By Publisher",
53+
# "Create A free API Key today",
54+
# "https://bit.ly/financial-business-news-api"
55+
# ], media_ids=["1647575420009603073"]),
56+
# compose_default_tweets("Financial & Business Professional Plan", [
57+
# "- Exchange & Ticker Data",
58+
# "- (EOD) Stock Data",
59+
# "- Fundamental Data",
60+
# "- Financial News API",
61+
# "- Social Media Trend Data For Stocks",
62+
# "Subscribe to our Professional Plan Today",
63+
# "https://eod-stock-api.site/plan-descriptions/professional"
64+
# ], media_ids=["1647575420009603073"]),
65+
# compose_default_tweets("Financial & Business Business Plan", [
66+
# "- Exchange & Ticker Data",
67+
# "- (EOD) Stock Data",
68+
# "- Fundamental Data",
69+
# "- Financial News API",
70+
# "- Social Media Trend Data For Stocks",
71+
# "Subscribe to our Business Plan Today",
72+
# "https://eod-stock-api.site/plan-descriptions/business"
73+
# ], media_ids=["1647575420009603073"])
74+
# ]
75+
76+
DEFAULT_TWEETS = []
7677

7778
class TaskScheduler:
7879
def __init__(self):

0 commit comments

Comments
 (0)