{"action":"created","issue":{"url":"https://api.github.com/repos/greyblake/whatlang-rs/issues/5","repository_url":"https://api.github.com/repos/greyblake/whatlang-rs","labels_url":"https://api.github.com/repos/greyblake/whatlang-rs/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/greyblake/whatlang-rs/issues/5/comments","events_url":"https://api.github.com/repos/greyblake/whatlang-rs/issues/5/events","html_url":"https://github.com/greyblake/whatlang-rs/issues/5","id":205608524,"number":5,"title":"New API","user":{"login":"greyblake","id":113512,"avatar_url":"https://avatars.githubusercontent.com/u/113512?v=3","gravatar_id":"","url":"https://api.github.com/users/greyblake","html_url":"https://github.com/greyblake","followers_url":"https://api.github.com/users/greyblake/followers","following_url":"https://api.github.com/users/greyblake/following{/other_user}","gists_url":"https://api.github.com/users/greyblake/gists{/gist_id}","starred_url":"https://api.github.com/users/greyblake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greyblake/subscriptions","organizations_url":"https://api.github.com/users/greyblake/orgs","repos_url":"https://api.github.com/users/greyblake/repos","events_url":"https://api.github.com/users/greyblake/events{/privacy}","received_events_url":"https://api.github.com/users/greyblake/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-02-06T14:58:30Z","updated_at":"2017-02-10T09:39:29Z","closed_at":"2017-02-10T09:39:25Z","body":"Here is the proposal for a new API. The main advantage of it is that it's easier to use, and the desired result can be obtained with one line without limitation to pass additional options (whitelist/blaclist).\r\n\r\n```rust\r\nlet text = \"Bla bla bla\";\r\nlet whitelist = [Lang::Epo, Lang::Spa];\r\n\r\n// get Option<Result>\r\nlet result = whatlang::new(text).detect();\r\n\r\n// get only language, Option<Lang>\r\nlet lang = whatlang::new(text).detect_lang();\r\n\r\n// detect only script, Option<Script>\r\nlet lang = whatlang::new(text).detect_script();\r\n\r\n// with whitelist specified (same syntax for black list)\r\nlet result = whatlang::new(text).whitelist(&whitelist).detect()\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/greyblake/whatlang-rs/issues/comments/278899378","html_url":"https://github.com/greyblake/whatlang-rs/issues/5#issuecomment-278899378","issue_url":"https://api.github.com/repos/greyblake/whatlang-rs/issues/5","id":278899378,"user":{"login":"greyblake","id":113512,"avatar_url":"https://avatars.githubusercontent.com/u/113512?v=3","gravatar_id":"","url":"https://api.github.com/users/greyblake","html_url":"https://github.com/greyblake","followers_url":"https://api.github.com/users/greyblake/followers","following_url":"https://api.github.com/users/greyblake/following{/other_user}","gists_url":"https://api.github.com/users/greyblake/gists{/gist_id}","starred_url":"https://api.github.com/users/greyblake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greyblake/subscriptions","organizations_url":"https://api.github.com/users/greyblake/orgs","repos_url":"https://api.github.com/users/greyblake/repos","events_url":"https://api.github.com/users/greyblake/events{/privacy}","received_events_url":"https://api.github.com/users/greyblake/received_events","type":"User","site_admin":false},"created_at":"2017-02-10T09:39:29Z","updated_at":"2017-02-10T09:39:29Z","body":" The new API is already implemented."}}
{"actor":{"display_login":"greyblake"}}