Search

Page tree

We have updated our API Terms of Service. Please review the entire terms before continuing to use the API. Your use of the API means you accept and agree to the updated API Terms of Service found here: https://rescuegroups.org/api-terms-of-service/

Skip to end of metadata
Go to start of metadata

On this page:

Examples

Action add

$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"),
		),
	),
);

Action edit

$data = array(
	"token" => $token,
	"tokenHash" => $tokenHash,
	"objectType" => "events",
	"objectAction" => "edit",
	"values" => array(
		array(
			"eventID" => $validPK,
			"eventName" => "edit 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"),
		),
	),
);

Action publicSearch

$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

$data = array(
		"apikey" => $publicApiKey,
		"objectType" => "events",
		"objectAction" => "publicView",
		"values" => array (
				array("eventID" => "5"),
		),
		"fields" => array("eventID")
);
  • No labels