Class: Jet::Client::Taxonomy
- Inherits:
-
Object
- Object
- Jet::Client::Taxonomy
- Defined in:
- lib/jet/client/taxonomy.rb
Overview
Taxonomy client
Instance Method Summary collapse
- #get_links(limit, offset, version = 'v1') ⇒ Object
- #get_node(node_url) ⇒ Object
- #get_node_attributes(node_url) ⇒ Object
-
#initialize(client) ⇒ Taxonomy
constructor
A new instance of Taxonomy.
Constructor Details
#initialize(client) ⇒ Taxonomy
Returns a new instance of Taxonomy.
5 6 7 |
# File 'lib/jet/client/taxonomy.rb', line 5 def initialize(client) @client = client end |
Instance Method Details
#get_links(limit, offset, version = 'v1') ⇒ Object
9 10 11 12 |
# File 'lib/jet/client/taxonomy.rb', line 9 def get_links(limit, offset, version = 'v1') params = { limit: limit, offset: offset } @client.rest_get_with_token("/taxonomy/links/#{version}", params) end |
#get_node(node_url) ⇒ Object
14 15 16 |
# File 'lib/jet/client/taxonomy.rb', line 14 def get_node(node_url) @client.rest_get_with_token(node_url) end |
#get_node_attributes(node_url) ⇒ Object
18 19 20 |
# File 'lib/jet/client/taxonomy.rb', line 18 def get_node_attributes(node_url) @client.rest_get_with_token("#{node_url}/attributes") end |