API: about.json: refactor

This commit is contained in:
Arthi-chaud
2022-02-24 20:43:49 +01:00
parent b52fce4508
commit 6c48f43c37
3 changed files with 556 additions and 562 deletions
+259 -261
View File
@@ -1,261 +1,259 @@
[
{
"name": "Discord",
"actions": [
{
"name": "OnDiscordMessage",
"description": "An even triggered by the reception of a direct message",
"params": [],
"returns": [
{
"name": "MESSAGE",
"description": "The body of the received message"
},
{
"name": "AUTHOR_ID",
"description": "The Discord ID of the message's author"
},
{
"name": "AUTHOR_NAME",
"description": "The Discord username of the message's author"
}
]
},
{
"name": "OnDiscordMessageFrom",
"description": "An even triggered by the reception of a direct message from a specified user",
"params": [
{
"name": "user_id",
"type": "string",
"description": "The Discord ID of the sender"
}
],
"returns": [
{
"name": "MESSAGE",
"description": "The body of the received message"
},
{
"name": "AUTHOR_ID",
"description": "The Discord ID of the message's author"
},
{
"name": "AUTHOR_NAME",
"description": "The Discord username of the message's author"
}
]
},
{
"name": "OnDiscordMention",
"description": "An even triggered when the authenticated user is mentioned",
"params": [],
"returns": [
{
"name": "MESSAGE",
"description": "The body of the received message"
},
{
"name": "AUTHOR_ID",
"description": "The Discord ID of the message's author"
},
{
"name": "AUTHOR_NAME",
"description": "The Discord username of the message's author"
}
]
},
{
"name": "OnNewDiscordGuildMember",
"description": "An even triggered when a new member joins a guild",
"params": [],
"returns": [
{
"name": "NEW_MEMBER_ID",
"description": "The Discord ID of the new member"
},
{
"name": "NEW_MEMBER_NAME",
"description": "The Discord Username of the new member"
},
{
"name": "SERVER_ID",
"description": "The Discord ID of the guild"
},
{
"name": "SERVER_NAME",
"description": "The name of the guild"
}
]
},
{
"name": "OnDiscordGuildLeave",
"description": "An even triggered when a member leaves a guild",
"params": [],
"returns": [
{
"name": "NEW_MEMBER_ID",
"description": "The Discord ID of the new member"
},
{
"name": "NEW_MEMBER_NAME",
"description": "The Discord Username of the new member"
},
{
"name": "SERVER_ID",
"description": "The Discord ID of the guild"
},
{
"name": "SERVER_NAME",
"description": "The name of the guild"
}
]
}
],
"reactions": [
{
"name": "PostDiscordMessage",
"description": "Posts a message on a given server (in a given channel)",
"params": [
{
"name": "server_id",
"type": "string",
"description": "The Discord ID of the server"
},
{
"name": "channel_id",
"type": "string",
"description": "The Discord ID of the channel"
},
{
"name": "content",
"type": "string",
"description": "The body of the message to post"
}
],
"returns": [
{
"name": "USER_ID",
"description": "The Discord ID of the sender"
},
{
"name": "USERNAME",
"description": "The Discord username of the sender"
},
{
"name": "MESSAGE_CONTENT",
"description": "The body of the posted message"
},
{
"name": "CHANNEL_ID",
"description": "The Discord ID of the channel"
},
{
"name": "CHANNEL_NAME",
"description": "The Discord name of the channel"
},
{
"name": "SERVER_ID",
"description": "The Discord ID of the server"
},
{
"name": "SERVER_NAME",
"description": "The Discord name of the server"
}
]
},
{
"name": "PostDiscordDM",
"description": "Sends a message to a given user",
"params": [
{
"name": "other_id",
"type": "string",
"description": "The Discord ID of the sendee"
},
{
"name": "content",
"type": "string",
"description": "The body of the message to send"
}
],
"returns": [
{
"name": "USER_ID",
"description": "The Discord ID of the sender"
},
{
"name": "USERNAME",
"description": "The Discord username of the sender"
},
{
"name": "MESSAGE_CONTENT",
"description": "The body of the posted message"
},
{
"name": "SENDEE_ID",
"description": "The Discord ID of the sendee"
},
{
"name": "SENDEE_USERNAME",
"description": "The Discord name of the sendee"
}
]
},
{
"name": "LeaveDiscordServer",
"description": "Leave given Discord server",
"params": [
{
"name": "server_id",
"type": "string",
"description": "The Discord ID of the server"
}
],
"returns": [
{
"name": "USER_ID",
"description": "The Discord ID of the leaver"
},
{
"name": "USERNAME",
"description": "The Discord username of the leaver"
},
{
"name": "SERVER_ID",
"description": "The Discord ID of the server"
},
{
"name": "SERVER_NAME",
"description": "The Discord name of the server"
}
]
},
{
"name": "SetDiscordStatus",
"description": "Leave given Discord server",
"params": [
{
"name": "status",
"type": "string",
"description": "The status to set"
}
],
"returns": [
{
"name": "USER_ID",
"description": "The Discord ID of the user"
},
{
"name": "USERNAME",
"description": "The Discord username of the user"
},
{
"name": "STATUS",
"description": "The Discord status of the user"
}
]
}
]
}
]
{
"name": "Discord",
"actions": [
{
"name": "OnDiscordMessage",
"description": "An even triggered by the reception of a direct message",
"params": [],
"returns": [
{
"name": "MESSAGE",
"description": "The body of the received message"
},
{
"name": "AUTHOR_ID",
"description": "The Discord ID of the message's author"
},
{
"name": "AUTHOR_NAME",
"description": "The Discord username of the message's author"
}
]
},
{
"name": "OnDiscordMessageFrom",
"description": "An even triggered by the reception of a direct message from a specified user",
"params": [
{
"name": "user_id",
"type": "string",
"description": "The Discord ID of the sender"
}
],
"returns": [
{
"name": "MESSAGE",
"description": "The body of the received message"
},
{
"name": "AUTHOR_ID",
"description": "The Discord ID of the message's author"
},
{
"name": "AUTHOR_NAME",
"description": "The Discord username of the message's author"
}
]
},
{
"name": "OnDiscordMention",
"description": "An even triggered when the authenticated user is mentioned",
"params": [],
"returns": [
{
"name": "MESSAGE",
"description": "The body of the received message"
},
{
"name": "AUTHOR_ID",
"description": "The Discord ID of the message's author"
},
{
"name": "AUTHOR_NAME",
"description": "The Discord username of the message's author"
}
]
},
{
"name": "OnNewDiscordGuildMember",
"description": "An even triggered when a new member joins a guild",
"params": [],
"returns": [
{
"name": "NEW_MEMBER_ID",
"description": "The Discord ID of the new member"
},
{
"name": "NEW_MEMBER_NAME",
"description": "The Discord Username of the new member"
},
{
"name": "SERVER_ID",
"description": "The Discord ID of the guild"
},
{
"name": "SERVER_NAME",
"description": "The name of the guild"
}
]
},
{
"name": "OnDiscordGuildLeave",
"description": "An even triggered when a member leaves a guild",
"params": [],
"returns": [
{
"name": "NEW_MEMBER_ID",
"description": "The Discord ID of the new member"
},
{
"name": "NEW_MEMBER_NAME",
"description": "The Discord Username of the new member"
},
{
"name": "SERVER_ID",
"description": "The Discord ID of the guild"
},
{
"name": "SERVER_NAME",
"description": "The name of the guild"
}
]
}
],
"reactions": [
{
"name": "PostDiscordMessage",
"description": "Posts a message on a given server (in a given channel)",
"params": [
{
"name": "server_id",
"type": "string",
"description": "The Discord ID of the server"
},
{
"name": "channel_id",
"type": "string",
"description": "The Discord ID of the channel"
},
{
"name": "content",
"type": "string",
"description": "The body of the message to post"
}
],
"returns": [
{
"name": "USER_ID",
"description": "The Discord ID of the sender"
},
{
"name": "USERNAME",
"description": "The Discord username of the sender"
},
{
"name": "MESSAGE_CONTENT",
"description": "The body of the posted message"
},
{
"name": "CHANNEL_ID",
"description": "The Discord ID of the channel"
},
{
"name": "CHANNEL_NAME",
"description": "The Discord name of the channel"
},
{
"name": "SERVER_ID",
"description": "The Discord ID of the server"
},
{
"name": "SERVER_NAME",
"description": "The Discord name of the server"
}
]
},
{
"name": "PostDiscordDM",
"description": "Sends a message to a given user",
"params": [
{
"name": "other_id",
"type": "string",
"description": "The Discord ID of the sendee"
},
{
"name": "content",
"type": "string",
"description": "The body of the message to send"
}
],
"returns": [
{
"name": "USER_ID",
"description": "The Discord ID of the sender"
},
{
"name": "USERNAME",
"description": "The Discord username of the sender"
},
{
"name": "MESSAGE_CONTENT",
"description": "The body of the posted message"
},
{
"name": "SENDEE_ID",
"description": "The Discord ID of the sendee"
},
{
"name": "SENDEE_USERNAME",
"description": "The Discord name of the sendee"
}
]
},
{
"name": "LeaveDiscordServer",
"description": "Leave given Discord server",
"params": [
{
"name": "server_id",
"type": "string",
"description": "The Discord ID of the server"
}
],
"returns": [
{
"name": "USER_ID",
"description": "The Discord ID of the leaver"
},
{
"name": "USERNAME",
"description": "The Discord username of the leaver"
},
{
"name": "SERVER_ID",
"description": "The Discord ID of the server"
},
{
"name": "SERVER_NAME",
"description": "The Discord name of the server"
}
]
},
{
"name": "SetDiscordStatus",
"description": "Leave given Discord server",
"params": [
{
"name": "status",
"type": "string",
"description": "The status to set"
}
],
"returns": [
{
"name": "USER_ID",
"description": "The Discord ID of the user"
},
{
"name": "USERNAME",
"description": "The Discord username of the user"
},
{
"name": "STATUS",
"description": "The Discord status of the user"
}
]
}
]
}
+144 -146
View File
@@ -1,146 +1,144 @@
[
{
"name": "Spotify",
"actions": [
{
"name": "OnSpotifyAddToPlaylist",
"description": "Event triggered when a song is added to a Spotify playlist",
"params": [
{
"name": "playlistId",
"type": "string",
"description": "The Spotify ID of the playlist to watch"
}
],
"returns": [
{
"name": "ID",
"description": "ID of the added track"
},
{
"name": "NAME",
"description": "Name of the added track"
}
]
},
{
"name": "OnSpotifySaveToLibrary",
"description": "Event triggered when a song is added to a Spotify library",
"params": [],
"returns": [
{
"name": "ID",
"description": "ID of the added track"
},
{
"name": "NAME",
"description": "Name of the added track"
}
]
}
],
"reactions": [
{
"name": "PlayTrack",
"description": "Play a track",
"params": [
{
"name": "artist",
"type": "string",
"description": "Artist of the song to play"
},
{
"name": "track",
"type": "string",
"description": "Title of the song to play"
}
],
"returns": [
{
"name": "URL",
"description": "URL of the song"
},
{
"name": "ARTIST",
"description": "Artist of the song"
},
{
"name": "TRACK",
"description": "Title of the song"
}
]
},
{
"name": "Pause",
"description": "Pause play",
"params": [],
"returns": []
},
{
"name": "AddTrackToLibrary",
"description": "Add a track to library",
"params": [
{
"name": "artist",
"type": "string",
"description": "Artist of the song to add"
},
{
"name": "track",
"type": "string",
"description": "Title of the song to add"
}
],
"returns": [
{
"name": "URL",
"description": "URL of the added song"
},
{
"name": "ARTIST",
"description": "Artist of the added song"
},
{
"name": "TRACK",
"description": "Title of the added song"
}
]
},
{
"name": "AddToPlaylist",
"description": "Add a track to a playlist",
"params": [
{
"name": "artist",
"type": "string",
"description": "Artist of the song to add"
},
{
"name": "track",
"type": "string",
"description": "Title of the song to add"
},
{
"name": "playlist",
"type": "string",
"description": "Name of the playlist"
}
],
"returns": [
{
"name": "URL",
"description": "URL of the added song"
},
{
"name": "ARTIST",
"description": "Artist of the added song"
},
{
"name": "TRACK",
"description": "Title of the added song"
}
]
}
]
}
]
{
"name": "Spotify",
"actions": [
{
"name": "OnSpotifyAddToPlaylist",
"description": "Event triggered when a song is added to a Spotify playlist",
"params": [
{
"name": "playlistId",
"type": "string",
"description": "The Spotify ID of the playlist to watch"
}
],
"returns": [
{
"name": "ID",
"description": "ID of the added track"
},
{
"name": "NAME",
"description": "Name of the added track"
}
]
},
{
"name": "OnSpotifySaveToLibrary",
"description": "Event triggered when a song is added to a Spotify library",
"params": [],
"returns": [
{
"name": "ID",
"description": "ID of the added track"
},
{
"name": "NAME",
"description": "Name of the added track"
}
]
}
],
"reactions": [
{
"name": "PlayTrack",
"description": "Play a track",
"params": [
{
"name": "artist",
"type": "string",
"description": "Artist of the song to play"
},
{
"name": "track",
"type": "string",
"description": "Title of the song to play"
}
],
"returns": [
{
"name": "URL",
"description": "URL of the song"
},
{
"name": "ARTIST",
"description": "Artist of the song"
},
{
"name": "TRACK",
"description": "Title of the song"
}
]
},
{
"name": "Pause",
"description": "Pause play",
"params": [],
"returns": []
},
{
"name": "AddTrackToLibrary",
"description": "Add a track to library",
"params": [
{
"name": "artist",
"type": "string",
"description": "Artist of the song to add"
},
{
"name": "track",
"type": "string",
"description": "Title of the song to add"
}
],
"returns": [
{
"name": "URL",
"description": "URL of the added song"
},
{
"name": "ARTIST",
"description": "Artist of the added song"
},
{
"name": "TRACK",
"description": "Title of the added song"
}
]
},
{
"name": "AddToPlaylist",
"description": "Add a track to a playlist",
"params": [
{
"name": "artist",
"type": "string",
"description": "Artist of the song to add"
},
{
"name": "track",
"type": "string",
"description": "Title of the song to add"
},
{
"name": "playlist",
"type": "string",
"description": "Name of the playlist"
}
],
"returns": [
{
"name": "URL",
"description": "URL of the added song"
},
{
"name": "ARTIST",
"description": "Artist of the added song"
},
{
"name": "TRACK",
"description": "Title of the added song"
}
]
}
]
}
+153 -155
View File
@@ -1,155 +1,153 @@
[
{
"name": "Youtube",
"actions": [
{
"name": "OnYtUpload",
"description": "Event triggered on video upload",
"params": [
{
"name": "channel",
"type": "string",
"description": "Name of the channel to watch over"
}
],
"returns": [
{
"name": "ID",
"description": "Youtube ID of the uploaded video"
},
{
"name": "CHANNEL_ID",
"description": "Youtube ID of the channel the video was uploaded to"
},
{
"name": "TITLE",
"description": "Title of the uploaded video"
},
{
"name": "DESCRIPTION",
"description": "Description of the uploaded video"
},
{
"name": "PUBLISHED_AT",
"description": "Date of the release"
},
{
"name": "CHANNEL_TITLE",
"description": "Name of the channel the video was uploaded to"
}
]
},
{
///TODO implement action
"name": "OnYtLike",
"description": "Event triggered on video like",
"params": [],
"returns": []
},
{
"name": "OnYtPlaylistAdd",
"description": "Event triggered when a video is added to a playlist",
"params": [
{
"name": "playlistId",
"type": "string",
"description": "ID of the playlist to watch over"
}
],
"returns": [
{
"name": "ID",
"description": "Youtube ID of the added video"
},
{
"name": "CHANNEL_ID",
"description": "Youtube ID of the channel the video was uploaded to"
},
{
"name": "TITLE",
"description": "Title of the uploaded video"
},
{
"name": "DESCRIPTION",
"description": "Description of the uploaded video"
},
{
"name": "LIKED_AT",
"description": "Date of the video like"
},
{
"name": "CHANNEL_TITLE",
"description": "Name of the channel the video was uploaded to"
}
]
}
],
"reactions": [
{
"name": "YtLike",
"description": "Like a Youtube video",
"params": [
{
"name": "videoId",
"type": "string",
"description": "ID of the video to like"
}
],
"returns": [
{
"name": "ID",
"description": "Youtube ID of the liked video"
}
]
},
{
"name": "YtComment",
"description": "Comment a Youtube video",
"params": [
{
"name": "videoId",
"type": "string",
"description": "ID of the video to like"
},
{
"name": "body",
"type": "string",
"description": "Content of the comment"
}
],
"returns": [
{
"name": "ID",
"description": "Youtube ID of the commented video"
}
]
},
{
"name": "YtAddToPlaylist",
"description": "Add a Youtube video to a playlist",
"params": [
{
"name": "videoId",
"type": "string",
"description": "ID of the video to add"
},
{
"name": "playlistId",
"type": "string",
"description": "ID of the playlist to add the video to"
}
],
"returns": [
{
"name": "VIDEO_ID",
"description": "Youtube ID of the added video"
},
{
"name": "PLAYLIST_ID",
"description": "Youtube ID of the playlist"
}
]
}
]
}
]
{
"name": "Youtube",
"actions": [
{
"name": "OnYtUpload",
"description": "Event triggered on video upload",
"params": [
{
"name": "channel",
"type": "string",
"description": "Name of the channel to watch over"
}
],
"returns": [
{
"name": "ID",
"description": "Youtube ID of the uploaded video"
},
{
"name": "CHANNEL_ID",
"description": "Youtube ID of the channel the video was uploaded to"
},
{
"name": "TITLE",
"description": "Title of the uploaded video"
},
{
"name": "DESCRIPTION",
"description": "Description of the uploaded video"
},
{
"name": "PUBLISHED_AT",
"description": "Date of the release"
},
{
"name": "CHANNEL_TITLE",
"description": "Name of the channel the video was uploaded to"
}
]
},
{
///TODO implement action
"name": "OnYtLike",
"description": "Event triggered on video like",
"params": [],
"returns": []
},
{
"name": "OnYtPlaylistAdd",
"description": "Event triggered when a video is added to a playlist",
"params": [
{
"name": "playlistId",
"type": "string",
"description": "ID of the playlist to watch over"
}
],
"returns": [
{
"name": "ID",
"description": "Youtube ID of the added video"
},
{
"name": "CHANNEL_ID",
"description": "Youtube ID of the channel the video was uploaded to"
},
{
"name": "TITLE",
"description": "Title of the uploaded video"
},
{
"name": "DESCRIPTION",
"description": "Description of the uploaded video"
},
{
"name": "LIKED_AT",
"description": "Date of the video like"
},
{
"name": "CHANNEL_TITLE",
"description": "Name of the channel the video was uploaded to"
}
]
}
],
"reactions": [
{
"name": "YtLike",
"description": "Like a Youtube video",
"params": [
{
"name": "videoId",
"type": "string",
"description": "ID of the video to like"
}
],
"returns": [
{
"name": "ID",
"description": "Youtube ID of the liked video"
}
]
},
{
"name": "YtComment",
"description": "Comment a Youtube video",
"params": [
{
"name": "videoId",
"type": "string",
"description": "ID of the video to like"
},
{
"name": "body",
"type": "string",
"description": "Content of the comment"
}
],
"returns": [
{
"name": "ID",
"description": "Youtube ID of the commented video"
}
]
},
{
"name": "YtAddToPlaylist",
"description": "Add a Youtube video to a playlist",
"params": [
{
"name": "videoId",
"type": "string",
"description": "ID of the video to add"
},
{
"name": "playlistId",
"type": "string",
"description": "ID of the playlist to add the video to"
}
],
"returns": [
{
"name": "VIDEO_ID",
"description": "Youtube ID of the added video"
},
{
"name": "PLAYLIST_ID",
"description": "Youtube ID of the playlist"
}
]
}
]
}