Skip to content

Commit

Permalink
updating docstring for apiview
Browse files Browse the repository at this point in the history
  • Loading branch information
wilberh committed Aug 30, 2023
1 parent 3a04102 commit 3fb0476
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions core/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@


class GoogleTrendApiDetail(APIView):
"""
Example of API body/payload:
{"task": "quote", "ticker": "AAPL"
[OPTIONAL: ,"strt_dt": "2023-06-29", "end_dt": "2023-07-28"]}
{"task": "trend", "company": "Apple", "country": "us"
[OPTIONAL: ,"strt_dt", "2023-06-29", "end_dt": "2023-07-28"]}
"""
def post(self, request):
data = request.data
"""
Example of API body/payload:
{"task": "quote", "ticker": "AAPL"
[OPTIONAL: ,"strt_dt": "2023-06-29", "end_dt": "2023-07-28"]}
{"task": "trend", "company": "Apple", "country": "us"
[OPTIONAL: ,"strt_dt", "2023-06-29", "end_dt": "2023-07-28"]}
"""
task = data["task"]

# NOTE: Hardcoded start and end dates to qualify for free-tier NewsAPI access (last 30 days)
Expand Down

0 comments on commit 3fb0476

Please sign in to comment.