def main():
    client = HTTPClient(HOSTNAME)
    proxy = Proxy(client, ENDPOINT)

    proxy.request('POST', 'user/login', {
        'username': USERNAME,
        'password': PASSWORD,
    })

    node = proxy.request('GET', 'node/' + TEST_NID)

    print 'Here is your node:\n'
    print node
def main():
    consumer = oauth2.Consumer(CONSUMER_KEY, CONSUMER_SECRET)
    token = oauth2.Token(TOKEN_KEY, TOKEN_SECRET)

    client = oauth2.Client(consumer, token)
    proxy = Proxy(client, 'http://' + HOSTNAME + '/' + ENDPOINT)

    proxy.request('POST', 'user/login', {
        'username': USERNAME,
        'password': PASSWORD,
    })

    node = proxy.request('GET', 'node/' + TEST_NID)

    print 'Here is your node:\n'
    print node