문제

How can I expose data from my Drupal site via web services to external applications such as iPhone or Android?

도움이 되었습니까?

해결책

One of the most popular solutions is the Services module. It takes a little bit of set-up and know-how but it's very flexible in what it can output and what formats you need it. It's the solution we used at Palantir.net to provide data to our DrupalCon Chicago Android and iOS apps.

다른 팁

One option is to use RSS which is enabled by default. You can use RSS at http://example.com/rss.xml by default, or if you're using something like the views module, you can always set up an RSS feed for a specific view, to limit the data in the RSS feed to a specific type, or other filters.

Modules can also implement hook_xmlrpc(), and hook_xmlrpc_alter().
Depending on the data you need to exchange with the external applications, and from the format they need, you could also follow this approach.

For Drupal 8, it's best to use core REST API module. Here is a Drupal 8 Android app https://github.com/onedrupal/One-Drupal-Android that uses core REST APIs.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 drupal.stackexchange
scroll top