api - 将图表从本地文件上传到 StockTwits API 的正确语法是什么?
问题描述
我正在使用 Excel 构建一个本地应用程序,以使用 API 将带有图表的消息发布到 StockTwits。由于该文件是本地文件,并且 API 调用此语法来上传图表:
curl https://api.stocktwits.com/api/2/messages/create.json -F access_token=<access_token> -F body="Creating a new message with a chart. \$ticker" -F chart=@/path/to/a/local/image/file.jpg
我的 JASON 正文如下所示:
{"body":"Testing a post for $WDC with a chart testing two again to see if this works","chart":"file://C:/My_Folder/My_File.png"}
但是,当我将此发布到 API 时,我收到以下错误:
{"response":{"status":422},"errors":[{"message":"There was a problem with the URL. Please check to make sure the provided URL is valid"}]}
我的本地文件语法有什么不正确的地方?
解决方案
推荐阅读
- r - data.table 使用列前瞻的逐行操作
- pyspark - Pyspark计算按代码排序的时间差
- android - ASyncTask ConnectException:连接被拒绝
- html - 调整页面大小仅在某些时候有效
- react-native - 如何获取文本或按钮以在世博会地图上注册点击事件?
- javascript - 如何从字符串数组创建 Chrome 扩展上下文子菜单项
- python - 每行具有不同标准偏差的 Numpy 数组
- reactjs - 通过 ESLint 版本在 vscode 上启动 React 应用程序失败
- javascript - 新项目进入时将状态更改为true并在5秒后更改为false
- python - TensorFlow WALS 矩阵分解估计器的 export_savedmodel() 如何正确?