315 lines
9.5 KiB
JSON
315 lines
9.5 KiB
JSON
{
|
|
"openrpc": "1.0.0",
|
|
"info": {
|
|
"title": "Hero Models API",
|
|
"version": "1.0.0"
|
|
},
|
|
"methods": [
|
|
{
|
|
"name": "comment_get",
|
|
"summary": "Get a comment by ID",
|
|
"params": [
|
|
{
|
|
"name": "id",
|
|
"description": "ID of comment to fetch",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
}
|
|
}
|
|
],
|
|
"result": {
|
|
"name": "comment",
|
|
"description": "Comment object",
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Comment"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "comment_set",
|
|
"summary": "Create or update a comment",
|
|
"params": [
|
|
{
|
|
"name": "comment",
|
|
"description": "Comment text",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"description": "ID of parent comment if any, 0 means none",
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "author",
|
|
"description": "ID of the author user",
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
}
|
|
}
|
|
],
|
|
"result": {
|
|
"name": "id",
|
|
"description": "ID of the created/updated comment",
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "comment_delete",
|
|
"summary": "Delete a comment by ID",
|
|
"params": [
|
|
{
|
|
"name": "id",
|
|
"description": "ID of comment to delete",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
}
|
|
}
|
|
],
|
|
"result": {
|
|
"name": "result",
|
|
"description": "Success result",
|
|
"schema": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "comment_list",
|
|
"summary": "List all comments",
|
|
"params": [],
|
|
"result": {
|
|
"name": "comments",
|
|
"description": "List of all comment objects",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Comment"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "calendar_get",
|
|
"summary": "Get a calendar by ID",
|
|
"params": [
|
|
{
|
|
"name": "id",
|
|
"description": "ID of calendar to fetch",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
}
|
|
}
|
|
],
|
|
"result": {
|
|
"name": "calendar",
|
|
"description": "Calendar object",
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Calendar"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "calendar_set",
|
|
"summary": "Create or update a calendar",
|
|
"params": [
|
|
{
|
|
"name": "name",
|
|
"description": "Name of the calendar",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "description",
|
|
"description": "Description of the calendar",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "color",
|
|
"description": "Hex color code for the calendar",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "timezone",
|
|
"description": "Timezone of the calendar",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "is_public",
|
|
"description": "Whether the calendar is public",
|
|
"schema": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
{
|
|
"name": "events",
|
|
"description": "IDs of calendar events",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"result": {
|
|
"name": "id",
|
|
"description": "ID of the created/updated calendar",
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "calendar_delete",
|
|
"summary": "Delete a calendar by ID",
|
|
"params": [
|
|
{
|
|
"name": "id",
|
|
"description": "ID of calendar to delete",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
}
|
|
}
|
|
],
|
|
"result": {
|
|
"name": "result",
|
|
"description": "Success result",
|
|
"schema": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "calendar_list",
|
|
"summary": "List all calendars",
|
|
"params": [],
|
|
"result": {
|
|
"name": "calendars",
|
|
"description": "List of all calendar objects",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Calendar"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"components": {
|
|
"schemas": {
|
|
"Base": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "integer"
|
|
},
|
|
"updated_at": {
|
|
"type": "integer"
|
|
},
|
|
"securitypolicy": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"tags": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"comments": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Comment": {
|
|
"title": "Comment",
|
|
"description": "A comment object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Base"
|
|
}
|
|
],
|
|
"properties": {
|
|
"comment": {
|
|
"type": "string"
|
|
},
|
|
"parent": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"author": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
}
|
|
}
|
|
},
|
|
"Calendar": {
|
|
"title": "Calendar",
|
|
"description": "A calendar object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Base"
|
|
}
|
|
],
|
|
"properties": {
|
|
"events": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
}
|
|
},
|
|
"color": {
|
|
"type": "string"
|
|
},
|
|
"timezone": {
|
|
"type": "string"
|
|
},
|
|
"is_public": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |