I've just seen snippet of code on developer.twitter.com
'curl --request POST \
--url https://api.twitter.com/1.1/tweets/search/30day/<ENV>.json \
--header 'authorization: Bearer <BEARER_TOKEN>' \
--header 'content-type: application/json' \
--data '{
"query":"from:TwitterDev lang:en",
"maxResults": "100",
"fromDate":"<YYYYMMDDHHmm>",
"toDate":"<YYYYMMDDHHmm>"
}'
Using cmd command line or Windows power shell i receive error because of multiline format of the code. However everything is ok for string without line breaks.
My question is - Where i can run this snippet of code without errors?
This command works in bash and zsh on Linux and Mac - I have not been able to test it on Windows. In PowerShell, the multi-line continuation character is backtick `. Remember to replace the
<ENV>and<BEARER_TOKEN>values and to edit or remove thefromDateandtoDateparameters. Also, the leading single quote is not from the documentation page, so you'll need to remove that as well.