{"action":"closed","issue":{"url":"https://api.github.com/repos/plone/plone.api/issues/210","labels_url":"https://api.github.com/repos/plone/plone.api/issues/210/labels{/name}","comments_url":"https://api.github.com/repos/plone/plone.api/issues/210/comments","events_url":"https://api.github.com/repos/plone/plone.api/issues/210/events","html_url":"https://github.com/plone/plone.api/issues/210","id":56442284,"number":210,"title":"Add content.find or content.query","user":{"login":"jaroel","id":70700,"avatar_url":"https://avatars.githubusercontent.com/u/70700?v=3","gravatar_id":"","url":"https://api.github.com/users/jaroel","html_url":"https://github.com/jaroel","followers_url":"https://api.github.com/users/jaroel/followers","following_url":"https://api.github.com/users/jaroel/following{/other_user}","gists_url":"https://api.github.com/users/jaroel/gists{/gist_id}","starred_url":"https://api.github.com/users/jaroel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaroel/subscriptions","organizations_url":"https://api.github.com/users/jaroel/orgs","repos_url":"https://api.github.com/users/jaroel/repos","events_url":"https://api.github.com/users/jaroel/events{/privacy}","received_events_url":"https://api.github.com/users/jaroel/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/plone/plone.api/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":{"login":"jaroel","id":70700,"avatar_url":"https://avatars.githubusercontent.com/u/70700?v=3","gravatar_id":"","url":"https://api.github.com/users/jaroel","html_url":"https://github.com/jaroel","followers_url":"https://api.github.com/users/jaroel/followers","following_url":"https://api.github.com/users/jaroel/following{/other_user}","gists_url":"https://api.github.com/users/jaroel/gists{/gist_id}","starred_url":"https://api.github.com/users/jaroel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaroel/subscriptions","organizations_url":"https://api.github.com/users/jaroel/orgs","repos_url":"https://api.github.com/users/jaroel/repos","events_url":"https://api.github.com/users/jaroel/events{/privacy}","received_events_url":"https://api.github.com/users/jaroel/received_events","type":"User","site_admin":false},"milestone":null,"comments":12,"created_at":"2015-02-03T21:45:34Z","updated_at":"2015-02-12T15:46:11Z","closed_at":"2015-02-12T15:46:11Z","body":"I'd like to abstract away portal_catalog by mapping portal_catalog.\\__call__ to content.query or content.find.\r\n\r\nSo\r\n```python\r\ndocuments = api.content.find(portal_type='Document')\r\n```\r\ninstead of\r\n```python\r\ncatalog = api.portal.get_tool(name='portal_catalog')\r\ndocuments = catalog(portal_type='Document')\r\n```\r\n\r\nWe can also include context, as in 'find within this context'\r\n```python\r\ndocuments = api.content.find(portal_type='Document', context=self.context)\r\n```\r\n\r\nPlease discuss :)"}}