Sha256: 3427d4f463e16d875971f0f231f915d41e12c0ab6ce3ec3260c2d65204d3c4f1

Contents?: true

Size: 355 Bytes

Versions: 14

Compression:

Stored size: 355 Bytes

Contents

module Flydata
  module Api
    class Base
      def initialize(api_client)
        @client = api_client
      end
      def list(params={})
        @client.get(@url_path)
      end
      def create(params={})
        params.each {|k, v| @url_path.gsub!(/:#{k}/, v.to_s)}
        @client.post(@url_path, @model_name => params)
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
flydata-0.0.2.3 lib/flydata/api/base.rb
flydata-0.0.2.2 lib/flydata/api/base.rb
flydata-0.0.2.1 lib/flydata/api/base.rb
flydata-0.0.2 lib/flydata/api/base.rb
flydata-0.0.2.rc1 lib/flydata/api/base.rb
flydata-0.0.1.2011102901 lib/flydata/api/base.rb
flydata-0.0.1.nc2 lib/flydata/api/base.rb
flydata-0.0.1.nc1 lib/flydata/api/base.rb
flydata-0.0.1.2011102602 lib/flydata/api/base.rb
flydata-0.0.1.2011102601 lib/flydata/api/base.rb
flydata-0.0.1.2011102401 lib/flydata/api/base.rb
flydata-0.0.1.2011102303 lib/flydata/api/base.rb
flydata-0.0.1.2011102302 lib/flydata/api/base.rb
flydata-0.0.1.2011102301 lib/flydata/api/base.rb