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
WebService::BuzzurlAPI(3) User Contributed Perl Documentation WebService::BuzzurlAPI(3)

WebService::BuzzurlAPI - Buzzurl WebService API

0.02

  use WebService::BuzzurlAPI;
  use strict;

  my $buzz = WebService::BuzzurlAPI->new(email => "your email", password => "your password");
  # readers api
  my $res = $buzz->readers( userid => "your userid" );
  if($res->is_success){
      my $json = $res->json;
      # do something
  }else{
      die $res->errstr;
  }

Buzzurl is social bookmark service.

For more information on Buzzurl, visit the Buzzurl website. http://buzzurl.jp/.

API Reference. http://labs.ecnavi.jp/developer/buzzurl/api/

Create instance

Option:

  email    : your login email(require when add api)
  password : your login password(require when add api)

Example:

  my $buzz = WebService::BuzzurlAPI->new(email => "your email", password => "your password");

Get readers userid

Options:

  userid  : userid(require)

Example:

  my $res = $buzz->readers( userid => "userid" );
  if($res->is_success){
    foreach my $userid(@{$res->json}){
        # do something...
    }
  }

Get favorites userid

Options:

  userid  : userid(require)

Example:

  my $res = $buzz->favorites( userid => "userid" );
  if($res->is_success){  
    foreach my $userid(@{$res->json}){
        # do something...
    }
  }

Get url info

Options:

  url    : url(require)

Example:

  my $res = $buzz->url_info( url => "http://your.wanted.domain/" );
  if($res->is_success){
     my $urlinfo = shift @{$res->json};
     my $url = $urlinfo->{url};
     my $title = $urlinfo->{title};
     my $user_num = $urlinfo->{user_num};
     foreach my $ref(@{$userinfo->{posts}}){
        my $keywords = $ref->{keywords};
        my $comment = $ref->{comment};
        my $date = $ref->{date};
        my $user_name = $ref->{user_name};
     }
     # do something...
  }

Get bookmark count

Options:

  url   : url(require max:30)

Example:

  my $res = $buzz->bookmark_count( url => "http://your.wanted.domain" );
  # multiple
  # my $res = $buzz->bookmark_count( url => [ "http://your.wanted.domain", "http://your.wanted.domain2" ] );
  if($res->is_success){  
    foreach my $ref(@{$res->json}){
        my $url = $ref->{url};
        my $title = $ref->{title};
        my $users = $ref->{users};
        # do something...
    }
  }

Get user articles

Options:

  userid  : userid(require)

Example:

  my $res = $buzz->user_articles( userid => "userid" );
  if($res->is_success){  
    foreach my $ref(@{$res->json}){
        my $url = $ref->{url};
        my $title = $ref->{title};
        my $comment = $ref->{comment};
        my $keywords = $ref->{keywords};
        # do something...
    }
  }

Get recent articles

Options:

  num       : get number(default:5)
  of        : page number(default:0)
  threshold : bookmark count threshold(default:0)

Example:

  my $res = $buzz->recent_articles( num => 0, of => 1, threshold => 3 );
  if($res->is_success){  
    foreach my $ref(@{$res->json}){
        my $url = $ref->{url};
        my $title = $ref->{title};
        my $user_num = $ref->{user_num};
        my $user_id = $ref->{user_id};
        my $register_date = $ref->{register_date};
        # do something...
    }
  }

Get keyword articles

Options:

  userid  : userid(require)
  keyword : keyword string(require)

Example:

  my $res = $buzz->keyword_articles( userid => "userid", keyword => "keyword string" );
  if($res->is_success){  
    foreach my $ref(@{$res->json}){
        my $url = $ref->{url};
        my $title = $ref->{title};
        my $user_num = $ref->{user_num};
        my $user_id = $ref->{user_id};
        my $register_date = $ref->{register_date};
        # do something...
    }
  }

Add my bookmark(https + basic auth access)

Options:

  url     : bookmark url(require)
  title   : bookmark title
  comment : bookmark comment
  keyword : bookmark keyword(max:8)

Example:

  my $res = $buzz->add(
             url     => "http://your.register.domain/",
             title   => "my bookmark title",
             comment => "my bookmark comment",
             keyword => "my keyword",
             # multiple keyword
             keyword => [ "my keyword", "my keyword2" ],
            );
  if($res->is_success){
    print $res->json->{status} . "\n";
  }else{
    die $res->errstr;
  }

Get/Set login email

Example:

  $buzz->email("your email");
  my $email = $buzz->email;

Get/Set login password

Example:

  $buzz->password("your password");
  my $password = $buzz->password;

Get LWP::UserAgent instance(Readonly)

Example:

  # LWP::UserAgent::timeout
  $buzz->ua->timeout(30);
  # LWP::UserAgent::env_proxy
  $buzz->ua->env_proxy;

Class::Accessor LWP::UserAgent Readonly UNIVERSAL::require URI

Akira Horimoto

Copyright (C) 2007 Akira Horimoto

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2007-05-09 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

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