Examples
Action add
Code Block |
---|
|
$data = array(
"token" => $token,
"tokenHash" => $tokenHash,
"objectType" => "eventanimalattendance",
"objectAction" => "add",
"values" => array(
array(
"attendanceEventID" => $validEvent,
"attendanceAnimalID" => $validAnimal,
"attendanceStatus" => "Not Attending",
),
),
); |
Action edit
Code Block |
---|
|
$data = array(
"token" => $token,
"tokenHash" => $tokenHash,
"objectType" => "eventanimalattendance",
"objectAction" => "edit",
"values" => array(
array(
"attendanceID" => $validPK,
"attendanceEventID" => $validEvent,
"attendanceAnimalID" => $validAnimal,
"attendanceStatus" => "Attending",
),
),
); |
Action publicSearch
Search for animal attendance information. In this example, we use the event's eventID to find animal attendance information.
Code Block |
---|
|
$data = array(
"apikey" => "1XxJFhSB",
"objectType" => "eventanimalattendance",
"objectAction" => "publicSearch",
"search" => array (
"resultStart" => 0,
"resultLimit" => 20,
"resultSort" => "attendanceID",
"resultOrder" => "asc",
"filters" => array(
array(
"fieldName" => "attendanceEventID",
"operation" => "equals",
"criteria" => "7",
),
),
"fields" => array("attendanceEventID","attendanceAnimalID","attendanceStatus")
),
); |
Action publicView
Retrieve attendance information for a specific attendanceID.
Code Block |
---|
|
$data = array(
"apikey" => $publicApiKey,
"objectType" => "eventanimalattendance",
"objectAction" => "publicView",
"values" => array (
array("attendanceID" => "166054"),
),
"fields" => array("attendanceEventID","attendanceAnimalID","attendanceStatus", "animalName", "animalNotes")
); |