Skip to content

Instantly share code, notes, and snippets.

@fadelakin
Created November 8, 2014 02:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fadelakin/c4810dcc6b5aaf73c9b6 to your computer and use it in GitHub Desktop.
Save fadelakin/c4810dcc6b5aaf73c9b6 to your computer and use it in GitHub Desktop.
Fancy Hands API Demo for CodeDay
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