NAME

Net::Surveymonkey - Surveymonkey API client

VERSION

version 0.03

SYNOPSIS

# provide your api-key and oauth-token 
my $sm_api = Net::Surveymonkey->new( key => $key, token => $token );

my $surveys = $sm_api->get_survey_list();

DESCRIPTION

Client for Surveymonkey web api.

API methods are mapped to object methods.

See api docs for parameters and response formats at https://developer.surveymonkey.com/

ATTRIBUTES

key

Application API key.

Can be provided directly or got from key file.

Default is in $Net::Surveymonkey::SM_API_KEY

key_file

File where key shoutd be taken from.

Default is in $Net::Surveymonkey::SM_API_KEY_FILE

token

Application-to-account access key.

Can be provided directly or got from file.

Default is in $Net::Surveymonkey::SM_API_TOKEN

token_file

File where token shoutd be taken from.

Default is in $Net::Surveymonkey::SM_API_TOKEN_FILE

METHODS

new

my $api = Net::Surveymonkey->new( key => $key, token => $token );

# or 

my $api = Net::Surveymonkey->new( key_file => '/path/to/key', token_file => '/path/to/token/ );

# or indirectly

$Net::Surveymonkey::SM_API_KEY = $key;
$Net::Surveymonkey::SM_API_TOKEN = $token;

my $api = Net::Surveymonkey->new();

Constructor

call

my $result = $api->call($method => $params);

API method call. Dies on errors

create_flow => 'batch/create_flow'

get_survey_list => 'surveys/get_survey_list'

get_survey_details => 'surveys/get_survey_details'

get_collector_list => 'surveys/get_collector_list'

create_collector => 'collectors/create_collector'

get_respondent_list => 'surveys/get_respondent_list'

get_responses => 'surveys/get_responses'

get_response_counts => 'surveys/get_response_counts'

get_user_details => 'user/get_user_details'

get_template_list => 'templates/get_template_list'

send_flow => 'batch/send_flow'

AUTHOR

liosha <liosha@yandex-tean.ru>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by Yandex LLC.

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