Download - Atom Pub
![Page 1: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/1.jpg)
AtomPubって何だ
知らなくても問題ないけど知ってるとお得な知識
![Page 2: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/2.jpg)
これ嫁
http://gihyo.jp/dev/feature/01/atompub/0001?page=2
![Page 3: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/3.jpg)
必要そうな所をクリップした
忙しいあなたのためにそれなんてツンデレ
![Page 4: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/4.jpg)
Atomのアーキテクチャは2個のRFCが基本
![Page 5: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/5.jpg)
データモデル(巾着袋ときびだんご)
![Page 6: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/6.jpg)
Atomフィード
コレクションサーバから配信する仕様
名前空間:http://www.w3.org/2005/Atom
![Page 7: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/7.jpg)
atom:feedに出現する主な子要素
![Page 9: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/9.jpg)
atom:entryに出て来る主な子要素
![Page 10: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/10.jpg)
Atom:link
entry / feed からwebへのリンクrel属性を持つ
![Page 11: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/11.jpg)
rel属性の意味
![Page 12: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/12.jpg)
文章の操作
メンバリソースの一覧,取得,投稿,編集,削除
![Page 13: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/13.jpg)
メンバリソース一覧を取得
![Page 14: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/14.jpg)
メンバリソースを取得
![Page 15: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/15.jpg)
メンバリソースを追加
![Page 16: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/16.jpg)
メンバリソースを更新
![Page 17: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/17.jpg)
メンバリソースを削除
![Page 18: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/18.jpg)
画像の操作
メディアリソースメンバリソースの一種
![Page 19: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/19.jpg)
メンバリソースは一種類ではない
![Page 20: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/20.jpg)
メディアリンクエントリ
画像なんかをXMLで記述するための仕組み
エントリリソースの一種
![Page 21: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/21.jpg)
メディアリソースを取得
青い線はAtom:link
メディアリソース
エントリリソース(メディアリンクエントリ)
![Page 22: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/22.jpg)
メディアリソースを追加
![Page 23: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/23.jpg)
メディアリソースを更新
![Page 24: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/24.jpg)
エントリリソースを更新
![Page 25: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/25.jpg)
エントリリソースを削除
![Page 26: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/26.jpg)
メディアリソースを削除
![Page 27: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/27.jpg)
操作はこんなもん
ではどうやってベースのURIを調べるか?
![Page 28: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/28.jpg)
サービス文書
ルート要素がapp:serviceの文書webリソースを操作するuriがわかる
![Page 29: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/29.jpg)
サービス文書の構成
app:service
app:workspace
atom:title: 必ず1個atom:collection:0個以上
![Page 30: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/30.jpg)
サービス文書の例(1/2)
<?xml version="1.0" encoding='utf-8'?><service xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom"><workspace><atom:title>Main Site</atom:title><collection href="http://example.org/blog/main"><atom:title>My Blog Entries</atom:title><categories href="http://example.com/cats/forMain.cats" /></collection>
![Page 31: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/31.jpg)
サービス文書の例(2/E)
<collection href="http://example.org/blog/pic"><atom:title>Pictures</atom:title><accept>image/png</accept></collection></workspace></service>
省略時はエントリリソースのみ受付可
![Page 32: Atom Pub](https://reader034.vdocuments.pub/reader034/viewer/2022042816/558cab47d8b42a936e8b45a7/html5/thumbnails/32.jpg)
こっから後は実践
つづくかもしれない