Class: FacebookApp::InfographicServerCommunicator
- Inherits:
-
Object
- Object
- FacebookApp::InfographicServerCommunicator
- Defined in:
- app/models/facebook_app/infographic_server_communicator.rb
Constant Summary collapse
- INFOGRAPHIC_SERVER_PASSWORD =
"henry-hughes"
- SERVER_IP =
"http://50.19.35.130"
- SERVER_URL =
SERVER_IP + "/infographics"
Instance Attribute Summary collapse
-
#post_parameters ⇒ Object
readonly
Returns the value of attribute post_parameters.
Instance Method Summary collapse
-
#initialize(options) ⇒ InfographicServerCommunicator
constructor
A new instance of InfographicServerCommunicator.
- #send_to_server ⇒ Object
Constructor Details
#initialize(options) ⇒ InfographicServerCommunicator
Returns a new instance of InfographicServerCommunicator.
12 13 14 |
# File 'app/models/facebook_app/infographic_server_communicator.rb', line 12 def initialize() @post_parameters = .merge(:secret => INFOGRAPHIC_SERVER_PASSWORD) end |
Instance Attribute Details
#post_parameters ⇒ Object (readonly)
Returns the value of attribute post_parameters.
10 11 12 |
# File 'app/models/facebook_app/infographic_server_communicator.rb', line 10 def post_parameters @post_parameters end |
Instance Method Details
#send_to_server ⇒ Object
16 17 18 |
# File 'app/models/facebook_app/infographic_server_communicator.rb', line 16 def send_to_server Net::HTTP.post_form(URI.parse(SERVER_URL), post_parameters) end |