Search

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel

On this page:

Table of Contents
maxLevel2
excludePopular Questions

Examples

Action add

Code Block
languagephp
$data = array(
	"token" => $token,
	"tokenHash" => $tokenHash,
	"objectType" => "events",
	"objectAction" => "add",
	"values" => array(
		array(
			"eventName" => "add event during test",
			"eventLocationID" => $validLocation,
			"eventStart" => "5/1/2012 13:00",
			"eventEnd" => "5/1/2012 15:00",
			"eventUrl" => "http://yahoo.com",
			"eventDescription" => "Here's the description for this event.",
			"eventSpecies" => array("Dog","Cat"),
		),
	),
);

...

Code Block
languagephp
$data = array(
    "apikey" => $publicApiKey,
    "objectType" => "events",
    "objectAction" => "publicSearch",
    "search" => array (
        "resultStart" => 0,
        "resultLimit" => 10,
        "resultSort" => "eventEnd",
        "resultOrder" => "desc",
        "calcFoundRows" => "Yes",
        "filters" => array(
            array(
                "fieldName" => "eventSpecies",
                "operation" => "equals",
                "criteria" => "dog",
            ),
            array(
                "fieldName" => "eventStart",
                "operation" => "greaterthanorequal",
                "criteria" => "rg:today",
            ),
        ),
        "fields" => array("eventID","eventOrgID","eventName","eventStart"),
    ),
);

...


Action publicView

Code Block
languagephp
$data = array(
		"apikey" => $publicApiKey,
		"objectType" => "events",
		"objectAction" => "publicView",
		"values" => array (
				array("eventID" => "5"),
		),
		"fields" => array("eventID")
);