Class: DataScienceTheater3000::DataScienceToolkit::PostRequest

Inherits:
Request
  • Object
show all
Defined in:
lib/data_science_theater_3000/data_science_toolkit.rb

Overview

Performs a POST request to the datasciencetoolkit server PostRequest class is always used via a subclass

Direct Known Subclasses

PostBodyRequest, PostFileRequest

Constant Summary

Constants inherited from Request

Request::REQUEST_URL

Instance Attribute Summary collapse

Attributes inherited from Request

#request_method, #request_params

Instance Method Summary collapse

Methods inherited from Request

#result

Constructor Details

#initialize(opts = {}) ⇒ PostRequest

Returns a new instance of PostRequest.



41
42
43
44
# File 'lib/data_science_theater_3000/data_science_toolkit.rb', line 41

def initialize opts={}
  super
  @post_key = opts.fetch(:post_key){ raise DataScienceTheater3000Error, "No post_key option specified" }
end

Instance Attribute Details

#post_keyObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



38
39
40
# File 'lib/data_science_theater_3000/data_science_toolkit.rb', line 38

def post_key
  @post_key
end