Rails 4 - Using Moz API to display information in view -


I am using commodities to get data using my API, which I alternate I want to display in the scene. (Note: I am also using the evil gem to make objects in the step). I currently have this in my controller:

  def update @bid = bid.find (params [: bid_id]) @linkscape = moz if step == steps.second @ bid.attributes = Build_params Render_wizard @bid end def moz @client = Linkscape :: Client.new (: accessID = & gt; "accessID" ,: secret = & gt; "secret") @response = client.url metrics ("http: / /example.com ":: Cols = & gt ;: all) return @response end  

and in my view:

  & lt;% = Debug (@linkscape)%>  

debug part of the scene, I am nothing to do, so I think that 1) I am using the wrong syntax 2) to reach API information misinformation (I I am Moj create account and access ID and secret key, and they can be used) 3) misunderstanding of how the controller to display Wars scenes or 4) and

is a typo: you are saving Linkspace :: Client.new @client , but you're trying to call urlMetrics customer to call , There is no information about it.

  def moz client = Linkscape :: Client.new (: accessID = & gt; "accessID" ,: secret = & gt; "The Secret") @response = client.url metrics ( " Http: // Example.com ",: cols = & gt ;: all) return @response end  

Hope this helps! :)


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -