{"action":"created","issue":{"url":"https://api.github.com/repos/beer-garden/beer-garden/issues/264","repository_url":"https://api.github.com/repos/beer-garden/beer-garden","labels_url":"https://api.github.com/repos/beer-garden/beer-garden/issues/264/labels{/name}","comments_url":"https://api.github.com/repos/beer-garden/beer-garden/issues/264/comments","events_url":"https://api.github.com/repos/beer-garden/beer-garden/issues/264/events","html_url":"https://github.com/beer-garden/beer-garden/issues/264","id":435287257,"node_id":"MDU6SXNzdWU0MzUyODcyNTc=","number":264,"title":"Add init args to Class/System","user":{"login":"aamccaslin","id":17238333,"node_id":"MDQ6VXNlcjE3MjM4MzMz","avatar_url":"https://avatars2.githubusercontent.com/u/17238333?v=4","gravatar_id":"","url":"https://api.github.com/users/aamccaslin","html_url":"https://github.com/aamccaslin","followers_url":"https://api.github.com/users/aamccaslin/followers","following_url":"https://api.github.com/users/aamccaslin/following{/other_user}","gists_url":"https://api.github.com/users/aamccaslin/gists{/gist_id}","starred_url":"https://api.github.com/users/aamccaslin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aamccaslin/subscriptions","organizations_url":"https://api.github.com/users/aamccaslin/orgs","repos_url":"https://api.github.com/users/aamccaslin/repos","events_url":"https://api.github.com/users/aamccaslin/events{/privacy}","received_events_url":"https://api.github.com/users/aamccaslin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-07T15:42:58Z","updated_at":"2019-05-06T21:48:20Z","closed_at":"2019-05-06T21:48:20Z","author_association":"NONE","body":"Right now, BEERGARDEN assumes that the class passed to it will be an already instantiated class.\r\n\r\nWhile this is fine, it may also be acceptable to pass in a class that has arguments on it as the following:\r\n\r\n```python\r\n@BGSystem\r\nclass Calculator(object):\r\n\r\n  def __init__(self, offset=1):\r\n    self.offset = offset\r\n\r\n  @register\r\n  def add(self, x, y):\r\n    return x + y + self.offset\r\n```\r\n\r\nand then in a plugin_start\r\n\r\n```python\r\nmy_plugin = Plugin(class=Calculator)\r\nmy_plugin.start()\r\n```\r\n\r\nIn this case we know that the offset is 1, but if there are no defaults provided, what we can do is modify the command and say these are required parameters for the command itself.\r\n\r\nSo in this case we would add the offset to the parameters for command add, but we would also know a default."},"comment":{"url":"https://api.github.com/repos/beer-garden/beer-garden/issues/comments/489795837","html_url":"https://github.com/beer-garden/beer-garden/issues/264#issuecomment-489795837","issue_url":"https://api.github.com/repos/beer-garden/beer-garden/issues/264","id":489795837,"node_id":"MDEyOklzc3VlQ29tbWVudDQ4OTc5NTgzNw==","user":{"login":"loganasherjones","id":3633332,"node_id":"MDQ6VXNlcjM2MzMzMzI=","avatar_url":"https://avatars0.githubusercontent.com/u/3633332?v=4","gravatar_id":"","url":"https://api.github.com/users/loganasherjones","html_url":"https://github.com/loganasherjones","followers_url":"https://api.github.com/users/loganasherjones/followers","following_url":"https://api.github.com/users/loganasherjones/following{/other_user}","gists_url":"https://api.github.com/users/loganasherjones/gists{/gist_id}","starred_url":"https://api.github.com/users/loganasherjones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loganasherjones/subscriptions","organizations_url":"https://api.github.com/users/loganasherjones/orgs","repos_url":"https://api.github.com/users/loganasherjones/repos","events_url":"https://api.github.com/users/loganasherjones/events{/privacy}","received_events_url":"https://api.github.com/users/loganasherjones/received_events","type":"User","site_admin":false},"created_at":"2019-05-06T21:48:20Z","updated_at":"2019-05-06T21:48:20Z","author_association":"MEMBER","body":"I don't have a good use case for this. Closing."}}
{"actor":{"display_login":"loganasherjones"}}