Developer playground and query shape

4 views
Skip to first unread message

Nathan

unread,
Jun 20, 2009, 3:39:58 AM6/20/09
to Tipjoy Developers
1. I would love to see something like developer playground (like
sandbox on paypal for testing api) - where developer could create
virtual accounts and assign virtual cash balance for testing purposes
- would it be possible to arrange?

I'm trying to experiemnt with my current account, but since I have no
cash there, I can't really do anything, and I'm having troubles
persuading anyone to help me in this field :). My "http://tipjoy.com/
api/tweetpayment" request is returning error, most problably because
of my $0 balance, which is the reason I'm throwing this idea of
developer sandbox - I don't know if the query itself is wrong, or if
it is my balance causing errors.

2. Let's say I'm sending a request like this:

http://tipjoy.com/api/tweetpayment/?twitter_username=Example&twitter_password=example24&text=p
$10 @Example2 for example text

What interests me the most is the "text" parameter - can I use spaces
there and will it be correct, or maybe the text parameter should have
a different form without spaces? If so, can I ask for some example?

dinosaur robot

unread,
Jun 20, 2009, 5:28:17 AM6/20/09
to tipjoy-d...@googlegroups.com
What error is TipJoy returning?

----

Payments should still work even if you have a 0 balance. They are
simply pledges, aka loans.

(I've noticed that paying $0 does cause problems.)

You need to be sure to POST rather than GET. An Http GET puts the
parameters in the URL after a '?', like what you showed, whereas a
POST puts the parameters in the Http request's payload.

In both cases, the parameters must be encoded. You know %20 instead of
spaces, etc. I can share javascript and python code that does this,
but I have no clue for php. An earlier discussion on this list might
be helpful, as I had some questions in this area when I started, too.

Nathan

unread,
Jun 22, 2009, 2:33:17 AM6/22/09
to Tipjoy Developers
Don't know the error yet, can't display it, I posted this because of
developer playground and query shape, now that you showed me where I
played dumb (lol, I forgot about %20 thing, sorry) I will have one
problem less. I will have some free time today so I will experiment
with the code and force it to display returned error.

On Jun 20, 11:28 am, dinosaur robot <a.downy.h...@gmail.com> wrote:
> What error is TipJoy returning?
>
> ----
>
> Payments should still work even if you have a 0 balance. They are
> simply pledges, aka loans.
>
> (I've noticed that paying $0 does cause problems.)
>
> You need to be sure to POST rather than GET. An Http GET puts the
> parameters in the URL after a '?', like what you showed, whereas a
> POST puts the parameters in the Http request's payload.
>
> In both cases, the parameters must be encoded. You know %20 instead of
> spaces, etc. I can share javascript and python code that does this,
> but I have no clue for php. An earlier discussion on this list might
> be helpful, as I had some questions in this area when I started, too.
>
> On Sat, Jun 20, 2009 at 3:39 AM, Nathan<wojciech.usarzew...@gmail.com> wrote:
>
> > 1. I would love to see something like developer playground (like
> > sandbox on paypal for testing api) - where developer could create
> > virtual accounts and assign virtual cash balance for testing purposes
> > - would it be possible to arrange?
>
> > I'm trying to experiemnt with my current account, but since I have no
> > cash there, I can't really do anything, and I'm having troubles
> > persuading anyone to help me in this field :). My "http://tipjoy.com/
> > api/tweetpayment" request is returning error, most problably because
> > of my $0 balance, which is the reason I'm throwing this idea of
> > developer sandbox - I don't know if the query itself is wrong, or if
> > it is my balance causing errors.
>
> > 2. Let's say I'm sending a request like this:
>
> >http://tipjoy.com/api/tweetpayment/?twitter_username=Example&twitter_...

Nathan

unread,
Jun 22, 2009, 3:57:21 AM6/22/09
to Tipjoy Developers
OK, so I made it working, I mean - I made it display error. First, it
showed "must HTTP POST" so I've changed from curl_setopt ($c,
CURLOPT_GET, true); to curl_setopt ($c, CURLOPT_POST, true);.

Then it showed me: twitter_username

I thought maybe my script is not passing to function, but after
filling the request manually with my Twitter/Tipjoy username, I still
get this error. And I'm not really sure what might be causing it...

Nathan

unread,
Jun 30, 2009, 2:53:48 AM6/30/09
to Tipjoy Developers
So, can anyone help? with tweetpayment I'm getting the error:

missing twitter_username

Even if the username is correct in the query (I'm using another
parameter to display the query sent to tipjoy and I see full query
with both username and password).

Hmm?

Nathan

unread,
Jul 3, 2009, 3:23:34 AM7/3/09
to Tipjoy Developers
Ignore it, some more "having fun" with CURL and transaction is now
working perfectly :).
Reply all
Reply to author
Forward
0 new messages