创建SPFX Web部件,以消耗2个REST API并显示其结果
我们想创建一个自定义的SPFX Web零件,该部分消耗这2个REST API: -
一个从Google获取所有评论的列表: - https://developers.google.com/my-business/content/content/review-data#list_all_reviews
另一个是要获取有关每个评论的详细信息: - https://develovelers.google.com/my-business/content/content/review-data#get_a_a_specific_revief
网络部分?还有一个SPFX Web部件可以做类似的事情吗?
谢谢
We want to create a custom SPFx web part which consume those 2 RESt API:-
One to get a list of all reviews from Google:- https://developers.google.com/my-business/content/review-data#list_all_reviews
The other is to get details about each review:- https://developers.google.com/my-business/content/review-data#get_a_specific_review
Then we want to show the latest 5 reviews which have rating 4 or more our of 5.
So can anyone advice how we can create such an SPFX web part? and is there an SPFx web part which do similar thing?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以构建SPFX解决方案(例如,以示例查看 https://learn.microsoft.com/en-us/sharepoint/sharepoint/dev/spfx/web-parts/web-parts/get-starts/get-started/build-a-a-hello-worll-------------------------------------------------网络零件)。基本上,您有一个React应用程序,可以在其中拨打2个呼叫端点(可以使用Axios)并呈现结果。
You can build a SPFX solution (as an example look here https://learn.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-part). Basically, you have a React application where you can make 2 calls to the endpoints (you can use axios) and render the results.