A question regarding my next plugin
-
Oh! *facepalm* RIGHT. I forgot the GitHub embed plugin uses templates.js because I was do used to doing it the derp way (creating HTML in javascript, heh).
Here is where I pass in the issue data. Notice I am calling
appModule.render
, which is defined inEmbed.init
.Got a repo I can check out? Would be easier than going through the list of how a template can be done wrong (no offense @psychobunny )
-
@julian Sweet, thanks a lot Julian, only issue I've got left is the image(also in your screenshot), the api states that to get the image, you must authenticate yourelf.
I have a consumer key & secret which I believe is all I need, just not sure where to put them.
-
There shouldn't be any need to funnel all requests into their OAuth flow, especially since you're doing this server-side. Is there any way for you to generate a token in the Discogs API settings, instead of having to step through and authorize yourself?
-
@julian Apparently, you can change
http://api.discogs.com/image/R-90-5920911-1406378530-1731.jpeg
to
http://s.pixogs.com/image/R-90-5920911-1406378530-1731.jpeg
And you get the correct image, but I'm not sure how that would be changed, as the API gives you the full URL.
-
@julian said:
var imageUrl = whatever; imageUrl.replace('api.discogs', 's.pixogs');
Object #<Object> has no method 'replace'
I didn't actually use whatever, but it was either a not defined error, or this one. I also tried using things like
$('img[src="http://api.discogs.com"]').attr('src','http://s.pixogs.com');
But nothing changed.
-
Ah yes... compliments can only get you so far
var imageUrl = whatever; // imageUrl.replace('api.discogs', 's.pixogs'); console.log('@@@@@ omgomgomg, the image is of type: ', typeof imageUrl);
It should be a string. It seems it isn't. Maybe it's an Array?
-
@julian Can I just clarify where the best place to put this is? Also,
whatever;
is undefined.Ok, so I did
var imageUrl = []; // imageUrl.replace('api.discogs', 's.pixogs'); console.log('@@@@@ omgomgomg, the image is of type: ', typeof imageUrl);
and it comes back as object.
Same if I do
{}
Everything else comes back as undefined. I even tried
worknowplskthx