Skip to main content

集成

¥Integrations

Strapi 生成一个 API 供你访问你的内容。但是如何将 React、Ruby、Gatsby 应用连接到它呢?了解什么是 API 很重要。

¥Strapi generates an API for you to access your content. But how can you connect a React, Ruby, Gatsby application to it? It is important to know what is an API.

什么是 API?

¥What is an API?

API 是应用编程接口的缩写,它是允许两个应用相互通信的软件中介。如果你想将 React 应用与 Strapi 连接,我们说 React 是客户端,而 Strapi 是系统。事实上,React 将通过发出 HTTP 请求来与 Strapi 进行通信。然后 Strapi 将给你的客户端响应。

¥API is the acronym for Application Programming Interface, which is a software intermediary that allows two applications to talk to each other. In case you want to connect a React application with Strapi, we say that React is the client and Strapi the system. Indeed, React will communicate to Strapi, by making HTTP requests. Strapi will then give a response back to your client.

如果你的 Strapi 应用包含餐馆,并且你想在 React 应用中列出它们,你所需要做的就是向 Strapi 发出 HTTP 请求,它会为你提供包含餐馆的响应。

¥If your Strapi application contains restaurants and you want to list them in your React application, all you need to do is to make an HTTP request to Strapi which will take care to give you a response containing your restaurants.

API 端点 文档将为你提供与 Strapi API 交互的所有关键信息。

¥The API Endpoints documentation will give you all the keys in hand to interact with your Strapi API.

开始使用

¥Get started

如今,任何编程语言都有 HTTP 客户端,允许你执行对 API 的请求并与其交互。Javascript 有 Axios拿来,Ruby 有 法拉第HTTParty,Python 有 要求 等等……

¥Today, any programming language has an HTTP client allowing you to execute requests to an API and therefore interact with it. Javascript has Axios, Fetch, Ruby has Faraday, HTTParty, Python has Requests etc...

将 Strapi 与下面的多种框架、前端或后端编程语言集成。

¥Integrate Strapi with a multitude of frameworks, frontend or backend programming languages just below.