Fwd: TCGplayer: New /x3/ Partner API - Foil Prices!

4 views
Skip to first unread message

Adam Feinstein

unread,
May 3, 2013, 10:03:30 AM5/3/13
to mtg-fami...@googlegroups.com
The day has arrived!

---------- Forwarded message ----------
From: Chedy Hampson <Ch...@tcgplayer.com>
Date: Fri, May 3, 2013 at 8:27 AM
Subject: TCGplayer: New /x3/ Partner API - Foil Prices!
To:


Note: All current partners must change to the /x3/ code by July 1st 2013. On July 1st 2013 /x/ and /x2/ versions will be turned off.


Changes in X3:

  • High/Median/Low are now the same as the store and content sites

  • Foil Median prices for Magic Cards

  • Different messages if the product is not found vs no pricing available

  • New links to the new catalog pages for Magic and Yugioh


API: Hi-Mid-Low X3:


Example URLs:


Magic:

http://partner.tcgplayer.com/x3/phl.asmx/p?pk=TCGTEST&s=New Phyrexia&p=Flameborn Viron


YuGiOh:

http://partner.tcgplayer.com/x3/ygophl.asmx/p?pk=TCGTEST&s=Duelist Pack 11 - Crow&p=Black Return&n=DP11-EN030


WoWTCG:

http://partner.tcgplayer.com/x3/wowtcgphl.asmx/p?pk=TCGTEST&s=War of the Elements&p=Malfurion Stormrage


Pokemon:

http://partner.tcgplayer.com/x3/pkphl.asmx/p?pk=TCGTEST&s=Black and White&p=Pikachu


Redakai:

http://partner.tcgplayer.com/x3/radphl.asmx/p?pk=TCGTEST&s=Redakai Base Set&p=Scarachnoz - Gold Animal


Heroclix:

http://partner.tcgplayer.com/x3/hxphl.asmx/p?pk=TCGTEST&s=The Incredible Hulk&p=Ghost Rider&pn=37



pk = your partner key

s = Set Name

Magic Only: if you leave set name blank the calculation will find the cheapest min price across all sets. (http://partner.tcgplayer.com/x3/phl.asmx/p?pk=TCGTEST&s=&p=Wrath of God)

p = Product name

n = Card Number (YuGiOh only), leave blank to use set name and product name

pn = Product Number - required for HeroClix Only


(Magic SetName List: http://store.tcgplayer.com/magic/)


*The Set Name and product name will need to match the information in our store in order to receive results.  


Output:



-<products>

<product>

<id>39515</id>

<hiprice>0.48</hiprice>

<lowprice>0.02</lowprice>

<avgprice>0.12</avgprice>

<foilavgprice>0.25</foilavgprice>

<link>http://store.tcgplayer.com/magic/new-phyrexia/flameborn-viron?partner=TCGTEST</link>

</product>

</products>



API: Store Prices X3:


Example URLs::


Magic:

http://partner.tcgplayer.com/x3/pv.asmx/p?pk=TCGTEST&p=Sword of War and Peace&s=New Phyrexia&v=3


YuGiOh:

http://partner.tcgplayer.com/x3/ygopv.asmx/p?pk=TCGTEST&p=Black Return&s=Duelist Pack 11 - Crow&n=DP11-EN030&v=3


WoWTcg:

http://partner.tcgplayer.com/x3/wowtcgpv.asmx/p?pk=TCGTEST&p=Malfurion Stormrage&s=War of the Elements&v=3


Pokemon:

http://partner.tcgplayer.com/x3/pkpv.asmx/p?pk=TCGTEST&p=Pikachu&s=Black and White&v=3


Redakai:

http://partner.tcgplayer.com/x3/radpv.asmx/p?pk=TCGTEST&p=Scarachnoz - Gold Animal&s=Redakai Base Set&v=3


HeroClix:

http://partner.tcgplayer.com/x3/hxpv.asmx/p?pk=TCGTEST&s=The Incredible Hulk&p=Ghost Rider&pn=37&v=5



pk = your partner key

s = Set Name

p = Product name

pn = Product Number - required for HeroClix only

v = Number of the vendors to return. There is a max of 8

n = card number, (YuGiOh Only) leave blank to use set name and product name


*The Set Name and product name will need to match the information in our store in order to receive result.


OutPut:


<prices>

<supplier>

<name>StoreNameHere</name>

<condition>Unplayed</condition>

<qty>40</qty>

<price>.04</price>

<link>http://store.tcgplayer.com/shoppingcart.aspx?id=18999757&q=1&partner=tcgtest</link>

</supplier>

<note><b>Store.TCGplayer.com</b> allows you to buy cards from any of our vendors, all at the same time, in a simple checkout experience. Shop, Compare & Save with TCGplayer.com!<br><br>(Earn money and receive full Pricing & Card data for your App/Site by <a href="http://store.tcgplayer.com/">Contacting TCGplayer</a>)</note>

</prices>


The note section must be displayed under the pricing data in some format without any wording changes. This message will change periodically to promote different items, such as Presales. But all links from within the notes section will reflect your Partner code for sales tracking.



API: Mass Entry - Add Products

PLEASE NOTE: A form post version of the Mass Entry should be available after May 8th. This version will allow us to handle larger deck sizes without issues.


Example URL:

http://store.tcgplayer.com/list/selectproductmagic.aspx?partner=TCGTEST&c=4 Jace, the Mind Sculptor||4 Squadron Hawk||4 Stoneforge Mystic||1 Batterskull||1 Dismember||3 Divine Offering||3 Duress||3 Go for the Throat||3 Inquisition of Kozilek||2 Mana Leak||4 Preordain||1 Sword of Feast and Famine||1 Sword of War and Peace||1 Celestial Colonnade||4 Creeping Tar Pit||4 Darkslick Shores||2 Glacial Fortress||1 Island||4 Marsh Flats||4 Plains||4 Seachrome Coast||2 Swamp||1 Batterskull||2 Celestial Purge||3 Condemn||1 Day of Judgment||1 Divine Offering||4 Flashfreeze||1 Gideon Jura||1 Go for the Throat||1 Memoricide||


partner = your partner key

c = list of cards with qty delimited by ||


Example:


Format:

4 Jace, the Mind Sculptor

4 Squadron Hawk

4 Stoneforge Mystic

1 Batterskull

1 Dismember

3 Divine Offering

3 Duress


Converted to:

4 Jace, the Mind Sculptor||4 Squadron Hawk||4 Stoneforge Mystic||1 Batterskull||1 Dismember||3 Divine Offering||3 Duress





--
Chedy Hampson
President, Ascension Gaming Network, Inc.
http://www.TCGplayer.com

FAX -- 800.355.6049

This message is for the named person's use only. It may contain sensitive and private proprietary or legally privileged information. You must not, directly or indirectly, disclose, distribute, print, or copy any part of this message to another individual without express written consent from the ASCENSION GAMING NETWORK.

April King

unread,
May 3, 2013, 10:07:27 AM5/3/13
to mtg-fami...@googlegroups.com
Yessssssssssss.  If we can get Judge's Corner and the foil prices into 2.1, life will be golden.  GOLDEN

--
You received this message because you are subscribed to the Google Groups "MTG Familiar Devs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mtg-familiar-d...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Alex Levine

unread,
May 3, 2013, 10:07:30 AM5/3/13
to mtg-familiar-devs
>

Note: All current partners must change to the /x3/ code by July 1st 2013. On July 1st 2013 /x/ and /x2/ versions will be turned off.


Sucks for the users we have who don't like to update frequently, I guess. Hopefully the number of people using versions with /x2/ will be very small by the time July 1st rolls around.


Adam Feinstein

unread,
May 3, 2013, 10:10:00 AM5/3/13
to mtg-fami...@googlegroups.com
Incentive to update? Adding foils to the cardview dialog should be super easy. We probably want to add a checkbox for foil and maybe some coloring in the trader / wishlist. I think I can do foils in the fetch service and dialog tonight.

Jonathan Bettger

unread,
May 3, 2013, 10:10:28 AM5/3/13
to mtg-fami...@googlegroups.com
Is it wrong to squee over APIs?

I'll get started on this tomorrow. (Tonight is DGM draft.)

Adam Feinstein

unread,
May 3, 2013, 10:38:40 PM5/3/13
to mtg-fami...@googlegroups.com
Good on my word, the changes for foils are in. Prices are now cached as PriceInfo objects instead of silly concatenated strings. It was likely more trouble than it was worth.

Jonathan Bettger

unread,
May 3, 2013, 11:38:50 PM5/3/13
to mtg-fami...@googlegroups.com

I got all day tomorrow to implement it into trade and wishlist.

Jonathan Bettger

unread,
May 4, 2013, 3:55:53 PM5/4/13
to mtg-fami...@googlegroups.com
Trade List handling foils implemented. I did make some MDPI sized images for a foil checkbox and foil indicator, probably needs updating to better match the color checkboxes in the search view and for other DPI sizes. 

Jonathan Bettger

unread,
May 4, 2013, 5:39:49 PM5/4/13
to mtg-fami...@googlegroups.com
And Wishlist done. 

I may adjust something about it later. (Instead of a new card row, just a new set row with a foil indicator. This depends on if you can add a new row to the wishlist set dialog dynamically when clicking a checkbox button. e.g. Click Foil checkbox > Add a new non-foil checkbox above the current row.)

Adam Feinstein

unread,
May 5, 2013, 11:17:40 AM5/5/13
to mtg-fami...@googlegroups.com
Adding foil as a "set" row should be possible. It makes sense to have some foil options in the dialog anyway.

I think it might be time to split the trade/wishlist input onto two rows. Two EditTexts, a checkbox, and a button are getting pretty cramped.

Jonathan Bettger

unread,
May 6, 2013, 11:37:40 AM5/6/13
to mtg-fami...@googlegroups.com
Ok, implemented it all last night. Foils are now just their own rows under the card. And the dialog adds a new row when you toggle for a foil card. [Anyone know anything about halting rendering until I completed adding all the new views for that? Its a little jarring at first as you can see different items render in between frames.]

I get what you are talking about the input being cramped, I actually changed that for the wishlist right off the bat, as the two edit text, checkbox, and two buttons where cramped on my phone. I would imagine its really cramped on the tradelist input for "normal" sized phones. Any suggestions on how to break it up? Because no good groupings come to mind.

Adam Feinstein

unread,
May 7, 2013, 12:29:06 AM5/7/13
to mtg-fami...@googlegroups.com
The wishlist layout looks better. Looking at it now, the photo button might be better suited for the actionbar. I would probably put it where the clear button is now, and shove that one into the options menu.

I can also crash the wishlist by opening a card dialog and toggling the checkbox twice if normal or thrice of foil. You may be getting more complicated than necessary with the disappearing row. Sometimes it's better to keep it simple.

Jonathan Bettger

unread,
May 7, 2013, 11:54:12 AM5/7/13
to mtg-fami...@googlegroups.com
 > I can also crash the wishlist by opening a card dialog and toggling the checkbox twice if normal or thrice of foil. You may be getting more complicated than necessary with the disappearing row. Sometimes it's better to keep it simple.

What I'm reading from that is...
You can only input foil as a new card (already coded to drop as a new set row if card already exist). Not really worth it to add/remove new rows in the dialog as foil is toggled. This I like.

> Looking at it now, the photo button might be better suited for the actionbar. I would probably put it where the clear button is now, and shove that one into the options menu.

This I like less. While its really fun to show off the camera button/useful for foreign cards. I really don't use it nearly as much as the clear button. This is probably more true for trading than the wishlist. Can we possibly code the actionbar to drop the most recently used actions onto the bar, or most used actions?

Adam Feinstein

unread,
May 8, 2013, 4:29:01 PM5/8/13
to mtg-fami...@googlegroups.com
I think the best solution for the dialog is to have all the rows (set X + foil set X) all the time. What would be even better would be to not display invalid foils, like foil Black Lotus and whatnot. Switching on set would be a good solution, except for things like Duel Decks and From the Vaults.

We can keep the photo button where it is, just brainstorming. We *could* code the actionbar to show most recently used actions, but that would take dynamic menus and data logging, which I am certainly not doing. It feels like bad practice to be tinkering the menu on the fly anyway.

Also, with the July 1st deadline, I'd like to have version 2.1 in the Play Store by June 15th. That gives us ~5 weeks from now. Here's the list of things which need to be done by then:
  • Finalize and test Trader (Jon / April)
  • Finalize and test Wishlist (Jon / April)
  • Add ability to update MTR/IPG html files OR put MTR/IPG into the database (Alex)
  • Finalize and test multipane tablet layouts (Adam / anyone with a tablet)
  • Add menu icons for all options in Cardview (Mike)
  • Fix DGM database issues (type separator character, Entering cost), roll in new rules (Adam)

Does everyone feel comfortable with what I've laid out? Did I miss anything?


Jonathan Bettger

unread,
May 8, 2013, 5:06:36 PM5/8/13
to mtg-fami...@googlegroups.com

Is there something already implemented for knowing if a card would be an invalid foil?

Other things to finish/test:
Commander cost button
RoundTimer disabling itself on clean exits if no round tiner has been started

Adam Feinstein

unread,
May 8, 2013, 5:18:46 PM5/8/13
to mtg-fami...@googlegroups.com
The only way to know (for now) is to have the foil price come back as 0.00.

Jonathan Bettger

unread,
May 8, 2013, 10:03:42 PM5/8/13
to mtg-fami...@googlegroups.com
Looking at the http://wiki.mtgsalvation.com/article/Foil_card article, it seems like I could just assume if a copy is in Urza's Legacy and up, there will be a foil version possible. Really, I don't like the idea of API checking every set to see if it has 0.00 price, seems like a lot of API calls, that could delay the dialog opening for a very long time. Though it seems like Urza's and up works.

Would it be too crazy to made add a second edit textbox on the dialog row, one for non-foil, one for foil, then at the top of the dialog have a row (that doesn't scroll with the list) that is basically "<blank for non foil> | <foil indicator icon> | Set Name". [Originally I tried a edit textbox with the foil indicator as the background, but its fairly ugly!]

Adam Feinstein

unread,
May 9, 2013, 12:04:50 AM5/9/13
to mtg-fami...@googlegroups.com
I don't think a grid is the way to go. KISS and just add extra foil rows.

Assuming Urza's and up is a good start, but it isn't always correct. Look up Counterspell. Most recent set? Jace v Chandra, waaay after Urza's. Foil version? Nope. The API calls are generally fast, since its just a bit of plaintext. They're super-fast when cached too. The question is, do we want to fudge it and be incorrect from time to time, or do it right always? Thoughts everyone?

Jonathan Bettger

unread,
May 9, 2013, 12:51:21 PM5/9/13
to mtg-fami...@googlegroups.com
Can I just make a listing like the banned/restricted cards, but for sets? Any Expert or Core sets Urza's and up have foils. Then list special sets as needed; FTV set, list as all foil, Jace vs. Chandra, no foils. Sorin vs Tibalt, only foil Sorin and Tibalts.... [Which is super odd as TCG has both normal and foil Sorin's where there is only foil Sorin's.]

Really that might get complicated and have a knowledge of a lot of different sets. But I could start the base assumption of Expert/Core, Urza's Legacy and Up, foils; special sets, run an API check.

April King

unread,
May 9, 2013, 3:38:49 PM5/9/13
to mtg-fami...@googlegroups.com
I think any method that requires us to constantly be making tweaks to the code to work is not a great solution.

Jonathan Bettger

unread,
May 9, 2013, 11:21:51 PM5/9/13
to mtg-fami...@googlegroups.com
I might need a little help with RoboSpice. PriceFetch is an async task, which won't finish resolving until after the dialog is already created and I'm not seeing anyway to make the robospice task a sync style task, anyway to fix that?

Adam Feinstein

unread,
May 10, 2013, 12:27:58 AM5/10/13
to mtg-fami...@googlegroups.com

I'm confused. I'm pretty sure there are no more price async tasks.
RoboSpice works just like an async task though. You fire it off and wait for the callback.

Jonathan Bettger

unread,
May 10, 2013, 12:31:47 AM5/10/13
to mtg-fami...@googlegroups.com
That's the problem, there is no time to wait for the callback, the dialog is already created before any of the callbacks are done.

Adam Feinstein

unread,
May 10, 2013, 9:45:15 AM5/10/13
to mtg-fami...@googlegroups.com
So are you trying to remove foil rows based on the API call? After further thought, that seems like a bad idea, mostly for the case where the user is offline. At this point I'm leaning to just having foil rows for any post-Urza's set, and living with the inconsistencies of the multiplayer products having erroneous foil rows. That seems less egregious than having those erroneous rows AND allowing foil Alpha cards (which would be sweeeeeet),

Jonathan Bettger

unread,
May 10, 2013, 12:33:23 PM5/10/13
to mtg-fami...@googlegroups.com
More so, trying to add foil rows based on the API call. But either way if a user is offline they will have no way to get the call. 

It may make sense that supplemental product releases just can't have 2 rows. There is only ever one version of the card in the supplemental products. It may or may not be foil is the problem. If you look at Sorin from the latest Vs. set, TCG has both a foil and non-foil listing, even though there is only foil. Something like Entomb from the PDS:Graveborn set only has a foil listing. [This causes a price not found error if you try to pull the price up in card search frag.]

What would happen if we made another page at https://sites.google.com/site/mtgfamiliar/manifests that would list set to be excluded from foil checks. We could list all sets Urza's Sage and down and all supplemental products in it, updating it whenever a new supplemental product comes out. (So it should only have to be updated twice a year.) The default being if the set isn't listed in the list, it will attempt to find the foil price. Worst case we forget to update it with the supplemental product and people get a few extra rows when searching for that specific card in the wish list.

Adam Feinstein

unread,
May 10, 2013, 1:58:09 PM5/10/13
to mtg-fami...@googlegroups.com
Actually, Entomb fails because TCGPlayer doesn't seem to have prices for any of PDS: Graveborn. That's beside the point.

We could add another file and another column in the sets table to mark for foils or not. That appears to be the cleanest way of doing things, although I am fidgety about adding more involved steps to the patching process.




--

Jonathan Bettger

unread,
May 10, 2013, 2:27:16 PM5/10/13
to mtg-fami...@googlegroups.com
Agreed, more patching steps isn't fun. 

If it wasn't for Modern Master's coming up, I would say just have it check against Modern Legal sets + the sets between 8th and Urza's Legacy. It might still be possible to do that. As we could just drop in the Modern Master's set code in with the 8th-UL set codes. That way we only have to update the code on crazy box sets like Modern Masters 2.

http://store.tcgplayer.com/magic/premium-deck-series-graveborn/entomb That's really strange as TCG apparently has two store fronts grabbing data differently then.

Adam Feinstein

unread,
May 10, 2013, 4:51:41 PM5/10/13
to mtg-fami...@googlegroups.com
Both Gatherer and TCGPlayer are riddled with issues and inconsistencies. We could fix all their shit by hand, but I'd rather just work with what we're given.

At this point I'm leaning towards just having foil rows for everything with a post-urza's datestamp. It's not perfect, but it's super easy to implement and correct most of the time. Users can deal with having foil rows for Vs sets and others. This also preempts TCG player cleaning up their act and actually listing PDS as foils, not that it matters.

Also, c'mon modern masters. MSRP plz?

Jonathan Bettger

unread,
May 10, 2013, 5:40:29 PM5/10/13
to mtg-fami...@googlegroups.com
All this arguing is just about the Wishlist dialog to boot. [Did the guy that originally write it disappear?]

What should I do in terms of a card added that can't be foil. E.G. they go to add the card to the trade/wishlist and mark it foil. Once the API call gets back I can have it notice there is no foil price. Should I override the user's set check and make it a non-foil card? Or just let their action be considered correct?

This is why you should always be super nice to your FLGS owner, he let the first 6 of us have a box at MSRP. 

Adam Feinstein

unread,
May 10, 2013, 8:12:43 PM5/10/13
to mtg-fami...@googlegroups.com
Daniel is still on the mailing list, so presumably he's still around. Who knows where life takes people though?

I like overriding the foil marker once the price comes in, but that'll have to be accompanied by a toast. Having the app change itself without any clear reason can be unsettling. This runs into that complexity thing again. I think it's reasonable just to display the price as N/A as well. I also don't know what would happen in the case that a card has a foil version, but none are for sale. Having it revert to normal would clearly be wrong. Anyone else want to weigh in?

My FLGS owner can be compared to Jabba the Hutt both physically and personality-wise. Mike can back me up on this one.

Daniel Lawrence

unread,
May 10, 2013, 8:15:43 PM5/10/13
to mtg-fami...@googlegroups.com

I'm still around, just swamped. 3 kids, lots of hospital stuff, and lots of overtime. I've not been following too closely-what's up?

Adam Feinstein

unread,
May 10, 2013, 8:20:48 PM5/10/13
to mtg-fami...@googlegroups.com
In a nutshell foils were added to the prices and we're figuring out how to add that information to the wishlist. Jon seems to have taken that over. I've been doing largely unrelated tablet work with some multi-fragment layouts and actionbar tinkering.

Daniel Lawrence

unread,
May 10, 2013, 8:31:17 PM5/10/13
to mtg-fami...@googlegroups.com

Hrm. I'd put a second count box to the right of each set in the pop-up maybe with a silver border? Disable it if there's no foil. In the display, just italicize the foil count and price?

Reply all
Reply to author
Forward
0 new messages