Created
November 8, 2014 02:42
-
-
Save fadelakin/c4810dcc6b5aaf73c9b6 to your computer and use it in GitHub Desktop.
Fancy Hands API Demo for CodeDay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fancyhands import FancyhandsClient | |
from datetime import datetime, timedelta # (We'll need this later) | |
api_kay = '<YOUR KEY>' | |
secret = '<YOUR SECRET>' | |
client = FancyhandsClient(api_kay, secret); | |
#client.standard_create( | |
# title="Let me know what's new on the internet!", | |
# description="Go to Reddit, and find the title of the top story. Call me at (574) 575-6650 and tell me that title.", | |
# bid=2.00, | |
# expiration_date=datetime.now() + timedelta(1) | |
#) | |
client.custom_create( | |
title="Prank call my friend!", | |
description="Call (574) 575-6650. Ask if their refrigerator is running. When they say 'yes', tell them 'Well you better go catch it!'.", | |
bid=3.00, | |
expiration_date=datetime.now() + timedelta(1), | |
custom_fields=[ | |
{ | |
'label': 'Response', | |
'type': 'textarea', | |
'description': 'Their response to the prank', | |
'order': 1, | |
'required': True | |
} | |
] | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment