motion-prime/api_client.rb in motion-prime-0.4.5 vs motion-prime/api_client.rb in motion-prime-0.5.0

- old
+ new

@@ -4,11 +4,11 @@ def initialize(options = {}) self.access_token = options[:access_token] end def parse_json(text) - BW::JSON.parse(text) + Prime::JSON.parse(text) rescue NSLog("Can't parse json: #{text}") false end @@ -47,9 +47,13 @@ end def api_url(path) return path if path =~ /^http(s)?:\/\// "#{MotionPrime::Config.api.base}/api/v1#{path}" + end + + def page_url(path) + "#{MotionPrime::Config.api.base}/#{path}" end def resource_url(path) # return if path.blank? base = Prime::Config.api.resource_base.present? ? Prime::Config.api.resource_base : Prime::Config.api.base \ No newline at end of file