GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NET::JAIKU (3)

.ds Aq ’

NAME

Net::Jaiku - A perl interface to jaiku.com’s API

CONTENTS

SYNOPSIS



        use Net::Jaiku;

        my $jaiku = new Net::Jaiku(
                username => Example,
                userkey  => API Key
        );

        my $p = $jaiku->getMyPresence;
        print $p->user->url;

        my $rv = $jaiku->setPresence(
                message => Reading a book
        );



ABSTRACT

This module allows easy access to Feeds, Presences and Users at jaiku.com. It requires an API key retreivable from http://api.jaiku.com/ for each username you wish to authenticate.

CONSTRUCTOR

This module has a single constructor:
o new( ... )

The new constructor takes the following attributes:
o <username => $string>

This is a jaiku.com username. this bit.jaiku.com

o <userkey => $string>

The user’s key can be obtained by visiting http://api.jaiku.com when logged in as the user.

o <timeout => $seconds>

The number of seconds to wait before giving up on the call to Jaiku. (Optional)

METHODS

Net::Jaiku has the following methods:

    Feeds

o getFeed()

Returns the public feed as seen on the front page.

o getUserFeed( user => $string )

Returns a hashref of the feed for the given user. If no user is specified, it will return the feed for the current user. If no user is logged it, it will return undef.

o getMyFeed()

A shortcut to the above method for the logged in user. If no user is logged it, it will return undef.

o getContactsFeed()

Retrieve a feed of all your contacts and their presences.

o getChannelFeed( channel => $string )

Retrieve a feed of the latest posts to a channel.

o <B>RETURN VALUEB>

Feed methods return an object representing the feed. The following keys are available:
o title
o url
o stream[n]->icon
o stream[n]->content
o stream[n]->created_at
o stream[n]->created_at_relative
o stream[n]->comments
o stream[n]->url
o stream[n]->id
o stream[n]->title

    Presences

o getUserPresence( user => $string )

Returns the ’presence’ for the given user. If no user is specified, it will return the feed for the current user. If no user is logged it, it will return undef.

o getMyPresence()

A shortcut to the above method for the logged in user. If no user is logged it, it will return undef.

o <B>RETURN VALUEB>

Presence methods return an object representing the presence. The following keys are available:
o line
o user->avatar
o user->url
o user->nick
o user->first_name
o user->last_name

o setPresence( message => $string, location => $string_or_arrayref, icon => $integer_or_string, generated => $boolean )

Set the Jaiku presence for the current user. All options are optional, but it would be pointless to not set either a message or a location.

    User Info

o getUserInfo( user => $string )

Returns information for the given user. If no user is specified, it will return the feed for the current user. If no user is logged it, it will return undef.

o getMyInfo()

A shortcut to the above method for the logged in user. If no user is logged it, it will return undef.

o <B>RETURN VALUEB>

Info methods return an object representing the information. The following keys are available:
o avatar
o url
o nick
o first_name
o last_name
o contacts[n]->avatar
o contacts[n]->url
o contacts[n]->nick
o contacts[n]->first_name
o contacts[n]->last_name

SETTERS AND GETTERS

o username( $optional_new_username )

Returns the current username (after optionally setting)

o userkey( $optional_new_userkey )

Returns the current username (after optionally setting)

NOTES

    Objects

This module returns a custom object called ’HashInflator’. This is used so you can do $rv->user->id rather than the more cumbersome $rv->{user}->{id}

Once the API settles down, I will investigate creating proper objects that will auto-inflate when they need to.

AUTHOR

Rick Measham <rickm@cpan.org>

COPYRIGHT

Copyright (c) 2007 Rick Measham. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

SEE ALSO

irc://freenode.net/##jaiku
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::JAIKU (3) 2007-09-27

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.