Method: ACTV::Client#article
- Defined in:
- lib/actv/client.rb
#article(id, params = {}) ⇒ ACTV::Article
Returns an article with the specified ID
147 148 149 150 151 152 153 154 155 156 |
# File 'lib/actv/client.rb', line 147 def article id, params={} request_string = "/v2/assets/#{id}" is_preview, params = params_include_preview? params request_string += '/preview' if is_preview response = get "#{request_string}.json", params article = ACTV::Article.new response[:body] article.is_article? ? article : nil end |