Module: Simplewoo::Client::Entity

Included in:
Simplewoo::Client
Defined in:
lib/simplewoo/client/entity.rb

Instance Method Summary collapse

Instance Method Details

#entities(slider_id, page_id = 1, options = {}) ⇒ Hashie::Mash

Returns the matched entities for the slider

Simplewoo::Client.entities(1)

Parameters:

  • slider_id (Integer)
    • The slider id that the entities are for

  • page_id (Integer) (defaults to: 1)
    • The page id that the entities are for

Returns:

  • (Hashie::Mash)

    Entities - list of entities by page

Author:

  • Tom Prats



13
14
15
# File 'lib/simplewoo/client/entity.rb', line 13

def entities(slider_id, page_id=1, options = {})
  get("/sliders/#{slider_id}/entities/page/#{page_id}", options)
end

#entity(slider_id, entity_id, options = {}) ⇒ Hashie::Mash

Returns matched the entity

Simplewoo::Client.entity(1, 1)

Parameters:

  • slider_id (Integer)
    • The slider id that the entity is for

  • entity_id (Integer)
    • The entity id that the entity is for

Returns:

  • (Hashie::Mash)

    Entity - the entity requested

Author:

  • Tom Prats



26
27
28
# File 'lib/simplewoo/client/entity.rb', line 26

def entity(slider_id, entity_id, options = {})
  get("/sliders/#{slider_id}/entities/#{entity_id}", options)
end