Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

api docs (ja) of HTTP Request API

Marihachi edited this page Dec 4, 2018 · 3 revisions
内容の書き換えが進行中です。

HTTP Request API

HTTPリクエストを送信することによって各種操作を行う基本的なAPIです。
AccessTokenを利用することで付与(Grant)されているスコープ範囲の操作が可能になります。必要なスコープについての詳細は各エンドポイントの項目を参照してください。


目次


オブジェクト

User

{
  "createdAt": 1500702964,
  "description": "コーヒーが好きです",
  "followersCount": 7,
  "followingsCount": 16,
  "iconFileId": "5a813952bf8f203120a6b189",
  "id": "5972e8f4d61aea367cbf6972",
  "name": "香風智乃",
  "postingsCount": {
    "chat": 173
  },
  "screenName": "chino123"
}

Chat Posting

{
  "createdAt": 1542525441,
  "id": "5bf1120154d6cf2a485bcb6e",
  "text": "コーヒー1杯で1回です",
  "type": "chat",
  "user": { "Userオブジェクトが入ります" }
}

エンドポイント


目次


新しいChatポストを投稿する

/posting/create-chat

必要なスコープ

  • post.write

パラメータ

パラメータ名 説明
text string 必須。ポストの本文を指定します。
attachments fileId[]? 添付するメディアのIDを配列で指定します。

リクエスト例

POST /posting/create-chat

{ "text": "コーヒー1杯で1回です" }

レスポンス例

status: 200 OK
{
  "resultType": "posting",
  "result": {
      "createdAt": 1524890102,
      "id": "5ae3f9f630f9d22b8499f162",
      "text": "コーヒー1杯で1回です",
      "type": "chat",
      "user": {
          "createdAt": 1500702964,
          "description": "コーヒーが好きです",
          "followersCount": 3,
          "followingsCount": 5,
          "iconFileId": "5a813952bf8f203120a6b189",
          "id": "5972e8f4d61aea367cbf6972",
          "name": "香風智乃",
          "postingsCount": {
              "chat": 173
          },
          "screenName": "chino123"
      }
  }
}

ユーザーのホームタイムラインを一覧で取得する

/posting/timeline/home/list

必要なスコープ

  • post.read
  • user.read

パラメータ

パラメータ名 説明
userId string ユーザーID
limit number? 取得したい件数を指定します。最大100件。デフォルト値は30件。

リクエスト例

POST /posting/timeline/home/list

{"userId": "5972e8f4d61aea367cbf6972", "limit": 5}

レスポンス例

status: 200 OK
{
  "resultType": "postings",
  "result": [{ "postingオブジェクト" }, { "postingオブジェクト" }, ...]
}

[執筆中]