Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Task {
  2.     constructor(public type: String) {
  3.     }
  4.  
  5.     parameters: any = {};
  6. }
  7.  
  8. class ScrollTask extends Task {
  9.  
  10.     // by default will scroll 3 posts
  11.     constructor(skipPosts: Number = 3) {
  12.         super('scroll');
  13.         this.parameters = {
  14.             skipPosts: skipPosts
  15.         }
  16.     }
  17. }
  18.  
  19. class ReactTask extends Task {
  20.     //by default will react with the most used reaction
  21.     constructor(reaction?: String) {
  22.         super('react');
  23.         this.parameters = {
  24.             reaction: reaction
  25.         }
  26.     }
  27. }
  28.  
  29. class LikeTask extends Task {
  30.     constructor() {
  31.         super('like');
  32.     }
  33. }
  34.  
  35. class ShareTask extends Task {
  36.     constructor() {
  37.         super('share')
  38.     }
  39. }
  40.  
  41. class CommentTask extends Task {
  42.     //by default will use random sticker
  43.     constructor(gifOrSticker: String = "sticker") {
  44.         super('comment');
  45.         this.parameters = {
  46.             type: gifOrSticker
  47.         }
  48.     }
  49. }
  50.  
  51. class GoTopTask extends Task {
  52.     constructor() {
  53.         super('gotop')
  54.     }
  55. }
  56.  
  57. class PostTextTask extends Task {
  58.     //requires some text
  59.     constructor(textToPost: String) {
  60.         super('postText');
  61.         this.parameters = {
  62.             textToPost: textToPost
  63.         }
  64.     }
  65. }
  66.  
  67. class PostLinkTask extends Task {
  68.     //requires link to post, and optional text
  69.     constructor(linkToPost: String, textToPost?: String) {
  70.         super('postLink');
  71.         this.parameters = {
  72.             textToPost: textToPost,
  73.             linkToPost: linkToPost
  74.         }
  75.     }
  76. }
  77.  
  78. class AskFriendsTask extends Task {
  79.     //by default will send just 1 friend request;
  80.     constructor(count: Number = 1) {
  81.         super('askFriends')
  82.         this.parameters = {
  83.             count: count
  84.         }
  85.     }
  86. }
  87.  
  88. class AcceptFriendsTask extends Task {
  89.     //by default will accept just 1 friend request
  90.     constructor(count: Number = 1) {
  91.         super('acceptFriends');
  92.         this.parameters = {
  93.             count: count
  94.         }
  95.     }
  96. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement