Sha256: fb45fb895da96cc61a18ae5673d5a974f464e3901a5a57c89faa250568b5d125
Contents?: true
Size: 1008 Bytes
Versions: 8
Compression:
Stored size: 1008 Bytes
Contents
# This script starts Historics queries in your account. # # NB: Most of the error handling (exception catching) has been removed for # the sake of simplicity. Nearly everything in this library may throw # exceptions, and production code should catch them. See the documentation # for full details. # # Include the shared Env class require File.dirname(__FILE__) + '/env' # Create the env object. This reads the command line arguments, creates the # user object, and provides access to both along with helper functions. env = Env.new() # Make sure we have something to do abort('Please specify one or more playback IDs') unless env.args.size() > 0 begin for playback_id in env.args historic = env.user.getHistoric(playback_id) print 'Starting ' + playback_id + ', "' + historic.name + '"...' historic.start() puts 'done' end puts 'Rate limit remainining: ' + String(env.user.rate_limit_remaining) rescue DataSift::DataSiftError => err puts 'ERR: [' + err.class.name + '] ' + err.message end
Version data entries
8 entries across 8 versions & 1 rubygems