Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api proposal #1

Open
zzarcon opened this issue Mar 20, 2019 · 0 comments
Open

Api proposal #1

zzarcon opened this issue Mar 20, 2019 · 0 comments

Comments

@zzarcon
Copy link
Member

zzarcon commented Mar 20, 2019

Interface

interface BotOptions {
  
} 

interface LikeOptions {
  maxLikes?: number;
}

class LuckyBot {
  constructor(userName: string, password: string, options?: BotOptions) {}
  
  like(hashtag: string, options?: LikeOptions): Promise<void> {}
}

Usage

import LuckyBot from 'luckybot';

const bot = new LuckyBot(userName, password)

await bot.like('skateboarding', {maxLikes: 50});

console.log('done');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant