<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Restful on 瓶子裡的小狐狸</title>
    <link>https://szeching.com/tags/restful/</link>
    <description>Recent content in Restful on 瓶子裡的小狐狸</description>
    <generator>Hugo</generator>
    <language>zh-Hant</language>
    <lastBuildDate>Wed, 08 Jun 2016 16:22:42 +0000</lastBuildDate>
    <atom:link href="https://szeching.com/tags/restful/rss" rel="self" type="application/rss+xml" />
    <item>
      <title>Drupal7 中Restful模组应用简单介绍</title>
      <link>https://szeching.com/a-simple-guide-to-interacive-restful-module-with-drupal7/</link>
      <pubDate>Wed, 08 Jun 2016 16:22:42 +0000</pubDate>
      <guid>https://szeching.com/a-simple-guide-to-interacive-restful-module-with-drupal7/</guid>
      <description>&lt;h2 id=&#34;安装并启用restful-module&#34;&gt;安装并启用Restful Module&lt;a class=&#34;anchorjs-link&#34; href=&#34;#%e5%ae%89%e8%a3%85%e5%b9%b6%e5%90%af%e7%94%a8restful-module&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.drupal.org/project/restful&#34; target=&#34;_blank&#34;&gt;Restful 2.x &lt;/a&gt; 下载&lt;/li&gt;&#xA;&lt;li&gt;drush 安装 &lt;code&gt;drush dl restful&lt;/code&gt;， &lt;code&gt;drush en restful&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;自定义restful-api模组&#34;&gt;自定义RESTFUL API模组&lt;a class=&#34;anchorjs-link&#34; href=&#34;#%e8%87%aa%e5%ae%9a%e4%b9%89restful-api%e6%a8%a1%e7%bb%84&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;&#xA;&lt;li&gt;可参考restful里的范例 &lt;code&gt;sites/all/modules/restful/modules/restful_example&lt;/code&gt; 或者测试文件内容 &lt;code&gt;sites/all/modules/restful/tests&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;模组文件结构&#34;&gt;模组文件结构&lt;a class=&#34;anchorjs-link&#34; href=&#34;#%e6%a8%a1%e7%bb%84%e6%96%87%e4%bb%b6%e7%bb%93%e6%9e%84&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-txt&#34; data-lang=&#34;txt&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;1&lt;/span&gt;&lt;span&gt;custom_restfulapi/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;2&lt;/span&gt;&lt;span&gt;├─ src/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;3&lt;/span&gt;&lt;span&gt;│  ├─ Plugin/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;4&lt;/span&gt;&lt;span&gt;│  │  ├─ resource/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;5&lt;/span&gt;&lt;span&gt;│  │  │  ├─ entity/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;6&lt;/span&gt;&lt;span&gt;│  │  │  │  ├─ Testentity__1_0.php&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;7&lt;/span&gt;&lt;span&gt;├─ custom_restfulapi.info&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;8&lt;/span&gt;&lt;span&gt;├─ custom_restfulapi.module&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;API RESOURCES要放在src/Plugin下。 *.info 和 *.module 的内容跟其他自定义模组的相差无几，方法一样，此处从略。&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
