• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Import data from WoT

nusilmar

Member
This may be way way off topic but any of you guys might have an idea on how to pull this off ...

i'm currently developing a site for a World of Tanks clan and needed to get or pull info from WoT servers into some Fabrik Tables. There are many places with info about how to show an page by iframe, but what i really want is to configure a cron job, through fabrik, to pull all the clans players and their respective data (n? of Battles, Ranking, WN8, etc...) using WoT API ( http://eu.wargaming.net/developers/api_reference/wot/account/list/ )...

Any of you have made something like this ?

Could any of you be of some assistance, since my coding skills are limited ???

None the less i'm still trying to pull this off and will keep inform you about developments if no one step up and give a hand ...

Thx in advance
 
I'm trying to use webservice list plugin but still haven't been able to pull it off.

I get this string from wot servers ( ids changed for security purposes):

{
"status": "ok",
"meta": {
"count": 1
},
"data": {
"clanid": {
"members": [
{
"role": "recruitment_officer",
"role_i18n": "Recruitment Officer",
"joined_at": 1459283580,
"account_name": "name1",
"account_id": id1
},
{
"role": "recruit",
"role_i18n": "Recruit",
"joined_at": 1417527204,
"account_name": "name2",
"account_id": id2
}
]
}}}

I've created all fields on the list matching those on the json output and made all the mappings. Put driver as REST(JSON), the correct end point, no credentials or filters, data start point = data.clanid.members and foreign key account_id.

When i try to run the webservice i get nothing.

Any help ?
 
FYI : I don't even get a message saying that are 0 records added/updated ...

I've got the plugin from the joomla3 branch on github ...
 
Wow, as I always say about Fabrik, "You learn something new every day". I wasn't even aware such a plugin existed.:cool:

The glaring difference I see is that WOT is not putting quotes around the values for every key:value pair. (e.g. count, joined_at, account_id). The JSON spec outlines what they're giving you is standard behavior - but my guess is the plugin doesn't see it that way. In the example given in the Fabrik tutorial video I noticed that all key:value pairs have quotes, numeric or not.

You could probably fix that by tweaking the plugin code and adding a function that changes the numbered values to strings in those fields. See... http://stackoverflow.com/questions/...y-failing-when-value-is-without-double-quotes

EDIT: I just gave quick look at the Fabrik code and one of the first things I noticed is a typo in the javascript.
Open both ./plugins/fabrik_list/webservice//plugins/fabrik_list/webservice/webservice.js and ./plugins/fabrik_list/webservice//plugins/fabrik_list/webservice/webservice-min.js and replace 'retrun' with 'return' - and see if that gives you better results. ;)

I thought I was the only one with what I call 'dyslexic fingers' - but it looks like Hugh suffers from it too.:p
 
Thank you for your help and for pointing out a typo.

I fixed the typo but still haven't managed to make it work.

Since my coding skills are zero ( sorry about that) i didn't found the exact file and sequence where i should use the replacer. Can you help ?
 
Thank you for your help and for pointing out a typo.

I fixed the typo but still haven't managed to make it work.

Since my coding skills are zero ( sorry about that) i didn't found the exact file and sequence where i should use the replacer. Can you help ?
I read your reply a few hours ago - but was reluctant to reply with "No, not really". I'm pretty swamped - but would like to test that plugin out myself sometime; it's on my "to do" list.

Then I got to wondering... Did you clear your browser cache after fixing the javascript typos? I've found that step can be notoriously quirky - like sometimes you have to empty the browser cache and sometimes you don't. Sometimes I have to do it twice, or even log out and back in again, before I actually see the changed code in the debugging console. This is just one of those, "Go figure" things I guess. Anyhow, just thought I'd mention that before you give up on it.

Maybe someone else who has actually used the plugin can help shed some light on your problem, (Though I'm not sure how long that typo has been there and it seems like that would pretty much kill the viability of the entire plugin.)
 
I thought I was the only one with what I call 'dyslexic fingers' - but it looks like Hugh suffers from it too.:p

Nope, that'd be Rob. Who is actually, no joke, seriously dyslexic. Things have improved a lot since we switched from Eclipse to PHP Storm, which is a lot better about picking up typos. But that code is pre PHP Storm.

-- hugh
 
I did clear browser cache, but thank you for reminding that also. Unfortunately it didn't solve my problem. I tend to agree with you on saying that this plugin is probably killed. Really hope that Rob or Hugh took a look at it, or even you if you got the time, Bauer.

Sorry for not be a coder, but as i use to say , the coders don't have to be users and users don't have to be coders. Imagine what it was if people started to demise photoshop coders not be able to use photoshop as well as photoshoppers ( sorry about this comparison but needed to explain and justifies my lack of knowledge about codding).

But to the point : I really wanted to pull this off via Fabrik, and really hope you guys look into it because it is a really great thing that Fabrik could do, and even better than CSV Import.

In case of you look into it please consider an option to run the webservice pull through cron job (schedule).
 
I've done further tests and removed all the fields that could generate strings without double quotes, although not what i've intended to get , but for testing purposes it's ok.

So it really doesn't do anything. I don't know if is failure of the plugin or from the data received, so here are my configurations for someone to try ( i'm putting my app id, so please do not abuse , ok ?)

so my configs are as following :

Access : Public
Label : Get Members
Submit message ( no change)
Driver : rest (json)
End Point : https://api.worldoftanks.eu/wgn/cla...bers.role,members.role_i18n&clan_id=500057156

Credentials : blank ( i've sended login info on end point, but did tried filling it. In case you want to try just use application ID above)
Get data method : blank
Filters: blank. ( in case you want to try could use last part of string : clan_id=500057156
data startpoint : data.500057156.members ( i'll show json output bellow)
Data map : just create a list with same fields : members.account_name ; members.role ; members.role_i18n ( i had also members.account_id but the output was without double quotes, but you can try out with that ( just add that field on end point string)
Update : YES

this is json output ( shortened)

{"status":"ok","meta":{"count":1},"data":{"500057156":{"members":[{"role_i18n":"Recruitment Officer","role":"recruitment_officer","account_name":"briote"},{"role_i18n":"Recruit","role":"recruit","account_name":"K0m0s"},{"role_i18n":"Recruitment Officer","role":"recruitment_officer","account_name":"jocaj"}]}}}


Try this to check if webservice plugin is working or not.
 
Is there any update on this plugin ? Have anyone tested my previous post setup ? Will it be an update or a fix for this plugin ? Because manually importing data through csv is not very practical ...

And if any of you decide to work on this could you please , PLEASE, consider an option to execute webservice update through cron job ( schedule tasks ) ???
 
We are in need of some funding.
More details.

Thank you.

Staff online

Members online

Back
Top