I try to write an own plugin for selling at Magiccardmarket by using its API.
As first step I tried to rewrite the price update function, just to get familia with your code.
So far so good, I managed to update the price, but my problem is, after calling setDBPrice the GUI is not updating.
My question, is there a bug in your current snapshot or do I have to force update the gui afterwards?
I can see the proce after restarting the Programm.
greets
Sven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Could be a bug. Current master is highly unstable. If you want to practive on stable version use v1_4_2 branch. I look briefly and I don't see change event when prices are set
(that how ui updates it). If you confirm this on 1.4.2 version you can send me a bug.
For you stuff for now you can force manually refresh using refresh action from MTG Database view.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, downgrade to 1.4.2 helped. It is working now. Quite good and fast I must say. Maybe you should think to switch to the API instead of parsing the page. If Magiccardmarked is used quite often.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I also parse MKM pages since it's much easier then using the API, but I'm interested in seeing some working implementation.
Since it's only parsing, I assume there is only support to get price information and no support to add items to sell or to buy items?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You asking about this specific provider? I don't know what is implement for it.
I have buy function implemented for other providers, you can check what is does.
I don't have sell implementation.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Alena, another thing I wanted to ask you: is there a way to put own/custom fields in the XML files of the workspace without affecting MagicAssistant? (I haven't tried yet)
Does you tool supports multiple entries of the same card in a xml file (e.g. twice the same card, different amounts and with a custom field: 'card quality'?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That is only true, if you parse the page.
If you use the API, there is an unique ID, which you can use. My problem is, that I can't save this ID in the Assistant Data Model or I don't know, where. So same question, like you. Are there free definable columns?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Re: definable columns
Well yes and no. I do have properties that be attached to any db instance in form of a=b, where a is the key and b is the value. These can be read/write using API but they won't show up in any UI. I use it internally to store some rare attributes like flipId's of the cards and stuff like that. The prices though are not stored in the same data file, it is separate xml
which are based on gatherer id, so it makes it impossible to store prices per condition (i,e diffrent prices for mint vs played vs foil etc) currently. Of cause nothing stops you from adding extra code to support something like that, and if its good I will merge it upstream.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
is it possible to filter "My Cards" for my custom MkmId Field via sourcecode?
I am grabbing cards from Mkm and I would like to update some states of my cards, but I don't want to iterate through the whole lib of cards. Can I use the UI filters internally for those purpose?
I play around with DataManager.getCardHandler().getMagicDBFilteredStore().getFilter();, but without coming forward.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To hook up to filter you need a filter field. Otherwise just iterate over cards.
20000 cards it won't be even notiable on modern cpu's.
If you can hook propeties search to a filter field that would be cool and I can use that too.
Would be similar to special field search (but special only works on card instances)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there,
I try to write an own plugin for selling at Magiccardmarket by using its API.
As first step I tried to rewrite the price update function, just to get familia with your code.
So far so good, I managed to update the price, but my problem is, after calling setDBPrice the GUI is not updating.
My question, is there a bug in your current snapshot or do I have to force update the gui afterwards?
I can see the proce after restarting the Programm.
greets
Sven
Could be a bug. Current master is highly unstable. If you want to practive on stable version use v1_4_2 branch. I look briefly and I don't see change event when prices are set
(that how ui updates it). If you confirm this on 1.4.2 version you can send me a bug.
For you stuff for now you can force manually refresh using refresh action from MTG Database view.
View and moderate all "General" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Ok, downgrade to 1.4.2 helped. It is working now. Quite good and fast I must say. Maybe you should think to switch to the API instead of parsing the page. If Magiccardmarked is used quite often.
If there is is an API it is better to use an API of cause. I did not do Magicardmarket myself, it was contributed by somebody else.
I also parse MKM pages since it's much easier then using the API, but I'm interested in seeing some working implementation.
Since it's only parsing, I assume there is only support to get price information and no support to add items to sell or to buy items?
You asking about this specific provider? I don't know what is implement for it.
I have buy function implemented for other providers, you can check what is does.
I don't have sell implementation.
View and moderate all "General" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
If you use the API you are able to add cards to your sell stock, delete and way more.
Take a look into it: https://www.mkmapi.eu/ws/documentation/API_1.1:Main_Page
I already looked at it, but I don't find it very clear.
I also found https://github.com/evonove/mkm-sdk which uses Python (which I also use in my project),
but I did not test it yet.
Hi,
do you build in a field, which might contain the unique ID of MagicCardMarket in your Card Model?
Such as a comment field or a unused Id field?
Greets Sven
MKM doesn't use an unique id to address a card (only to address an item to buy/sell)/<card name="">
A general card be be addressed as: https://www.magiccardmarket.eu/Products/Singles/Worldwake/Joraga+Warcaller
-> https://www.magiccardmarket.eu/Products/Singles/
Alena, another thing I wanted to ask you: is there a way to put own/custom fields in the XML files of the workspace without affecting MagicAssistant? (I haven't tried yet)
Does you tool supports multiple entries of the same card in a xml file (e.g. twice the same card, different amounts and with a custom field: 'card quality'?
That is only true, if you parse the page.
If you use the API, there is an unique ID, which you can use. My problem is, that I can't save this ID in the Assistant Data Model or I don't know, where. So same question, like you. Are there free definable columns?
Re: definable columns
Well yes and no. I do have properties that be attached to any db instance in form of a=b, where a is the key and b is the value. These can be read/write using API but they won't show up in any UI. I use it internally to store some rare attributes like flipId's of the cards and stuff like that. The prices though are not stored in the same data file, it is separate xml
which are based on gatherer id, so it makes it impossible to store prices per condition (i,e diffrent prices for mint vs played vs foil etc) currently. Of cause nothing stops you from adding extra code to support something like that, and if its good I will merge it upstream.
I am not sure, if a deticated MkmId only for Magiccardmarket will serve a purpose for the most of the users.
I would need this Id to save a few http requests for fetching the Id each time I do a request to Mkm.
I will investigate the possibility for store the Id in your MagicCard-Properties.
Thanks for the hint.
Hi,
is it possible to filter "My Cards" for my custom MkmId Field via sourcecode?
I am grabbing cards from Mkm and I would like to update some states of my cards, but I don't want to iterate through the whole lib of cards. Can I use the UI filters internally for those purpose?
I play around with DataManager.getCardHandler().getMagicDBFilteredStore().getFilter();, but without coming forward.
To hook up to filter you need a filter field. Otherwise just iterate over cards.
20000 cards it won't be even notiable on modern cpu's.
If you can hook propeties search to a filter field that would be cool and I can use that too.
Would be similar to special field search (but special only works on card instances)