Download the PHP package surveygizmo/surveygizmo-api without Composer
On this page you can find all versions of the php package surveygizmo/surveygizmo-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download surveygizmo/surveygizmo-api
More information about surveygizmo/surveygizmo-api
Files in surveygizmo/surveygizmo-api
Package surveygizmo-api
Short Description Official PHP library for SurveyGizmo API
License MIT
Informations about the package surveygizmo-api
Official PHP library for SurveyGizmo API
Summary
The library is intended to make integrating with SurveyGizmo easier and quicker than using the API directly. The following objects are supported via this library and are all namespaced under SurveyGizmo (e.g. \SurveyGizmo\Resources\Survey).
Requirements
- PHP 5.3+
- cURL
- Active SurveyGizmo Account
Recommended Installation
This library is now available in packagist, and you can include surveygizmo/surveygizmo-api in your composer configuration files to autoload it:
Manual Installation
- Download the library and add it to your project.
- Include the SurveyGizmoAutoLoader.php file, replacing
<LIBRARY_PATH>
with the appropriate path.
Configuration
-
If you are not using our US data center, you will need to choose the appropriate region (US, CA, or EU). If you are not sure if you are using the US, EU, or CA API, see: https://apihelp.surveygizmo.com/help/us-eu-or-ca-api
-
Authenticate using your SurveyGizmo API Key and Secret.
-
If needed, configure rate limiting.
- If needed, configure the request timeout duration (in seconds, defaults to 35 if not specified)
Code Samples
Please refer to the Samples folder for more thorough example use cases.
To use these samples, copy the example file and then supply your own credentials:
Supported Objects
- Survey
- Responses
- Questions
- Pages
- Statistics
- Reports
- Campaigns
- EmailMessages
- Account
- Users
- Teams
- Contacts
- ContactLists
- Contacts
API Object Reference
This Library uses the version 5 SurveyGizmo API, please refer to our API Documentation for more information.
All objects use the following standard functions:
Returns an array of objects based on filter and paging options.
Returns a single object based on id
Saves a newly created or updated instance of an object
Deletes an instance of an object
Surveys
Fetching Surveys
See filter and paging below.
Getting a Single Survey
Updating a Survey
Creating a Survey
Deleting a Survey
Survey Helper Functions
The Survey object provides a few help functions to easily access related collections and objects.
Questions
To access the questions on a survey you'll need an instance of a \SurveyGizmo\Resources\Survey object.
Get all Survey Questions
Getting and Updating a Survey Question
Responses
To access the responses for a survey you'll need an instance of a \SurveyGizmo\Resources\Survey object. See filter and paging below.
Get all Survey Responses
Get a Single Responses
Update a Responses
Filtering & Paging Objects
All fetch methods take both optional $filter and $options arguments.
Filtering
Paging Collections
Sometimes you will need to page through collections of objects. To accommodate this use the optional $options argument on any fetch method;
Error Messages & Responses
In the case of an error we will return the following responses and status codes:
Simple API request
To perform a API call without going through a specific resource class, use \SurveyGizmo\ApiRequest::call.
Tests
Unit tests are included under the /Tests
directory. They can be run by calling PHPUnit within the Tests folder:
Contributors
The library was developed and is maintained by the SurveyGizmo Development Team.
License
This project is licensed under the terms of the MIT license.