| App-SocialSKK documentation | Contained in the App-SocialSKK distribution. |
App::SocialSKK::Plugin::SocialIME - Retrieves Candidates from Social IME
# Add a line like below into your .socialskk:
plugins:
- name: SocialIME
App::SocialSKK::Plugin::SocialIME performs retrieval of candidates from Social IME. This plugin will be used by default in socialskk.pl without any configuration in .socialskk.
http://www.social-ime.com/
Kentaro Kuribayashi <kentaro@cpan.org>
| App-SocialSKK documentation | Contained in the App-SocialSKK distribution. |
package App::SocialSKK::Plugin::SocialIME; use strict; use warnings; use URI; use URI::QueryParam; use base qw(App::SocialSKK::Plugin); sub get_candidates { my ($self, $text) = @_; return if ($text || '') eq ''; my $uri = URI->new('http://www.social-ime.com/api/'); $uri->query_param(string => $text); my $res = $self->ua->get($uri); if ($res->is_success) { map { s|\s*$||smg; $_ } grep { $_ !~ /^\s*$/ } split /\t/, $res->content; } } 1; __END__