/[notice-sender]/trunk/soap.cgi
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/soap.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 33 - (show annotations)
Tue May 17 11:09:08 2005 UTC (18 years, 11 months ago) by dpavlin
File size: 1044 byte(s)
added new_list method, cleanus, e-mail is now unique for user, adding user with different full name will just update full name for that record.

1 #!/usr/bin/perl -w
2
3 =head1 NAME
4
5 soap.cgi - CGI SOAP interface to notice sender
6
7 =cut
8
9 use strict;
10 use Nos;
11
12 my $nos = new Nos(
13 dsn => 'dbi:Pg:dbname=notices',
14 user => 'dpavlin',
15 passwd => '',
16 );
17
18 use SOAP::Transport::HTTP +trace => 'debug';
19 SOAP::Transport::HTTP::CGI
20 ->dispatch_to('Nos::SOAP')
21 ->handle;
22
23 package Nos::SOAP;
24
25 =head1 SOAP methods
26
27 This methods are thin wrappers to provide SOAP calls.
28
29 =head2 NewList
30
31 $message_id = NewList(
32 list => 'My list',
33 email => 'my-list@example.com'
34 );
35
36 =cut
37
38 sub NewList {
39 my $self = shift;
40
41 return $nos->new_list( %{ shift @_ } );
42 }
43
44 =head2 AddMemberToList
45
46 $member_id = AddMemberToList(
47 list => "My list",
48 email => "e-mail@example.com",
49 name => "Full Name"
50 );
51
52 =cut
53
54 sub AddMemberToList {
55 my $self = shift;
56
57 return $nos->add_member_to_list( %{ shift @_ } );
58 }
59
60 =head2 AddMessageToList
61
62 $message_id = AddMessageToList(
63 list => 'My list',
64 message => 'From: My list...'
65 );
66
67 =cut
68
69 sub AddMessageToList {
70 my $self = shift;
71
72 return $nos->add_message_to_list( %{ shift @_ } );
73 }
74

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26