From ab2dd1e2f046cf4a1ca33354c5cc061c17c7ccc7 Mon Sep 17 00:00:00 2001 From: Ryan McGrath Date: Sat, 10 Apr 2010 01:06:37 -0400 Subject: [PATCH] Fixing createFriendship parameter passing - never needed the question mark. How did this sit for so long? --- twython/core.py | 8 ++++---- twython3k/core.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/twython/core.py b/twython/core.py index d24bbe2..da0e7d2 100644 --- a/twython/core.py +++ b/twython/core.py @@ -776,9 +776,9 @@ class setup: if self.authenticated is True: apiURL = "" if user_id is not None: - apiURL = "?user_id=%s&follow=%s" %(`user_id`, follow) + apiURL = "user_id=%s&follow=%s" %(`user_id`, follow) if screen_name is not None: - apiURL = "?screen_name=%s&follow=%s" %(screen_name, follow) + apiURL = "screen_name=%s&follow=%s" %(screen_name, follow) try: if id is not None: return simplejson.load(self.opener.open("http://api.twitter.com/%d/friendships/create/%s.json" % (version, id), "?follow=%s" % follow)) @@ -809,9 +809,9 @@ class setup: if self.authenticated is True: apiURL = "" if user_id is not None: - apiURL = "?user_id=%s" % `user_id` + apiURL = "user_id=%s" % `user_id` if screen_name is not None: - apiURL = "?screen_name=%s" % screen_name + apiURL = "screen_name=%s" % screen_name try: if id is not None: return simplejson.load(self.opener.open("http://api.twitter.com/%d/friendships/destroy/%s.json" % (version, `id`), "lol=1")) # Random string hack for POST reasons ;P diff --git a/twython3k/core.py b/twython3k/core.py index ec00a02..115aae9 100644 --- a/twython3k/core.py +++ b/twython3k/core.py @@ -776,9 +776,9 @@ class setup: if self.authenticated is True: apiURL = "" if user_id is not None: - apiURL = "?user_id=%s&follow=%s" %(repr(user_id), follow) + apiURL = "user_id=%s&follow=%s" %(repr(user_id), follow) if screen_name is not None: - apiURL = "?screen_name=%s&follow=%s" %(screen_name, follow) + apiURL = "screen_name=%s&follow=%s" %(screen_name, follow) try: if id is not None: return simplejson.load(self.opener.open("http://api.twitter.com/%d/friendships/create/%s.json" % (version, id), "?follow=%s" % follow)) @@ -809,9 +809,9 @@ class setup: if self.authenticated is True: apiURL = "" if user_id is not None: - apiURL = "?user_id=%s" % repr(user_id) + apiURL = "user_id=%s" % repr(user_id) if screen_name is not None: - apiURL = "?screen_name=%s" % screen_name + apiURL = "screen_name=%s" % screen_name try: if id is not None: return simplejson.load(self.opener.open("http://api.twitter.com/%d/friendships/destroy/%s.json" % (version, repr(id)), "lol=1")) # Random string hack for POST reasons ;P