4chan / 4chan-API

Documentation for 4chan's read-only JSON API.
http://www.4chan.org/
1.03k stars 73 forks source link

Flag data not up to date #19

Closed thereals0beit closed 10 years ago

thereals0beit commented 10 years ago

The flags image URLs in the API docs are incorrect, these days there's only one flag image and 4chan uses CSS sprite rendering techniques to render the flag properly.

If there was some sort of API to grab flag data (flag image which you only load once, per board) and if each post had a 'flag_x' and 'flag_y' so we could select the proper flag from the sprite, I think this would work.

desuwa commented 10 years ago

Old links still work.

And you should probably use your own sprite image if your application can't use CSS classes to render flags.

thereals0beit commented 10 years ago

Right, the issue was that you have to convert country to lower case, and this is not specified in the docs. In any case, I will probably convert to the sprite method since it seems more efficient than delivering all those images from CDN.

thereals0beit commented 9 years ago

Alright, so, this has become an issue again on /pol/ https://s.4cdn.org/image/country/troll/au.gif https://s.4cdn.org/image/country/troll/gb.gif https://s.4cdn.org/image/country/troll/de.gif

Once again I have to recommend just outputting the x/y data for the sprite, but if not, these images need to be generated. Your older reply "you should probably use your own sprite image if your application can't use CSS classes to render flags"

That was never the issue, BTW. The issue is that I don't know the x/y on your sprite for each country. I could figure it out manually, but it seems like a pain.

/int/ and associated "normal" flag boards appear to be working fine.