{"action":"created","issue":{"url":"https://api.github.com/repos/Gizra/message/issues/13","labels_url":"https://api.github.com/repos/Gizra/message/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/Gizra/message/issues/13/comments","events_url":"https://api.github.com/repos/Gizra/message/issues/13/events","html_url":"https://github.com/Gizra/message/issues/13","id":58258293,"number":13,"title":"How to create message_types by code?","user":{"login":"wundo","id":113942,"avatar_url":"https://avatars.githubusercontent.com/u/113942?v=3","gravatar_id":"","url":"https://api.github.com/users/wundo","html_url":"https://github.com/wundo","followers_url":"https://api.github.com/users/wundo/followers","following_url":"https://api.github.com/users/wundo/following{/other_user}","gists_url":"https://api.github.com/users/wundo/gists{/gist_id}","starred_url":"https://api.github.com/users/wundo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wundo/subscriptions","organizations_url":"https://api.github.com/users/wundo/orgs","repos_url":"https://api.github.com/users/wundo/repos","events_url":"https://api.github.com/users/wundo/events{/privacy}","received_events_url":"https://api.github.com/users/wundo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-02-19T19:43:53Z","updated_at":"2015-02-23T20:02:07Z","closed_at":null,"body":"By looking the documentation it's not clearly for me how to create the message_types properly using code.\r\n\r\n1) message_example and message_og_example do it by calling entity_import, which is not what I'm looking for. \r\n2) message_type_create on the other hand is not documented enough for me to figure out how to do it on my own. There is no explanation of the expected values inside $values array."},"comment":{"url":"https://api.github.com/repos/Gizra/message/issues/comments/75620009","html_url":"https://github.com/Gizra/message/issues/13#issuecomment-75620009","issue_url":"https://api.github.com/repos/Gizra/message/issues/13","id":75620009,"user":{"login":"wundo","id":113942,"avatar_url":"https://avatars.githubusercontent.com/u/113942?v=3","gravatar_id":"","url":"https://api.github.com/users/wundo","html_url":"https://github.com/wundo","followers_url":"https://api.github.com/users/wundo/followers","following_url":"https://api.github.com/users/wundo/following{/other_user}","gists_url":"https://api.github.com/users/wundo/gists{/gist_id}","starred_url":"https://api.github.com/users/wundo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wundo/subscriptions","organizations_url":"https://api.github.com/users/wundo/orgs","repos_url":"https://api.github.com/users/wundo/repos","events_url":"https://api.github.com/users/wundo/events{/privacy}","received_events_url":"https://api.github.com/users/wundo/received_events","type":"User","site_admin":false},"created_at":"2015-02-23T20:02:07Z","updated_at":"2015-02-23T20:02:07Z","body":"Hi @amitaibu \r\nI understand there is some partial documentation, i.e. there is the signature function, but:\r\n1) Why it's calling entity_create and not message_type_create?\r\n2) What are the expected values? \r\n3) Is hook_default_message_type() called only once per module? Otherwise the entity_create call will fail.\r\n4) How do I set the default message type  message_text field?\r\n\r\nWithout it, that documentation is pretty much useless :(\r\n"}}