{"action":"closed","issue":{"url":"https://api.github.com/repos/andrewgy8/apprentice/issues/23","repository_url":"https://api.github.com/repos/andrewgy8/apprentice","labels_url":"https://api.github.com/repos/andrewgy8/apprentice/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/andrewgy8/apprentice/issues/23/comments","events_url":"https://api.github.com/repos/andrewgy8/apprentice/issues/23/events","html_url":"https://github.com/andrewgy8/apprentice/issues/23","id":384116098,"node_id":"MDU6SXNzdWUzODQxMTYwOTg=","number":23,"title":"Increase the usability of the Apprentice API","user":{"login":"andrewgy8","id":14836934,"node_id":"MDQ6VXNlcjE0ODM2OTM0","avatar_url":"https://avatars2.githubusercontent.com/u/14836934?v=4","gravatar_id":"","url":"https://api.github.com/users/andrewgy8","html_url":"https://github.com/andrewgy8","followers_url":"https://api.github.com/users/andrewgy8/followers","following_url":"https://api.github.com/users/andrewgy8/following{/other_user}","gists_url":"https://api.github.com/users/andrewgy8/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewgy8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewgy8/subscriptions","organizations_url":"https://api.github.com/users/andrewgy8/orgs","repos_url":"https://api.github.com/users/andrewgy8/repos","events_url":"https://api.github.com/users/andrewgy8/events{/privacy}","received_events_url":"https://api.github.com/users/andrewgy8/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-25T20:37:06Z","updated_at":"2018-12-06T10:22:37Z","closed_at":"2018-12-06T10:22:37Z","author_association":"OWNER","body":"This is what I could imagine the API for Apprentice looking like:\r\n\r\n```python\r\n\r\nfrom apprentice import Apprentice\r\n\r\napr = Apprentice(__name__)\r\n\r\nENTITIES = {\r\n    \"name\": \"History\",\r\n    \"entries\": [\r\n        {\r\n            \"value\": \"history\",\r\n            \"synonyms\": [\r\n                \"history\",\r\n                \"past event\",\r\n                \"the past\",\r\n                \"past\"\r\n            ]\r\n        }, {\r\n            \"value\": \"birth\",\r\n            \"synonyms\": [\r\n                \"birth\",\r\n                \"births\",\r\n                \"born\"\r\n            ]\r\n        }\r\n    ]\r\n}\r\n\r\n\r\n@apr.action(entities=['name'])\r\ndef cool_fact_generator(*args, **kwargs):\r\n    reply = _fact_response(apr.entity)\r\n    return apr.make_repsonse(reply)\r\n```"}}
{"actor":{"display_login":"andrewgy8"}}