创建SPFX Web部件,以消耗2个REST API并显示其结果

发布于 2025-02-02 01:34:27 字数 686 浏览 4 评论 0原文

我们想创建一个自定义的SPFX Web零件,该部分消耗这2个REST API: -

  1. 一个从Google获取所有评论的列表: - https://developers.google.com/my-business/content/content/review-data#list_all_reviews

  2. 另一个是要获取有关每个评论的详细信息: - https://develovelers.google.com/my-business/content/content/review-data#g​​et_a_a_specific_revief

​网络部分?还有一个SPFX Web部件可以做类似的事情吗?

谢谢

We want to create a custom SPFx web part which consume those 2 RESt API:-

  1. One to get a list of all reviews from Google:- https://developers.google.com/my-business/content/review-data#list_all_reviews

  2. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

救赎№ 2025-02-09 01:34:27

您可以构建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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文