Class: Applicants::ScreencastOMatic::UrlBuilder
- Inherits:
-
Object
- Object
- Applicants::ScreencastOMatic::UrlBuilder
- Defined in:
- app/lib/applicants/screencast_o_matic/url_builder.rb
Instance Attribute Summary collapse
-
#applicant ⇒ Object
readonly
Returns the value of attribute applicant.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
Instance Method Summary collapse
- #callback_url ⇒ Object
- #descriptor_file_url ⇒ Object
-
#initialize(applicant, host, port) ⇒ UrlBuilder
constructor
A new instance of UrlBuilder.
- #thank_you_page_url ⇒ Object
- #upload_callback_url ⇒ Object
Constructor Details
#initialize(applicant, host, port) ⇒ UrlBuilder
Returns a new instance of UrlBuilder.
8 9 10 11 12 |
# File 'app/lib/applicants/screencast_o_matic/url_builder.rb', line 8 def initialize applicant, host, port @applicant = applicant @host = host @port = port end |
Instance Attribute Details
#applicant ⇒ Object (readonly)
Returns the value of attribute applicant.
6 7 8 |
# File 'app/lib/applicants/screencast_o_matic/url_builder.rb', line 6 def applicant @applicant end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
6 7 8 |
# File 'app/lib/applicants/screencast_o_matic/url_builder.rb', line 6 def host @host end |
Instance Method Details
#callback_url ⇒ Object
28 29 30 |
# File 'app/lib/applicants/screencast_o_matic/url_builder.rb', line 28 def callback_url screen_recorder_callbacks_applicant_url(applicant, url_params) end |
#descriptor_file_url ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/lib/applicants/screencast_o_matic/url_builder.rb', line 14 def descriptor_file_url uri = URI::HTTPS.build({ host: host, path: "/screen_recorder/applicants/#{applicant.id}/file/#{applicant.video_handle}", query: { upload_callback_url: upload_callback_url, thank_you_page_url: thank_you_page_url, screen_recorder_callback_url: callback_url }.to_query, }) uri.scheme = "usertesting" uri.to_s end |
#thank_you_page_url ⇒ Object
32 33 34 |
# File 'app/lib/applicants/screencast_o_matic/url_builder.rb', line 32 def thank_you_page_url next_steps_applicant_url(applicant, url_params) end |
#upload_callback_url ⇒ Object
36 37 38 |
# File 'app/lib/applicants/screencast_o_matic/url_builder.rb', line 36 def upload_callback_url video_server_callback_applicant_url(applicant, url_params) end |