dropbox/pygerduty — pull request #1 by nduthoit (2013-06-28 12:12:44+00:00)
Title: Add /entries and /users for Schedules

Here's a sample script that uses the /entries endpoint to print the phone number of the person on-call:
```
import pygerduty
pager = pygerduty.PagerDuty("foobar", "SOMEAPIKEY123456")
schedule = pager.schedules.show("PX7F8S3")
import datetime
now = datetime.datetime.utcnow()
since = "%sZ" % now.isoformat()
until = "%sZ" % (now + datetime.timedelta(hours=2)).isoformat()
user = schedule.entries.list(since=since, until=until, overflow=True)[0].user
contact_methods = user.contact_methods.list()
for contact_method in contact_methods:
if hasattr(contact_method, 'phone_number'):
print "{} is on call ({})".format(user.name, contact_method.phone_number)
break
```