topic/search.json 概要

トピック一覧・トピック表示

リクエスト

パラメータ 説明
target *必須 string topic、community、memberが指定可能です。
topic : 一件のトピックを取得します
community : コミュニティのトピック一覧を取得します
member : メンバーの所属するコミュニティのトピック一覧を取得します
target_id *必須 integer targetがtopicの場合はtopic_idを、targetがcommunityの場合はcommunity_idを、targetがmemberの場合はmember_idを指定します。
format string 取得フォーマットを指定します。miniとnormalが指定できます。このフィールドがない場合はnormalフォーマットになります。
max_id integer 取得したいトピックIDの最大値を指定します。
since_id integer 取得したいトピックIDの最小値を指定します。
count integer 取得したいトピックの、取得件数を指定します。このパラメータを指定しなかった場合のデフォルトは15です。

レスポンス

フィールド名 説明 normalフォーマット miniフォーマット
id トピックID
community_id コミュニティID
community_name コミュニティの名前
member トピック所有者メンバーの情報(詳しくは レスポンスの共通仕様 を参照)
name トピックのタイトル
body トピックの本文
created_at トピックの作成時間
images トピックに添付された画像のリスト
editable トピックが編集可能どうかのフラグ
latest_comment トピック最新コメント
latest_commnet_id トピックの最新コメントのID

サンプルリクエスト normal

$ curl http://example.com/api.php/topic/search.json?id=1&apiKey=cdc4042edf74db746f5bf550039bf50979da2566aa514fc0aac8f57c56398be5&target=community&target_id=1

サンプルレスポンス normal

{
    "status": "success"
    "data":[{
        "id":"1",
        "community_id":"1",
        "community_name":"all",
        "name":"bbbbbbbbbbb",
        "member":{
            "id":"1",
            "profile_image":"http:\/\/example.com\/web\/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
        },
        "body":"bbbbb",
        "created_at":"2012-09-28 19:25:39",
        "editable":true,
        "images":[]
    }]
}

サンプルリクエスト mini

$ curl http://example.com/api.php/topic/search.json?apiKey=cdc4042edf74db746f5bf550039bf50979da2566aa514fc0aac8f57c56398be5&target=community&target_id=1&format=mini

サンプルレスポンス mini

{
    "status":"success",
    "data":[{
        "id":"2",
        "community_id":"1",
        "community_name":"all",
        "name":"cccccccccccc",
        "body":"cccccccccccc",
        "created_at":"2012-09-30 09:05:07",
        "latest_comment":"",
        "latest_comment_id":""
    },
    {
        "id":"1",
        "community_id":"1",
        "community_name":"all",
        "name":"bbbbbbbbbbb",
        "body":"bbbbb",
        "created_at":"2012-09-28 19:25:39",
        "latest_comment":"bbb",
        "latest_comment_id":"3"
    }]
}