Giter VIP home page Giter VIP logo

highrise-php-api's Introduction

Highrise-PHP-Api is a project (currently in alpha) to provide easy access to 37signals' Highrise API to PHP Developers.

Documentation is coming soon, please check the test directory for examples.

This PHP Class currently allows CRUD support for People objects only. Support for other object types will be uploaded shortly.

Please mind the tests are only supposed to run in a blank Highrise account and not on a live one.

Features currently implemented:

  • People
  • Tasks
  • Notes
  • Emails
  • Tags
  • Users

Examples

Create a new person and set his address


$person = new HighrisePerson($highrise);
$person->setFirstName("John");
$person->setLastName("Doe");
$person->addEmailAddress("[email protected]");

$address = new HighriseAddress();
$address->setAddress("165 Test St.");
$address->setCity("Glasgow");
$address->setCountry("Scotland");
$address->setZip("GL1");
$person->addAddress($address);

$person->save();

Find People by Search Term


$people = $highrise->findPeopleBySearchTerm("John");
foreach($people as $p)
	print $person->getFirstName() . "\n";

Print all notes


foreach($highrise->findAllPeople() as $person)
{
	print_r($person->getNotes());
}

Create a new note


$note = new HighriseNote($highrise);
$note->setSubjectType("Party");
$note->setSubjectId($person->getId());
$note->setBody("Test");
$note->save();

Add tags


$people = $highrise->findPeopleByTitle("CEO");
foreach($people as $person)
{
	$person->addTag("CEO");
	$person->save();
}

Remove Tags


$people = $highrise->findPeopleByTitle("Ex-CEO");
foreach($people as $person)
{
	unset($person->tags['CEO']);
	$person->save();
}

Find all Tags


$all_tags = $highrise->findAllTags();
print_r($all_tags);

Create Task


$task = new HighriseTask($highrise);
$task->setBody("Task Body");
$task->setPublic(false);
$task->setFrame("Tomorrow");
$task->save();

Assign all upcoming tasks


$users = $highrise->findAllUsers();
$user = $users[0]; // just select the first user

foreach($highrise->findUpcomingTasks() as $task)
{
	$task->assignToUser($user);
	$task->save();
}

Find all assigned tasks


$assigned_tasks = $highrise->findAssignedTasks();
print_r($assigned_tasks);

Find all users


$users = $highrise->findAllUsers();
print_r($users);

Find current user


$me = $highrise->findMe();

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.