Getting Files from API Guild Call — Guild Wars 2 Forums
Home API Development

Getting Files from API Guild Call

Hey guys,
I am trying to access the guild emblems from an API call that I have, but no matter how I make the HTTP GET, I am returned the same values. Essentially, I am trying to get the most up-to-date guild emblems from the game as the websites that exist do not have the newer emblems. This is my current response:

guild_id:"D1177FE0-BE2D-E411-BE98-E4115BDFC985"
guild_name:"Shrouded Warband"
tag:"ShW"
background_id:2
foreground_id:269
0:"FlipBackgroundHorizontal"
background_color_id:673
foreground_primary_color_id:473
foreground_secondary_color_id:93

Where would I go from here?
Thanks in advance.

Comments

  • So basically you need to build the entire logo yourself with the data that you have there.

    background_id:2
    This is the ID of the background image. You can get the URL of the image by calling https://api.guildwars2.com/v2/emblem/backgrounds/2.

    background_color_id:673
    This is the color that the background image needs to have. Call https://api.guildwars2.com/v2/colors/673 to get the color values and recolor the background image in this color.

    0:"FlipBackgroundHorizontal"
    This tells you, that the background image is flipped horizontally in the guild emblem. So you need to manipulate the background image and flip it on its horizontal axis.
    There are other flags which might tell you, that you have to flip it on its vertical axis. There are also flags which tell you to flip the foreground image.

    foreground_id:269
    This tells you which foreground images you need to use. Call https://api.guildwars2.com/v2/emblem/foregrounds/269 to get the image data. You now just have to place the foreground image ON TOP of the background image that you already have.
    On the foregrounds API endpoint you get three values. Ignore the first one.

    Download the SECOND image and recolor it in the color defined by foreground_primary_color_id:473. Then place it on top of the background image that you have computed.
    Then download the THIRD image from the foregrounds endpoint and recolor it in the color defined by foreground_secondary_color_id:93. Then place it on top of the image that you have.