Ignore:
Timestamp:
May 21, 2009, 4:51:34 PM (15 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.10, release-1.7, release-1.8, release-1.9
Children:
8496cc2
Parents:
d658c29
git-author:
Kevin Riggle <kevinr@free-dissociation.com> (05/19/09 22:54:48)
git-committer:
Nelson Elhage <nelhage@mit.edu> (05/21/09 16:51:34)
Message:
Preliminary support for other Twitter-compatible microblogging services, eg. identi.ca.

Adds an optional 'service' parameter to the configuration file, which points to the API
root URL (defaults to Twitter's).  Also adds optional 'apihost' and 'apirealm' parameters
for the domain name and port of the site to connect to, and the name of the API realm,
respectively (default to Twitters'; if service is not Twitter, attempt to guess sane
defaults).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/BarnOwl/Message/Twitter.pm

    racdd52e ra0385ad3  
    1515sub context {'twitter'}
    1616sub subcontext {undef}
    17 sub long_sender {"http://twitter.com/" . shift->sender}
     17sub service { return (shift->{"service"} || "http://twitter.com"); }
     18sub long_sender {
     19    my $self = shift;
     20    $self->service =~ m#^\s*(.*?://.*?)/.*$#;
     21    my $service = $1 || $self->service;
     22    return $service . '/' . $self->sender
     23}
    1824
    1925sub replycmd {
Note: See TracChangeset for help on using the changeset viewer.