Sha256: 81cc45d1936cb2a4c991052dcf2135a32487ea5ac72000e58e67f60e37b124ee

Contents?: true

Size: 635 Bytes

Versions: 1

Compression:

Stored size: 635 Bytes

Contents

#!/usr/bin/env ruby

$LOAD_PATH.unshift(File.dirname(__FILE__), '..', 'lib')

require 'buff'

begin
  require 'yaml'

  options = YAML.load_file(File.expand_path('~/.bufferapprc'))
  if options.class == String
    options['access_token'], options['profile_index'] = options.split
    options['verion'] = '0.0.0'
  end
rescue
  puts "Please upgrade from older config file structure" if ENV['BUFF_DEBUG']
end

client = Buff::Client.new(options['access_token'])
id = client.profiles[options['profile_index'].to_i].id

response = client.create_update(body: {text: ARGV.join(" "), profile_ids: [ id ] } )
puts response if ENV['BUFF_DEBUG']

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
buff-0.0.6 bin/buff