Sha256: 77919e0091a5e95a7df9dc96897cf5070a0c2c6098c096e345174652cbb99fc5

Contents?: true

Size: 452 Bytes

Versions: 1

Compression:

Stored size: 452 Bytes

Contents

module TextMagic

  class API

    class Executor

      include HTTParty
      base_uri "https://www.textmagic.com/app"

      def self.execute(command, username, password, options = {})
        options.merge!(:username => username, :password => password, :cmd => command)
        response = self.get('/api', :query => options, :format => :json)
        raise Error.new(response) if response['error_code']
        response
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bobes-textmagic-0.1.0 lib/executor.rb