watermarkchurch / wcc-contentful

An alternative to Contentful's contentful.rb ruby client, contentful_model, and contentful_rails gems all in one.
MIT License
2 stars 1 forks source link

expand model find capabilities to find by references #30

Closed jpowell closed 6 years ago

jpowell commented 6 years ago

API should resemble:

Page.find_by(subpages: { id: 'asdf234' })

see https://www.contentful.com/r/knowledgebase/searching-on-references/

jpowell commented 6 years ago

initial query to achieve this in a response format:

WCC::Contentful.configuration.client.get 'entries', 'content_type' => 'page', 'fields.subpages.sys.id' => '3mcCRlUpHiAScW2qiiqisw'