eBay username
eBay Password
Login is SSL protected. By clicking on "Log in Now" you agree to gixen.com terms of usage.
Forum is available in English only.


   SearchSearch     

Gixen API released (use at your own risk for now)

 
Post new topic   Reply to topic    Gixen.com Forum Index -> Announcements
View previous topic :: View next topic  
Author Message
mario
Site Admin


Joined: 03 Oct 2006
Posts: 2686

PostPosted: Wed Jan 23, 2008 7:20 pm    Post subject: Gixen API released (use at your own risk for now) Reply with quote

So the first version of Gixen API is now functional (mirror users only can use it). In absence of proper documentation (I'm hoping someone else will make it), here is a short manual:

All API calls connect to the standard SSL port, and must begin with https://www.gixen.com/api.php?username=actualusername&password=actualpassword&, followed by the list of parameters expressed as

Code:
parametername=value&


API Calls:

1. Add new snipe

required parameters:

itemid=value, e.g itemid=1234567890
maxbid=value, e.g maxbid=15.43

optional parameters:

snipegroup=value, e.g. snipegroup=1 (default: 0, no groups used)
quantity=value (default: 1, single item auction)
bidoffset=value (3, 6, 8, 10 or 15. Default value is 6)
bidoffsetmirror=value (same as above, just for mirror server)

2. Delete snipe

required parameters:

ditemid=value (ebay item id to be deleted)

3. List snipes on main server

required parameters:

listsnipesmain=1

4. List snipes on mirror server

required parameters:

listsnipesmirror=1

Notes on the output format:

The first line contains "<html><body>" html tags. This is in order to make it easy to debug api through the browser. You can exclude this line by sending "notags=1" in the list of parameters.

Errors are reported as:

ERROR (CODE): MESSAGE

In case of success:

1. Add new snipe success is reported as

OK <item_number> ADDED

2. Delete snipe success is reported as

OK <item_number> DELETED

In cases 3 and 4, the output format contains the following fields (in order):

"<br />" tag, itemid, endtime (as unix timestamp), maxbid, status, message, title,

snipegroup, quantity, bidoffset, all followed by a new line code ('\n').

The status field can be one of the following: "N" for scheduled, "S" for skipped (if current price is already found to be larger than maximum bid) and "D" for completed.

Message is the standard status message, and is empty if status is "N". The delimiter used between the fields is "|#!#|" (a sequence I chose not likely to ever show up in the item title). The output ends with a new line:

"<br />OK MAIN LISTED"
or
"<br />OK MIRROR LISTED"

At the moment, API is using eBay US target servers, in the future it will use the account settings to choose the right server(s).

I reserve the right to change the API specification, or disable API all together in case of any problems (no one wants this to happen though).
Back to top
View user's profile Send private message Send e-mail
samhale123
Guest





PostPosted: Thu Jan 24, 2008 3:19 pm    Post subject: Reply with quote

Hi there;
My output is : htt p://sam06.tfcph.com/ebay.php

I don't know why it is like that. Is it because there are two |#!#|'s between the status and the item title?
Back to top
mario
Site Admin


Joined: 03 Oct 2006
Posts: 2686

PostPosted: Thu Jan 24, 2008 3:28 pm    Post subject: Reply with quote

Sorry, my mistake.

At the beginning of each line there is "<br />" and then "|#!#|", and after that the item number. Your code probably doesn't account for an extra "|#!#|" before the item number.

Mario.
Back to top
View user's profile Send private message Send e-mail
Guest






PostPosted: Mon Feb 11, 2008 4:13 pm    Post subject: Reply with quote

I get error ERROR (101): COULD NOT LOG IN
Back to top
Cupid



Joined: 09 Aug 2007
Posts: 1222
Location: Bristol, UK

PostPosted: Mon Feb 11, 2008 4:15 pm    Post subject: Reply with quote

Anonymous wrote:
I get error ERROR (101): COULD NOT LOG IN


First thought, does the account that you are attempting to log in with have a mirror subscription?
_________________
Mark
Back to top
View user's profile Send private message
mario
Site Admin


Joined: 03 Oct 2006
Posts: 2686

PostPosted: Mon Feb 11, 2008 5:38 pm    Post subject: Reply with quote

Anonymous wrote:
I get error ERROR (101): COULD NOT LOG IN


Are you able to login through the Gixen web interface?
Back to top
View user's profile Send private message Send e-mail
Guest






PostPosted: Wed Feb 13, 2008 10:41 am    Post subject: Reply with quote

I have a mirror subcription & I can login into gixen.

My password contains !# I would guess this is the problem...
Back to top
Cupid



Joined: 09 Aug 2007
Posts: 1222
Location: Bristol, UK

PostPosted: Wed Feb 13, 2008 10:52 am    Post subject: Reply with quote

Anonymous wrote:
I have a mirror subcription & I can login into gixen.

My password contains !# I would guess this is the problem...


Could be, Mario will know...

Another thing that occurs to me is that with this interface '&'s are going to cause problems as well aren't they?
_________________
Mark
Back to top
View user's profile Send private message
nochkin
Guest





PostPosted: Wed Feb 13, 2008 2:38 pm    Post subject: Reply with quote

Cupid wrote:
Another thing that occurs to me is that with this interface '&'s are going to cause problems as well aren't they?

& should be replaced by %26, but that is the job of a library you are going to use to encode your data.
If & is a separator, then it has to be replaced by &amp;
Back to top
Guest






PostPosted: Sat Mar 15, 2008 9:19 am    Post subject: Reply with quote

I am working on a PHP page and I get the login error. I have a mirror subscription, and the address I am trying to open in PHP works fine when I copy and paste it into the browser address bar.

I have enabled php_openssl.dll in my PHP config file. I am using Windows XP and IIS
Back to top
mario
Site Admin


Joined: 03 Oct 2006
Posts: 2686

PostPosted: Sat Mar 15, 2008 9:37 am    Post subject: Reply with quote

What is the exact error message / code you get?
Back to top
View user's profile Send private message Send e-mail
mike_shore
Guest





PostPosted: Sat Mar 15, 2008 9:52 am    Post subject: Reply with quote

The error message is:

ERROR (101): COULD NOT LOG IN

Thanks for the quick response.
Back to top
mike_shore
Guest





PostPosted: Sat Mar 15, 2008 10:38 am    Post subject: Include current eBay bid? Reply with quote

I guess it would take extra CPU cycles to grab the current bid from the eBay site, but it would be helpful to include that in the "listsnipesmain" function. Thank you.
Back to top
Cupid



Joined: 09 Aug 2007
Posts: 1222
Location: Bristol, UK

PostPosted: Sat Mar 15, 2008 11:25 am    Post subject: Re: Include current eBay bid? Reply with quote

mike_shore wrote:
I guess it would take extra CPU cycles to grab the current bid from the eBay site, but it would be helpful to include that in the "listsnipesmain" function. Thank you.


Mike,

Really thats one of the main points of the API, to farm the function of retrieving the current price out to other software/servers because it takes so much resource and is not essential to the sniping functions. It was this requirement that provided the main justification for Mario to provide this add on service.

So its definitely not going to do that for you and you will need to get the current price direct from eBay.
_________________
Mark


Last edited by Cupid on Thu May 28, 2009 12:55 am; edited 1 time in total
Back to top
View user's profile Send private message
mike_shore
Guest





PostPosted: Sat Mar 15, 2008 11:44 am    Post subject: Reply with quote

Hi Cupid, thank you for the feedback. I came to the same conclusion after my post and realized I don't need an API as I can simply scrape the info right off the eBay site.
Back to top
Keith
Guest





PostPosted: Wed May 27, 2009 4:36 pm    Post subject: API Request Reply with quote

Hi Mario,

Could you add Purge Completed to the API interface would be useful to delete ended items...

Would be great if you could implement this Wink

Thanks,
Keith
Back to top
mario
Site Admin


Joined: 03 Oct 2006
Posts: 2686

PostPosted: Wed May 27, 2009 6:01 pm    Post subject: Reply with quote

Keith, do you mean the autosnipe script or API?
I didn't think *anyone* was still using the API.
Back to top
View user's profile Send private message Send e-mail
Keith
Guest





PostPosted: Fri May 29, 2009 11:36 am    Post subject: Reply with quote

Hi,

Yes mario, I am using the API interface for getting my pending snipes would be nice to clear the ended/out-sniped/won ect.. before upd-ating list.

Thanks,
Keith
Back to top
mario
Site Admin


Joined: 03 Oct 2006
Posts: 2686

PostPosted: Fri May 29, 2009 2:53 pm    Post subject: Reply with quote

Well, this is such a pleasant surprise for me Keith that I implemented it right away.

For purging items you need to add a get variable purgecompleted=1 to the api call, in addition to username & password.

Please let me know if you have any problems.
Back to top
View user's profile Send private message Send e-mail
Snu



Joined: 21 Mar 2008
Posts: 12

PostPosted: Tue Jun 02, 2009 10:21 am    Post subject: Reply with quote

mario wrote:
Keith, do you mean the autosnipe script or API?
I didn't think *anyone* was still using the API.

I do! I do! Wink

It sounds like not too many people are using the API, but I'll make a suggestion, anyhow... A comment parameter would be useful for me to list the shipping price with each item.
Back to top
View user's profile Send private message
Keith
Guest





PostPosted: Wed Jun 03, 2009 5:04 pm    Post subject: Reply with quote

Hi Mario,

Thanks! had to do a separate call to purge and list but all working fine.

api.php?username=lol&password=lol&purgecompleted=1

Keith
Back to top
Cyberfox
Guest





PostPosted: Sat Sep 12, 2009 5:06 am    Post subject: API question Reply with quote

Greetings,
Just to confirm; everything is GET, right?

-- Morgan
Back to top
mario
Site Admin


Joined: 03 Oct 2006
Posts: 2686

PostPosted: Sat Sep 12, 2009 1:03 pm    Post subject: Re: API question Reply with quote

Cyberfox wrote:
Greetings,
Just to confirm; everything is GET, right?

-- Morgan


Correct Morgan. You have to use SSL though.
Back to top
View user's profile Send private message Send e-mail
Cyberfox
Guest





PostPosted: Sat Sep 12, 2009 4:51 pm    Post subject: API Reply with quote

Greetings,
Re: SSL - I know; the base API U(RL) in the initial post is...H(TTPS). (After various attempts to post the name of the protocol, and provide a link below to my project, and various other problems posting.)

I don't have SSL cert verification turned on though right now (so it'll talk SSL, but not validate that it's the right server). I'll probably have to bundle the appropriate cert files with the library.

I'm building a Ruby library to talk to Gixen ( github.com/cyberfox/gixen ), so I can offer syncing with it as a feature. It's an open source library, although I haven't picked a particular license for it.

-- Morgan
Back to top
Cyberfox
Guest





PostPosted: Sat Sep 12, 2009 6:39 pm    Post subject: API Mockup Reply with quote

Greetings,
In order to build my library so I can test it w/o hitting your servers, I built a mock up of all the various API call responses. I've got the output for the initial set (snipe, delete snipe, listsnipesmain, listsnipesmirror), although the only error I'm aware of is 101 - could not log in.

The output / response for the purge operation isn't shown, though. What does that respond with?

Also, does it purge skipped entries, or just done entries?

Are there any other documentable error conditions beyond 101 - could not log in? For example, if you can't load the item number from eBay, does it return an error? If you don't have any entries, but you try to delete a snipe, does it respond with an error, or pretend to succeed? If you purge and there's nothing to purge, what does it return?

I believe my library implementation is basically done, but purely testing against mock responses, based on your description of the protocol. Next I get to test it against your server. Smile

-- Morgan
Back to top
mario
Site Admin


Joined: 03 Oct 2006
Posts: 2686

PostPosted: Sat Sep 12, 2009 7:39 pm    Post subject: Reply with quote

Hey Morgan, I am delighted that you took to do this task. I will help in any way possible (feel free to email also when needed). Here are the codes:

ERROR (501): SSL REQUIRED
ERROR (100): COULD NOT LOG IN
ERROR (101): COULD NOT LOG IN
ERROR (1001): GIXEN DOWN
ERROR (111): NON SUBSCRIBER
ERROR (115): GIXEN ACCOUNT SUSPENDED
ERROR (771): DELETE QUERY FAILED
ERROR (772): DELETE QUERY FAILED
ERROR (131): USERNAME NOT SPECIFIED
ERROR (132): PASSWORD NOT SPECIFIED
ERROR (133): MAXIMUM BID NOT SPECIFIED
ERROR (201): MAXIMUM NUMBER OF SNIPES EXCEEDED
ERROR (202): ITEM ALREADY PRESENT
ERROR (203): COULD NOT GET INFO FOR ITEM
ERROR (301): COULD NOT ADD SNIPE: AUCTION NUMBER OR MONEY FORMAT INVALID
ERROR (302): COULD NOT ADD SNIPE TO MIRROR
ERROR (304): COULD NOT ADD SNIPE TO MIRROR
ERROR (401): EMPTY USERNAME OR EMPTY PASSWORD
ERROR (241): DELETE QUERY FAILED
ERROR (242): DELETE QUERY FAILED

OK COMPLETEDPURGED
OK <item_id> DELETED
OK <item_id> ADDED
OK MAIN LISTED
OK MIRROR LISTED

Some codes are different for the same error (it helps me debug when problems are reported). As for purged items - whatever is in the past will be purged, sniped or skipped.
Back to top
View user's profile Send private message Send e-mail
Cyberfox
Guest





PostPosted: Sat Sep 12, 2009 7:58 pm    Post subject: API info Reply with quote

Greetings,
Sweet; I'll dig into the errors and probably try to bring them into the library after dinner, so they're recognized better.

I ran a bunch of tests, and outside of a simple newline stripping error on my part, everything else looks good. I fixed that and pushed it up to the github project ( github.com/cyberfox/gixen ).

It's a Ruby implementation, but it makes it really easy.

Just:
Code:

  gixen = Gixen.new('username', 'password')
  gixen.snipe('itemnumber', 'amount')
  gixen.unsnipe('itemnumber') to delete.


Calling
Code:
gixen.main_snipes
returns an array of hashes, with the data from the main server, and
Code:
gixen.mirror_snipes
the same from the mirror server. (There's a
Code:
gixen.snipes
which merges the two, but I think it needs to add something to the hashes so it's clear where each comes from.)

Makes it easy... I haven't put in the code for handling the purge result, but it looks like it's pretty much like I guessed. Is there a space between 'COMPLETED' and 'PURGED'?

Next I need to bring that into my My JBidwatcher web app, and then the last step, let JBidwatcher push the user information to the My JBidwatcher app, so the whole flow is followed.

(Mainly because I really didn't want to try to implement this API in Java. Smile )

Thanks for the info!

-- Morgan
Back to top
mario
Site Admin


Joined: 03 Oct 2006
Posts: 2686

PostPosted: Sat Sep 12, 2009 8:03 pm    Post subject: Re: API info Reply with quote

Cyberfox wrote:
Is there a space between 'COMPLETED' and 'PURGED'?


Nope, no space.

Cyberfox wrote:
Next I need to bring that into my My JBidwatcher web app, and then the last step, let JBidwatcher push the user information to the My JBidwatcher app, so the whole flow is followed.

(Mainly because I really didn't want to try to implement this API in Java. Smile )

Thanks for the info!


Thank you Morgan!
Back to top
View user's profile Send private message Send e-mail
juangrande



Joined: 09 Aug 2007
Posts: 519
Location: San Diego, California, USA

PostPosted: Sat Sep 12, 2009 8:59 pm    Post subject: Reply with quote

Yes, THANK YOU, Morgan! I have wanted to use JBidWatcher to use the Gixen API for a very long time! Mario will also be delighted to be able to tell his users to use JBidWatcher instead of asking Gixen to track auction data.
_________________
John

"If you don't know where you are going, you will wind up somewhere else."
--- Yogi Berra
Back to top
View user's profile Send private message
GixenTestAcc
Guest





PostPosted: Sat Oct 17, 2009 8:57 am    Post subject: All I get is an error when i log in! Reply with quote

<html><body>ERROR (101): COULD NOT LOG IN

I am registered and have a mirror subscription...

I can login through the website???

don't know what is going on anyone?
Back to top
juangrande



Joined: 09 Aug 2007
Posts: 519
Location: San Diego, California, USA

PostPosted: Thu Oct 22, 2009 7:56 am    Post subject: Reply with quote

If you are still having trouble logging in, please post to the Support forum: it is monitored more closely.
_________________
John

"If you don't know where you are going, you will wind up somewhere else."
--- Yogi Berra
Back to top
View user's profile Send private message
mario
Site Admin


Joined: 03 Oct 2006
Posts: 2686

PostPosted: Thu Oct 22, 2009 11:27 am    Post subject: Re: All I get is an error when i log in! Reply with quote

GixenTestAcc wrote:
<html><body>ERROR (101): COULD NOT LOG IN

I am registered and have a mirror subscription...

I can login through the website???

don't know what is going on anyone?


Please email me with more details (your username, etc).
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Gixen.com Forum Index -> Announcements All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2006 Gixen.com. Forum powered by phpBB © 2001, 2005 phpBB Group.