No description, website, or topics provided.
CSS JavaScript Perl HTML
Switch branches/tags
Nothing to show
Latest commit ed96d9c May 25, 2016 @gugod fix errors
Permalink
Failed to load latest commit information.
bin
config
lib/Social
static
templates
README.mkdn
cpanfile
social

README.mkdn

Social

Installing

Social is implemented with Perl, you do not need to install itself to get it working, but it requires following CPAN modules to be installed:

  • Encode
  • YAML
  • AnyEvent::IRC
  • FindBin
  • HTML::Entities
  • Plack
  • Plack::Request
  • Tatsumaki
  • AnyEvent::Twitter
  • AnyEvent::Plurk
  • RTPG
  • AnyEvent::RTPG
  • JSON::XS

Running It

At this point, you do not install the Social itself in order to run it. Just cd into the source tree and execute the "social" program.

You need to provide a path to your config file like this:

./social -c /path/to/config.yml

See config/social.yml for the example and description of the configrable content.

API Controller

Social provides an API controller, you can send messages from the API.

For example,

#!/usr/bin/env perl
use LWP::UserAgent;
use HTTP::Request::Common;
use JSON::XS;
use URI;
my $network = ...;
my $channel = ...;
my $msg = shift;
$ua = LWP::UserAgent->new;
my $uri = URI->new( 'http://localhost:9999/api' );
$uri->query_form({ payload => encode_json({ network => $network , channel => $channel , message => $msg }) });
$response = $ua->request(GET $uri );
warn $response->content;