Module: Commons::Client::Content

Included in:
Commons::Client
Defined in:
lib/commons/client/content.rb

Instance Method Summary collapse

Instance Method Details

#content(id, options = {}) ⇒ Array<Hashie::Mash>

Use this query to get the information about one product

Examples:

Commons.content("13351")

Parameters:

  • id (String)

    The id for the product number

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Array<Hashie::Mash>)

See Also:



12
13
14
# File 'lib/commons/client/content.rb', line 12

def content(id,options={})
  get("node/#{id}.json", options)
end

#taxonomy_term(id, options = {}) ⇒ Array<Hashie::Mash>

Use this query to get the Taxonomy Terms

Examples:

Commons.content("13351")

Parameters:

  • id (String)

    The id for Taxonomy Term

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Array<Hashie::Mash>)

See Also:



24
25
26
# File 'lib/commons/client/content.rb', line 24

def taxonomy_term(id,options={})
  get("taxonomy_term/#{id}.json", options)
end