Skip to content
This repository has been archived by the owner on Aug 26, 2020. It is now read-only.
/ convio_api Public archive

A Drupal 7 Module to interact with the Convio Open API

Notifications You must be signed in to change notification settings

jtolj/convio_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Summary

This module provides programatic access to the Convio Open API documented at http://open.convio.com/api/. It does not do anything on its own.

Based on the work originally done at http://drupal.org/project/convio_api, it has been updated for Drupal 7 and extended to support all APIs.

####Installation

  • Enable the module
  • Assign desired roles "administer convio api" permission
  • Visit /admin/config/system/convio_api and configure with your API settings

####Example Usage

Add a or update a constituent record - add an interest id and set their global accepts email flag

$params = array(
  'method' => 'createOrUpdate',
  'primary_email' => 'user@example.com',
  'email.accepts_email' => 'true',
  'email.preferred_format' => 'HTML',
  'add_interest_ids' => 1041
);
$response = convio_api_request($params, 'constituent', 'server');
if ($response->code === '200') {
  //constituent was updated
}
else {
  //handle error
}

Get Team Caption Constituent Id from Teamraiser API

$params = array(
  'method' => 'getTeamsByInfo',
  'team_id' => 1080
);

$convio = convio_api_request($params, 'teamraiser', 'server');
if ($response->code === '200') {
  $team = json_decode($response->data);
  return $team->getTeamSearchByInfoResponse->team->captainConsId;
}
else {
  //handle error
}

About

A Drupal 7 Module to interact with the Convio Open API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages