1WWW::Salesforce::SimpleU(s3e)r Contributed Perl DocumentaWtWiWo:n:Salesforce::Simple(3)
2
3
4

NAME

6       WWW::Salesforce::Simple.pm - this class provides a simpler abstraction
7       layer between WWW::Salesforce and Salesforce.com.
8

DESCRIPTION

10       Because the Salesforce API is somewhat cumbersome to deal with, this
11       class was created to make it a little simpler to get information.
12

METHODS

14       This class inherits all the methods from WWW::Salesforce and adds the
15       following new ones.
16
17   new( %parameters )
18       Handles creating new Salesforce objects as well as the login process to
19       use the salesforce objects.
20
21   do_query( $sql_query_string )
22       Executes a query against the information in Salesforce.  Returns a
23       reference to an array of hash references keyed by the column names.
24       Strict attention should be paid to the case of the field names.
25
26   get_field_list( $table_name )
27       Gathers a list of fields contained in a given table.  Returns a
28       reference to an array of hash references.  The hash references have
29       several keys which provide information about the field's type, etc.
30       The key 'name' will provide the name of the field itself.
31
32   get_tables( )
33       Gathers a list of tables available for use from salesforce.  Returns a
34       reference to an array of strings representing each table name.
35

EXAMPLES

37   new()
38           use WWW::Salesforce::Simple;
39
40           my $sforce = WWW::Salesforce::Simple->new(
41               'username' => $user,
42               'password' => $pass
43           );
44
45   do_query( $query )
46           my $query = 'select Id from Account';
47
48           my $res = $sforce->do_query( $query );
49
50           foreach my $field ( @{ $res } ) {
51               print $field->{'Id'} . "\n";
52           }
53           print "Found " . scalar @{$res} . " results\n";
54
55   get_field_list( $table_name )
56           my $fields_ref = $sforce->get_field_list( 'Account' );
57
58           foreach my $field( @{$fields_ref} ) {
59               print $field->{'name'} . "\n";
60               foreach my $key ( keys %{$field} ) {
61                   print "\t $key --> ";
62                   print $field->{$key} if ( $field->{$key} );
63                   print "\n";
64               }
65               print "\n";
66           }
67
68   get_tables()
69           my $tables_ref = $sforce->get_tables();
70
71           foreach my $table ( @{$tables_ref} ) {
72               print "$table\n";
73           }
74           print "\n";
75

SUPPORT

77       Please visit Salesforce.com's user/developer forums online for
78       assistance with this module. You are free to contact the author
79       directly if you are unable to resolve your issue online.
80

AUTHORS

82       Fred Moyer <fred at redhotpenguin dot com>
83
84       Chase Whitener <cwhitener at gmail dot com>
85
87       No Copyright
88
89
90
91perl v5.12.2                      2010-08-17        WWW::Salesforce::Simple(3)
Impressum