diary/search.json 概要

日記一覧・日記表示

リクエスト

パラメータ 説明
format string 取得フォーマットを指定します。このフィールドがない場合はnormalフォーマットになります。miniの場合のみ*必須です。 (normal:一件の日記を取得 mini:日記のリストを取得
id integer formatがnormalの場合は日記IDが*必須です。formatがminiの場合はメンバーIDを指定するか、もしくは何も指定しません。
page integer formatがminiで、2ページ目以降を読む場合は*必須です。

レスポンス

フィールド名 説明 normalフォーマット miniフォーマット
id 日記の記事ID
member 投稿したメンバー情報(詳しくはレスポンス共通仕様を参照)
title 日記のタイトル
body 日記の本文
body_short 日記の本文を60文字に切り詰めたもの
public_flag 日記の公開範囲
ago 日記の投稿時間を経過時間で表したもの(何秒前、何分前など)
created_at 日記の作成時間
images 日記に添付された画像のリスト
prev 1つ前の日記ID
next 1つ後の日記ID
editable 日記が編集可能どうかのフラグ

サンプルリクエスト normal

$ curl http://example.com/api.php/diary/search.json?apiKey=a6a0fb34aeb63036883323875c4d5103a88bd266b1cb5cfcbef3df276a9f36dc&id=6

サンプルレスポンス normal

{
    "status": "success",
    "data":{
        "id":"5",
        "member":{
            "id":"1",
            "profile_image":"http:\/\/example.com\/images\/no_image.gif",
            "screen_name":"OpenPNE\u541b",
            "name":"OpenPNE\u541b",
            "profile_url":"\/member\/1",
            "friend":false,
            "blocking":false,
            "self":true,
            "friends_count":0,
            "self_introduction":null
        },
        "title":"タイトル",
        "body":"本文",
        "body_short":"本文",
        "public_flag":"1",
        "ago":"2012\u5e749\u67087\u65e5 16:09",
        "created_at":"2012-09-07 16:09:33",
        "images":[{
            "filename":"\/cache\/img\/png\/w_h\/33e9af59c77006b453f83fc8991473cb6ed0bdd7_png.png",
            "imagetag":"<img alt=\"\" src=\"\/cache\/img\/png\/w120_h120\/33e9af59c77006b453f83fc8991473cb6ed0bdd7_png.png\" \/>"
        },
        {
            "filename":"\/cache\/img\/jpg\/w_h\/ef12105c06de658f44217875358883ded8c31ffb_jpg.jpg",
            "imagetag":"<img alt=\"\" src=\"\/cache\/img\/jpg\/w120_h120\/ef12105c06de658f44217875358883ded8c31ffb_jpg.jpg\" \/>"
        }],
        "next":"6",
        "prev":"4",
        "editable":true
    }
}
    }
}

サンプルリクエスト mini

$ curl http://example.com/api.php/diary/search.json?apiKey=a6a0fb34aeb63036883323875c4d5103a88bd266b1cb5cfcbef3df276a9f36dc&id=1&format=mini

サンプルレスポンス mini

{
    "status": "success",
    "data":[{
        "id":"6",
        "member":{
            "id":"1",
            "profile_image":"http:\/\/example.com\/images\/no_image.gif",
            "screen_name":"OpenPNE\u541b",
            "name":"OpenPNE\u541b",
            "profile_url":"\/member\/1",
            "friend":false,
            "blocking":false,
            "self":true,
            "friends_count":0,
            "self_introduction":null
        },
        "title":"6",
        "body":"6",
        "public_flag":"1",
        "ago":"2012\u5e749\u67087\u65e5 16:39",
        "created_at":"2012-09-07 16:39:18"
    },
    {
        "id":"5",
        "member":{
            "id":"1",
            "profile_image":"http:\/\/example.com\/images\/no_image.gif",
            "screen_name":"OpenPNE\u541b",
            "name":"OpenPNE\u541b",
            "profile_url":"\/member\/1",
            "friend":false,
            "blocking":false,
            "self":true,
            "friends_count":0,
            "self_introduction":null
        },
        "title":"5",
        "body":"5",
        "body_short":"5",
        "public_flag":"1",
        "ago":"2012\u5e749\u67087\u65e5 16:09",
        "created_at":"2012-09-07 16:09:33"
    },
    {
        "id":"4",
        "member":{
            "id":"1",
            "profile_image":"http:\/\/example.com\/images\/no_image.gif",
            "screen_name":"OpenPNE\u541b",
            "name":"OpenPNE\u541b",
            "profile_url":"\/member\/1",
            "friend":false,
            "blocking":false,
            "self":true,
            "friends_count":0,
            "self_introduction":null
        },
        "title":"4",
        "body":"4",
        "body_short":"4",
        "public_flag":"1",
        "ago":"2012\u5e749\u67087\u65e5 16:09",
        "created_at":"2012-09-07 16:09:27"
    },
    {
        "id":"3",
        "member":{
            "id":"1",
            "profile_image":"http:\/\/example.com\/images\/no_image.gif",
            "screen_name":"OpenPNE\u541b",
            "name":"OpenPNE\u541b",
            "profile_url":"\/member\/1",
            "friend":false,
            "blocking":false,
            "self":true,
            "friends_count":0,
            "self_introduction":null
        },
        "title":"3",
        "body":"3",
        "body_short":"3",
        "public_flag":"1",
        "ago":"2012\u5e749\u67087\u65e5 16:08",
        "created_at":"2012-09-07 16:08:53"
    },
    {
        "id":"2",
        "member":{
            "id":"1",
            "profile_image":"http:\/\/example.com\/images\/no_image.gif",
            "screen_name":"OpenPNE\u541b",
            "name":"OpenPNE\u541b",
            "profile_url":"\/member\/1",
            "friend":false,
            "blocking":false,
            "self":true,
            "friends_count":0,
            "self_introduction":null
        },
        "title":"2",
        "body":"2",
        "body_short":"2",
        "public_flag":"1",
        "ago":"2012\u5e749\u67087\u65e5 16:08",
        "created_at":"2012-09-07 16:08:45"
    },
    {
        "id":"1",
        "member":{
            "id":"1",
            "profile_image":"http:\/\/example.com\/images\/no_image.gif",
            "screen_name":"OpenPNE\u541b",
            "name":"OpenPNE\u541b",
            "profile_url":"\/member\/1",
            "friend":false,
            "blocking":false,
            "self":true,
            "friends_count":0,
            "self_introduction":null
        },
        "title":"1",
        "body":"1",
        "body_short":"1",
        "public_flag":"1",
        "ago":"2012\u5e749\u67087\u65e5 16:08",
        "created_at":"2012-09-07 16:08:35"
    }],
    "next":false
}