Board Thread:JS Development/@comment-5017871-20200111053231/@comment-5017871-20200115062923

Fngplg wrote: this is your request: https://dev.fandom.com/api.php?action=parse&format=json&prop=headhtml&headhtml=%7B%7Buser/fngplg%7D%7D&text=%7B%7Buser/fngplg%7D%7D do you see editcount here?

you need this: https://dev.fandom.com/api.php?action=query&list=users&usprop=editcount&ususers=fngplg

also, the script provides the "ajax" object to you, that you supposed to use to make your query. read UserTags/Extending for details. This helped out since I was working on this without any direction. Also, I was just focused on using one portion of code without looking towards elsewhere.

However, I'm faced with a new problem that the variable won't register the User Contributions amount. Would it be  or  ? Or am I using the wrong query altogether?

---

Current Code //Ranks window.UserTagsJS.extensions.Ranks = { start: function(config, username) { return { ajax: { //Pulls Edit Counts action: 'query', type: 'contributions', prop: ['prop', 'prop'], limit: 1, dir: 'newer' },			tags: { editor: { u: 'Wiki Editor'}, proficient: { u: 'Proficient Editor' }, grand: { u: 'Grand Master of All Things Bad' } }		};	},	generate: function(json) { num = json.query.contributions; if (num > 0 && num < 150) { return ['editor']; }			else if (num >= 150 && num < 5000) { return ['proficient']; //Should give users Proficient Editor tag if over 150 Edits but under 5000 Edits. }			else if(num >= 5000) { return ['grand']; //Should give users Grand Master of All Things Bad tag if over 5000 Edits. }			return null; } };