Using your Ruby scripts with BOTSTER.io

If you are a Ruby developer, you can deploy your simple scripts onto BOTSTER.io in a few easy steps.

Before doing any actual work, do not forget to contact us first. We have a lot of bots running in invisible test mode and - though unlikely - it could be that your idea was already implemented by someone else.

Plug-ins are currently in test mode and require a lot of manual work on our side. If you are willing to create a script and make it avaiable to our user base, we will be assisting you on every step to make things go smooth.

How it works

Right now Plug-and-play is in test mode, which is why some of the implementation steps are done manually. The steps are few and quite easy though:

  1. Sign up on BOTSTER.io
  2. Contact us for implementation help
  3. Create your script (boilerplate below)
  4. We upload your script, assign it to your account and run it in 'test mode'
  5. If it works as expected - we release it to the public

Limitations

None, at the moment.

Libraries and gems

You can require any external libraries. However, they have to be the latest versions for security reasons.

Script data and pricing

You get to come up with your script's name and description. You can also set the per-run price or make it free for everyone. The profits are split 25/75 (platform/author), minimum withdraw is $50, currently only PayPal and Payoneer.

If you are too lazy to write the descriptions we will do it for you.😃

User inputs

Users can be asked for any kind of data. The form will be designed and implemented by us, according to your specifications.

Main input data

This is the most important part of the script, it is required to be filled out. Main data can be one line (site address) or many lines (a list of URLs) with a maximum limit of 10 000 lines.

Custom options

Additionally, you can ask users to fill in optional details. Options will be delivered as a hash and are available in your class by using @options['option_name']:

options: {
'dynamic_params' => ['targetid','keyword'],
'utm_source' => 'google',
'utm_medium' => 'cpc'
}

Data output

When writing output data, we are using the following format: [{key: value},{key: value},{key: value}], which allows the users to view the data as a spreadsheet in their browser, see example. They can also export the data in CSV, XLSX or JSON formats.

Boilerplate

BOTSTER.io Ruby plug-ins are simple POROs:

YourPluginClass

def initialize(args)
  super

  # super imports:
  # @input_file # Raw user data, multi-line data separated by "\n"
  # @api_key    # If your plugin is using an external API
  # @options    # User options
  # @user_data  = file_to_array # see method below
end

def call
  # Needs to return JSON type of the following format:
  # [{key1: value1},{key1: value2},{key1: value3}]

  # Example implementation:

  arr = []

  @user_data.each do |line|
    # your logic

    h = {}
    h[:data] = line

    arr << h
  end

  arr.to_json
end

def file_to_array
  arr = []

  @input_file.split("\n").each do |line|
    arr << line # basic additional validations can be performed at this point
  end

  arr
end