Module: OneLogin::Api::Util::UrlBuilder
- Included in:
- OneLogin::Api::Util
- Defined in:
- lib/onelogin/api/util/url_builder.rb
Instance Method Summary collapse
-
#url_for(base, obj_id = nil, extra_id = nil) ⇒ Object
Build the URL of the API endpoint.
Instance Method Details
#url_for(base, obj_id = nil, extra_id = nil) ⇒ Object
Build the URL of the API endpoint
12 13 14 15 16 17 18 19 20 |
# File 'lib/onelogin/api/util/url_builder.rb', line 12 def url_for(base, obj_id=nil, extra_id=nil) if obj_id.nil? || obj_id.to_s.empty? base % [@region] elsif extra_id.nil? || extra_id.to_s.empty? base % [@region, obj_id] else base % [@region, obj_id, extra_id] end end |