Download OpenAPI specification:Download
コード共有SNS OmnisCode のAPI
[- {- "id": 0,
- "user_id": "string",
- "title": "string",
- "code": "string",
- "language": "string",
- "content": "string",
- "source": "string",
- "created_at": "2006-01-02T15:04:05+09:00",
- "updated_at": "2006-01-02T15:04:05+09:00"
 }
][- {- "id": 0,
- "user_id": "string",
- "post_id": 0,
- "type": "highlight",
- "content": "string",
- "first_line": 0,
- "last_line": 0,
- "code": "string",
- "created_at": "2006-01-02T15:04:05+09:00",
- "updated_at": "2006-01-02T15:04:05+09:00"
 }
]事前にloginが必要
| title | string | 
| code | string ソースコード | 
| language | string ソースコードの言語 | 
| content | string 説明の内容 | 
| source | string postの引用元(urlなど) | 
{- "title": "string",
- "code": "string",
- "language": "string",
- "content": "string",
- "source": "string"
}{- "id": 0,
- "user_id": "string",
- "title": "string",
- "code": "string",
- "language": "string",
- "content": "string",
- "source": "string",
- "created_at": "2006-01-02T15:04:05+09:00",
- "updated_at": "2006-01-02T15:04:05+09:00"
}{- "id": 0,
- "user_id": "string",
- "title": "string",
- "code": "string",
- "language": "string",
- "content": "string",
- "source": "string",
- "created_at": "2006-01-02T15:04:05+09:00",
- "updated_at": "2006-01-02T15:04:05+09:00"
}事前にloginが必要
| postID  required  | integer <int64>  | 
| title | string | 
| code | string ソースコード | 
| language | string ソースコードの言語 | 
| content | string 説明の内容 | 
| source | string postの引用元(urlなど) | 
{- "title": "string",
- "code": "string",
- "language": "string",
- "content": "string",
- "source": "string"
}Postに関連付けられるcommentの一覧を取得
| postID  required  | integer <int64>  | 
[- {- "id": 0,
- "user_id": "string",
- "post_id": 0,
- "type": "highlight",
- "content": "string",
- "first_line": 0,
- "last_line": 0,
- "code": "string",
- "created_at": "2006-01-02T15:04:05+09:00",
- "updated_at": "2006-01-02T15:04:05+09:00"
 }
]事前にloginが必要
| postID  required  | integer <int64>  | 
| type | string  Enum: "highlight" "commit" "none"  highlight:コードのハイライトを含む commit:コードの変更を含む none:コメントのみ | 
| content | string コメントの内容(type:noneなら必要.他のtypeでも含んでいて良い) | 
| first_line | integer <int32>  ハイライトする行の開始行数(type:highlightのみ必要) | 
| last_line | integer <int32>  ハイライトする行の終了行数(type:highlightのみ必要) | 
| code | string 変更後のコードすべてを含む(type:commitのみ必要) | 
{- "type": "highlight",
- "content": "string",
- "first_line": 0,
- "last_line": 0,
- "code": "string"
}{- "id": 0,
- "user_id": "string",
- "post_id": 0,
- "type": "highlight",
- "content": "string",
- "first_line": 0,
- "last_line": 0,
- "code": "string",
- "created_at": "2006-01-02T15:04:05+09:00",
- "updated_at": "2006-01-02T15:04:05+09:00"
}| postID  required  | integer <int64>  | 
| commentID  required  | integer <int64>  | 
{- "id": 0,
- "user_id": "string",
- "post_id": 0,
- "type": "highlight",
- "content": "string",
- "first_line": 0,
- "last_line": 0,
- "code": "string",
- "created_at": "2006-01-02T15:04:05+09:00",
- "updated_at": "2006-01-02T15:04:05+09:00"
}事前にloginが必要
| postID  required  | integer <int64>  | 
| commentID  required  | integer <int64>  | 
| type | string  Enum: "highlight" "commit" "none"  highlight:コードのハイライトを含む commit:コードの変更を含む none:コメントのみ | 
| content | string コメントの内容(type:noneなら必要.他のtypeでも含んでいて良い) | 
| first_line | integer <int32>  ハイライトする行の開始行数(type:highlightのみ必要) | 
| last_line | integer <int32>  ハイライトする行の終了行数(type:highlightのみ必要) | 
| code | string 変更後のコードすべてを含む(type:commitのみ必要) | 
{- "type": "highlight",
- "content": "string",
- "first_line": 0,
- "last_line": 0,
- "code": "string"
}{- "post": 0,
- "message": "string"
}