mirror of
https://github.com/zoriya/Aeris.git
synced 2026-06-02 19:01:15 +00:00
Merge pull request #87 from AnonymusRaccoon/worker-services
Worker services
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "Anilist",
|
||||
"actions": [],
|
||||
"reactions": [
|
||||
{
|
||||
"name": "UpdateAbout",
|
||||
"description": "Update the about you section.",
|
||||
"params": [
|
||||
{
|
||||
"name": "about",
|
||||
"type": "string",
|
||||
"description": "The description on your profile."
|
||||
}
|
||||
],
|
||||
"returns": []
|
||||
},
|
||||
{
|
||||
"name": "ToggleFavourite",
|
||||
"description": "Add or remove an anime fro your favorite.",
|
||||
"params": [
|
||||
{
|
||||
"name": "animeID",
|
||||
"type": "string",
|
||||
"description": "The ID of the anime"
|
||||
}
|
||||
],
|
||||
"returns": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -42,7 +42,28 @@
|
||||
"name": "Youtube_OnYtLike",
|
||||
"description": "Event triggered on video like",
|
||||
"params": [],
|
||||
"returns": []
|
||||
"returns": [
|
||||
{
|
||||
"name": "ID",
|
||||
"description": "Youtube ID of the added video"
|
||||
},
|
||||
{
|
||||
"name": "CHANNEL_ID",
|
||||
"description": "Youtube ID of the channel the video was added to"
|
||||
},
|
||||
{
|
||||
"name": "TITLE",
|
||||
"description": "Title of the added video"
|
||||
},
|
||||
{
|
||||
"name": "DESCRIPTION",
|
||||
"description": "Description of the added video"
|
||||
},
|
||||
{
|
||||
"name": "CHANNEL_TITLE",
|
||||
"description": "Name of the channel the video belongs to"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Youtube_OnYtPlaylistAdd",
|
||||
@@ -145,4 +166,4 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +69,8 @@ export enum ReactionType {
|
||||
Pause,
|
||||
// Anilist
|
||||
ToggleFavourite,
|
||||
UpdateAbout,
|
||||
// Twitter
|
||||
followUser,
|
||||
postTweet,
|
||||
replyToTweet,
|
||||
|
||||
@@ -11,7 +11,7 @@ export class Anilist extends BaseService {
|
||||
this._client = new GraphQLClient("https://graphql.anilist.co/");
|
||||
}
|
||||
|
||||
@reaction(ReactionType.ToggleFavourite, ["about"])
|
||||
@reaction(ReactionType.UpdateAbout, ["about"])
|
||||
async updateAbout(params: any): Promise<PipelineEnv> {
|
||||
await this._client.request(gql`
|
||||
mutation($about: Int) {
|
||||
|
||||
Reference in New Issue
Block a user