Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Task {
- constructor(public type: String) {
- }
- parameters: any = {};
- }
- class ScrollTask extends Task {
- // by default will scroll 3 posts
- constructor(skipPosts: Number = 3) {
- super('scroll');
- this.parameters = {
- skipPosts: skipPosts
- }
- }
- }
- class ReactTask extends Task {
- //by default will react with the most used reaction
- constructor(reaction?: String) {
- super('react');
- this.parameters = {
- reaction: reaction
- }
- }
- }
- class LikeTask extends Task {
- constructor() {
- super('like');
- }
- }
- class ShareTask extends Task {
- constructor() {
- super('share')
- }
- }
- class CommentTask extends Task {
- //by default will use random sticker
- constructor(gifOrSticker: String = "sticker") {
- super('comment');
- this.parameters = {
- type: gifOrSticker
- }
- }
- }
- class GoTopTask extends Task {
- constructor() {
- super('gotop')
- }
- }
- class PostTextTask extends Task {
- //requires some text
- constructor(textToPost: String) {
- super('postText');
- this.parameters = {
- textToPost: textToPost
- }
- }
- }
- class PostLinkTask extends Task {
- //requires link to post, and optional text
- constructor(linkToPost: String, textToPost?: String) {
- super('postLink');
- this.parameters = {
- textToPost: textToPost,
- linkToPost: linkToPost
- }
- }
- }
- class AskFriendsTask extends Task {
- //by default will send just 1 friend request;
- constructor(count: Number = 1) {
- super('askFriends')
- this.parameters = {
- count: count
- }
- }
- }
- class AcceptFriendsTask extends Task {
- //by default will accept just 1 friend request
- constructor(count: Number = 1) {
- super('acceptFriends');
- this.parameters = {
- count: count
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement