Module: FmRest::V1::Paths
- Included in:
- FmRest::V1
- Defined in:
- lib/fmrest/v1/paths.rb
Instance Method Summary collapse
- #container_field_path(layout, id, field_name, field_repetition = 1) ⇒ Object
- #find_path(layout) ⇒ Object
- #globals_path ⇒ Object
- #product_info_path ⇒ Object
- #record_path(layout, id = nil) ⇒ Object
- #script_path(layout, script) ⇒ Object
- #session_path(token = nil) ⇒ Object
Instance Method Details
#container_field_path(layout, id, field_name, field_repetition = 1) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/fmrest/v1/paths.rb', line 18 def container_field_path(layout, id, field_name, field_repetition = 1) url = record_path(layout, id) url += "/containers/#{V1.url_encode(field_name)}" url += "/#{field_repetition}" if field_repetition url end |
#find_path(layout) ⇒ Object
25 26 27 |
# File 'lib/fmrest/v1/paths.rb', line 25 def find_path(layout) "layouts/#{V1.url_encode(layout)}/_find" end |
#globals_path ⇒ Object
33 34 35 |
# File 'lib/fmrest/v1/paths.rb', line 33 def globals_path "globals" end |
#product_info_path ⇒ Object
37 38 39 |
# File 'lib/fmrest/v1/paths.rb', line 37 def product_info_path "#{V1::Connection::BASE_PATH}/productInfo" end |
#record_path(layout, id = nil) ⇒ Object
12 13 14 15 16 |
# File 'lib/fmrest/v1/paths.rb', line 12 def record_path(layout, id = nil) url = "layouts/#{V1.url_encode(layout)}/records" url += "/#{id}" if id url end |
#script_path(layout, script) ⇒ Object
29 30 31 |
# File 'lib/fmrest/v1/paths.rb', line 29 def script_path(layout, script) "layouts/#{V1.url_encode(layout)}/script/#{V1.url_encode(script)}" end |
#session_path(token = nil) ⇒ Object
6 7 8 9 10 |
# File 'lib/fmrest/v1/paths.rb', line 6 def session_path(token = nil) url = "sessions" url += "/#{token}" if token url end |