[API Suggestion] Guilds

[API Suggestion] Guilds

in API Development

Posted by: Dr Ishmael.9685

Dr Ishmael.9685

How are you creating the “2 parts with the base colours added”? I think that’s the step I’m not getting right.

[API Suggestion] Guilds

in API Development

Posted by: smiley.1438

smiley.1438

I’m more interested, how i get this working without Imagemagick, since it’s not supported on my webspace >.<

[API Suggestion] Guilds

in API Development

Posted by: Moturdrn.2837

Moturdrn.2837

How are you creating the “2 parts with the base colours added”? I think that’s the step I’m not getting right.

I got the 2 parts manually by using the masks to get an area to cut out to a new image file. I’ve uploaded the zipped file of them here. I would probably have preferred learning how to use Imagick to do it with the masks themselves, but I already had the images and don’t quite have the time at the moment.

I’m more interested, how i get this working without Imagemagick, since it’s not supported on my webspace >.<

I originally coded this using PHP’s GD libraries before porting it to Imagick. If you have access to use GD I have there is a version of the code here: (old pastebin url) using that below.

It’s not as efficient as the Imagick version by any means, although that could possibly be due to how I’ve done it.

Edit: I’ve uploaded both the Imagick and GD versions for PHP to gist. Both of these versions now include code for manipulating the orientation of the emblem and background. Colours may still not be perfect but this is something I’m going to keep looking at.

PHP + Imagick: https://gist.github.com/moturdrn/9d03a0cd4967828ac6cc
PHP + GD: https://gist.github.com/moturdrn/d263d9f668dbe9c97718

Midnight Mayhem [MM] – Gunnar’s Hold
Visko Bludhaven – Level 80 Human Elementalist
Gunnar’s Hold Server Forum

(edited by Moturdrn.2837)

[API Suggestion] Guilds

in API Development

Posted by: smiley.1438

smiley.1438

Hey, thanks for posting this
Just a little note on your code: you call compositeColorShiftRgb within the 65536 run loop, which isn’t nessecary. Actually, don’t ever do that – it will melt you CPU (the unchanged script took ~20s on my machine)
Both parameters, $hslbc and $base are given through the API call. In fact, you don’t even need to calculate the RGB values anymore, since Cliff added them to the API yesterday.

Attachment:

First try with the Logo of my Guild:
https://api.guildwars2.com/v1/guild_details.json?guild_id=75FD83CF-0C45-4834-BC4C-097F93A487AF

Attachments:

(edited by smiley.1438)

[API Suggestion] Guilds

in API Development

Posted by: Moturdrn.2837

Moturdrn.2837

Not a problem

The only reason I’m actually looping through and doing that is emblems themselves don’t seem to have a single base RGB (or at least the way I have them). If I remove the compositeColorShiftRgb from within the loop and just apply the RGB values as given by Cliff then the result ends up more of a solid colour (unless I’m missing what you’re saying.)

Personally I won’t be calling my script often, only on detected changes of a Guild’s emblem, and only from the server side – it won’t be part of a user facing script

In the example attachments below, the left image is generated when calling compositeColorShiftRgb within the loop, the right when using only the RGB from the API.

As an additional example, I’ve also attached what your Guild’s emblem looks like when you run it through the loop. All 3 examples attached are using the GD library.

Attachments:

Midnight Mayhem [MM] – Gunnar’s Hold
Visko Bludhaven – Level 80 Human Elementalist
Gunnar’s Hold Server Forum

(edited by Moturdrn.2837)

[API Suggestion] Guilds

in API Development

Posted by: smiley.1438

smiley.1438

Hmm, yeah, theres a little difference
How long does it take to render the image?
And btw. which material type do you use to calculate? (mine above was metal)

(edited by smiley.1438)

[API Suggestion] Guilds

in API Development

Posted by: smiley.1438

smiley.1438

(double post to repair the broken pagination… see also: https://forum-en.gw2archive.eu/forum/support/forum/Thread-loaded-as-Empty )

[API Suggestion] Guilds

in API Development

Posted by: Dr Ishmael.9685

Dr Ishmael.9685

Both parameters, $hslbc and $base are given through the API call. In fact, you don’t even need to calculate the RGB values anymore, since Cliff added them to the API yesterday.

Cliff also said specifically that the static RGB value is not for use with guild emblems:

You still need the more detailed information if you want to apply dyes against textures yourself, such as for guild emblem compositing.

To save your CPU, you could split the function into one that builds the conversion matrix and one that applies it to an RGB value. I haven’t done that yet because I had hoped to get the image composition working first.

[API Suggestion] Guilds

in API Development

Posted by: smiley.1438

smiley.1438

Ah, ok, forget everything i’ve said before

[API Suggestion] Guilds

in API Development

Posted by: Moturdrn.2837

Moturdrn.2837

It takes ~20 seconds from start to finish when I’m viewing it too. When using Imagick it’s more like 6 when still using the loop.

Interestingly enough, you seemingly can use just the RGB from the API when using Imagick as that seems to actually keep the texturing a lot better (also the time is cut down from 6 to 3 seconds.) See the example images below. The first one is Imagick when using the function within the loop. The second is Imagick when just applying the base RGB. There is a slight difference though in the colours themselves.

I’m using the values for the cloth material type. Taken from the API documentation:

Emblems use the ‘cloth’ material value in the color. We do not currently have an API to resolve foreground_id or background_id to more useful information about the images they represent.

Attachments:

Midnight Mayhem [MM] – Gunnar’s Hold
Visko Bludhaven – Level 80 Human Elementalist
Gunnar’s Hold Server Forum

(edited by Moturdrn.2837)

[API Suggestion] Guilds

in API Development

Posted by: smiley.1438

smiley.1438

I did a funny stunt now: i played around with imagefilter() just to check the difference it makes. Anyway, while playing around, i’ve forgot to comment a line of code, which surprisingly returned a not-so-bad result. This is what i did:

imagehue($imagebk, $bg);
imagefilter($imagebk, IMG_FILTER_CONTRAST, $bg['contrast']);
#imagefilter($imagebk, IMG_FILTER_BRIGHTNESS, $bg['brightness']);
imagefilter($imagebk, IMG_FILTER_COLORIZE, $bg['rgb'][0], $bg['rgb'][1],$bg['rgb'][2]);

So i applied that to the processing for all parts and it returned this:

Attachments:

[API Suggestion] Guilds

in API Development

Posted by: Moturdrn.2837

Moturdrn.2837

That went pretty well When I originally started doing the GD stuff (and before it got all technical with this is how you should apply things) I actually used the imagefilter to adjust the brightness and contrast, though it always turned out naff heh.

I tried to replicate what you did with white, and whilst yes it does end up whiter, it also ends up losing its detail

Will have to have a play around tomorrow and see what happens if I tweak some other settings

Edit: Just before I was about to switch off for the night, I remembered that the Imagick version has a check in there for the alpha value of the pixel. Basically anything that’s completely transparent shouldn’t be checked. Just put a similar change into the GD version starting at line 93 (https://gist.github.com/moturdrn/9d03a0cd4967828ac6cc/revisions) so that anything with an alpha value of 127 (GD’s transparent value) isn’t put through the compositeColorShiftRgb function. Should improve performance, however it’ll be a lot more noticeable on the minimalist emblems.

Midnight Mayhem [MM] – Gunnar’s Hold
Visko Bludhaven – Level 80 Human Elementalist
Gunnar’s Hold Server Forum

(edited by Moturdrn.2837)

[API Suggestion] Guilds

in API Development

Posted by: smiley.1438

smiley.1438

Yeah, checking for the alpha value improves performance significant. Anyway, the other script is twice as fast (or even faster) without that check – about 2 seconds with checking alpha. One more reason to get that working.

[API Suggestion] Guilds

in API Development

Posted by: Moturdrn.2837

Moturdrn.2837

I’ve made further changes and split the compositeColorShiftRgb function into 2 different ones – getColorMatrix and applyColorTransform.

The matrix that you multiply the bgrVector against will only change on a dye colour change, so only needs to be computed once per colour. Pretty much what Dr. Ishmael suggested.

As a performance comparison see the difference between the old version (https://gist.github.com/moturdrn/9d03a0cd4967828ac6cc/69fd710ab5d88233e4c92cc0eba283a49e57a91b) which took ~7 seconds to generate your emblem, and the latest version (https://gist.github.com/moturdrn/9d03a0cd4967828ac6cc) which took ~2 seconds.

Midnight Mayhem [MM] – Gunnar’s Hold
Visko Bludhaven – Level 80 Human Elementalist
Gunnar’s Hold Server Forum

[API Suggestion] Guilds

in API Development

Posted by: zeeZ.5713

zeeZ.5713

I spent the night messing with that stuff, and, because I always wanted to learn how to use Google’s App Engine:

http://gw2-emblemer.appspot.com/emblem.get?guild_id=75FD83CF-0C45-4834-BC4C-097F93A487AF

It uses numpy and PIL to mess with the emblem data

The source is horrible, I’m not catching some of the errors, and there’s no caching, let’s see how long it takes to break and exceed all limits

I’m basically creating a matrix following Cliff’s JS example, then… turn the image from RGB into BGR, apply the mask, turn it back into RGB and add the a or b file as an alpha I blame Cliff, his matrix is totally backwards :P

E(E): Fixed issue with guilds with blank background, I think, thanks to whoever tried that and put it in my error log :P

(edited by zeeZ.5713)

[API Suggestion] Guilds

in API Development

Posted by: Moturdrn.2837

Moturdrn.2837

After requests, I’ve updated the PHP scripts to listen for a guild_id or guild_name being passed through the URL.

PHP GD Version: https://gist.github.com/moturdrn/9d03a0cd4967828ac6cc
PHP Imagick Version: https://gist.github.com/moturdrn/d263d9f668dbe9c97718

A download of all the images I’m using, including the question mark for unknown guilds, can be found here.

Still having the issue where the background doesn’t seem correct (when using the Abyss colours), will be trying to look at that again later today after today’s meetings finish. Once the background issue is sorted, my next step will be to store the images as local PNG files, with a name based on the hash of the emblem values. That way rather than re-generating when there are no changes, it can just serve the pre-generated PNG file.

Midnight Mayhem [MM] – Gunnar’s Hold
Visko Bludhaven – Level 80 Human Elementalist
Gunnar’s Hold Server Forum

(edited by Moturdrn.2837)

[API Suggestion] Guilds

in API Development

Posted by: smiley.1438

smiley.1438

Hey, 2 more notes on your code

  • You don’t need the objectToArray function – json_decode() can handle that for you – just add true as second parameter in my gw2apiRequest function
  • Theres no need to provide 2 versions of getColorMatrix and applyColorTransform, just drop the php 5.4+ part. php 5.4+ just supports the shorthand syntax for arrays aside from the regular syntax.

The performance increase was huge after splitting the functions, now we just need to find out how to process the images further, so that we get the same result like ingame. After stumbling across that imagefilter stunt i mentioned above, i think there’s some information missing.

(edited by smiley.1438)

[API Suggestion] Guilds

in API Development

Posted by: Moturdrn.2837

Moturdrn.2837

Hey, 2 more notes on your code

  • You don’t need the objectToArray function – json_decode() can handle that for you – just add true as second parameter in my gw2apiRequest function
  • Theres no need to provide 2 versions of getColorMatrix and applyColorTransform, just drop the php 5.4+ part. php 5.4+ just supports the shorthand syntax for arrays aside from the regular syntax.

The performance increase was huge after splitting the functions, now we just need to find out how to process the images further, so that we get the same result like ingame. After stumbling across that imagefilter stunt i mentioned above, i think there’s some information missing.

Thanks smiley, I’ve now updated the code to reflect the changes (removing the duplicate getColorMatrix and applyColorTransform functions, and modifying the gw2_api_request function)

I’ve also got a slight variation of the Imagick version running now. I really don’t know Imagick that well and the PHP documentation for it isn’t the best, so I’m not quite sure of the best way to replicate the imagefilter for IMG_FILTER_CONTRAST (Imagick’s contrastImage doesn’t seem to handle it in the same way) and IMG_FILTER_COLORIZE. As a work around I’m currently exporting the Imagick image to a blob, reading this in GD and applying the image filter, and then writing it back out to a blob before it’s read back in by Imagick.

As an example, http://www.gunnars-hold.eu/guild_emblems/emblem.php?guild_name=Veterans%20Of%20Lions%20Arch

It’s taking a bit longer than usual when generating a fresh image as I’m now directly getting the most recent data from the API for both the Guild and colours. That said, I’m now storing previously generated images so serve up if nothing has changed (so your Guild emblem should load quite quickly.)

Edit: The gists for both the Imagick and GD versions have now been updated with local file saving and serving.

Midnight Mayhem [MM] – Gunnar’s Hold
Visko Bludhaven – Level 80 Human Elementalist
Gunnar’s Hold Server Forum

(edited by Moturdrn.2837)

[API Suggestion] Guilds

in API Development

Posted by: zeeZ.5713

zeeZ.5713

… and here are the relevant bits, I think:

https://gist.github.com/zeeZ/5714857

Is that sane?

[API Suggestion] Guilds

in API Development

Posted by: smiley.1438

smiley.1438

Is that sane?

insane :P

Ok, i took Moturdrn’s script and added some fancy resizing and caching and got this:

http://gw2.chillerlan.net/examples/gw2emblems.php?guild_id=75FD83CF-0C45-4834-BC4C-097F93A487AF&size=128

(i should’ve added antialiasing or so…)

https://github.com/codemasher/gw2api-tools/blob/master/examples/gw2emblems.php

[API Suggestion] Guilds

in API Development

Posted by: zeeZ.5713

zeeZ.5713

That seems to be a little bit too bright

Is that sane?

insane :P

I added (mem)caches all over the place, it’s a lot saner now, I think :P

Time when nothing is cached: 1000ms to 1500ms
Time when all three color matrices are cached: 600ms to 800ms
Time when image is in cache: 50ms

Time when app engine starts a new instance: 3 to 20 seconds

I could probably shove off a bit of time by pre-calculating the matrices and putting them into the datastore, but I suspect lookup times are a big part of it.

And then there’s the whole color channels being backwards thing.

[API Suggestion] Guilds

in API Development

Posted by: Samuraiken.9581

Samuraiken.9581

OK, so for the first guild API release, this is what I’m considering:

/v1/guild_details.json?guild_id=xxxx

Would return name, tag, and emblem data.

The emblem would be in the form
“%i, %i, %i, %i, %i, %i”
background ID, foreground ID, flags, color 0, color 1, color 2
flags define things like flip image horizontally or vertically

like “1,62,0,114,114,93”

At some point we’d like to be able to render images on our servers so that you don’t have to, but that’s not available yet. I know there are some emblem creator websites and apps already — is this enough information to feed into those so that you can generate emblems?

Also, if you have any other ideas for public information that would be useful that could go into this API, let me know. Your ideas for authenticated/private APIs are good — this thread will be a useful reference for when we have the ability to implement them.

Is there any planned implementation for examining the deposit/withdrawal history for money/items into the guild bank? My guild does a lottery every week where we deposit 10s per “entry” into the lottery, and our poor guild leader and office go through and tally it all up…which can get tedious. If I was able to grab the list of deposits, sort it by time since deposit, and go back 7 days, I’d have my entries in a list and then could just choose a random number, pick that entry in the list, get the username, and “boom”!

[API Suggestion] Guilds

in API Development

Posted by: rodadams.5963

rodadams.5963

Is there any planned implementation for examining the deposit/withdrawal history for money/items into the guild bank? My guild does a lottery every week where we deposit 10s per “entry” into the lottery, and our poor guild leader and office go through and tally it all up…which can get tedious. If I was able to grab the list of deposits, sort it by time since deposit, and go back 7 days, I’d have my entries in a list and then could just choose a random number, pick that entry in the list, get the username, and “boom”!

This would most certainly wait until after there was oauth2 support for pulling account specific information.

Whether or not this is on the roadmap or not, I obviously don’t know, and thus far Cliff’s been pretty tight lipped about what features will be coming out, so I wouldn’t expect an answer to your question.
But I’d wait until we start seeing things like per character information coming out, and then start asking again.

[API Suggestion] Guilds

in API Development

Posted by: killo.5638

killo.5638

I’d like to see a guild roster,
with: username(and or)id, rank, last online, status, last map id, server id, achievement points , last character online
All just like the guild roster ingame.
Maybe add crafts? but this could also be added to the character API?

Also would like to see total members, total online right now, most online at (date and number)

I’d also love to see the ability to change the rank as I have a automated script running on my website that lets users choose between ranks and let me know they are active.

Showing and interacting with guild chat is not so important, but would be a neat feature.

Get a list of upgrades done and available? and to be upgraded? and a list of influence gain? like the history tab ingame.
Show if any bonuses are active. / Guild misisons are running.
I would really want to be able to read the message of the day, and if possible even change it.
Read the logs of the guild bank, see whats in the guild bank. Transfer gold/silver/copper between bank slots, aswell as items./ order items.

Maybe also give influence as public value?

This is just a quick thought of what I would like to see. I bet lots of other people already thought of this.. I hope you make this API as responsive and complete as possible. I’ve been waiting so long for this and am so happy right now!!!

[API Suggestion] Guilds

in API Development

Posted by: Dr Ishmael.9685

Dr Ishmael.9685

I’d also love to see the ability to change the rank as I have a automated script running on my website that lets users choose between ranks and let me know they are active.

Showing and interacting with guild chat is not so important, but would be a neat feature.

[…] I would really want to be able to read the message of the day, and if possible even change it. […] Transfer gold/silver/copper between bank slots, aswell as items./ order items.

I highly doubt that Anet is going to introduce any writeback functionality in the API, i.e. it’s going to remain read-only. In the past, they mentioned releasing a mobile app that would let you participate in chat, but we haven’t heard anything about that since release.

[API Suggestion] Guilds

in API Development

Posted by: killo.5638

killo.5638

I’d also love to see the ability to change the rank as I have a automated script running on my website that lets users choose between ranks and let me know they are active.

Showing and interacting with guild chat is not so important, but would be a neat feature.

[…] I would really want to be able to read the message of the day, and if possible even change it. […] Transfer gold/silver/copper between bank slots, aswell as items./ order items.

I highly doubt that Anet is going to introduce any writeback functionality in the API, i.e. it’s going to remain read-only. In the past, they mentioned releasing a mobile app that would let you participate in chat, but we haven’t heard anything about that since release.

Well maybe I read this wrong, but I quote this from a dev post.
https://forum-en.gw2archive.eu/forum/community/api/API-Development-Plans/first#post2081787
“that will allow websites and applications to talk to our API " As I understand “talk” is 2 way communication, and read-only is not really talking.. please correct me if i’m wrong. I haven’t found a post from a dev yet that denies the possibility of being able to post data to them in the (hopefully near)future.

“more personalized APIs to be created. Guild, Chat, Character, and other APIs are all possible.” Chat is probably gonna have a writeback? as you said a mobile app that let you participate. if they just release API for it, they wont have to make an app.. the community will do it for them…

I think they should make a it possible to change stuff through API… But make it limited so it cannot be abused. Example: Bot just invites all characters he can find into his guild. ( limit the invites to 1 invite per 1-5 minutes orso ) ..

If there is gonna be a write back feature, I really want to be able to manage my guild with my website, this will make the boring administration stuff go away. and more play time available!

[API Suggestion] Guilds

in API Development

Posted by: WBL.6715

WBL.6715

Return the guild message would be nice. We usually post dates and guild events in our guild message.

[API Suggestion] Guilds

in API Development

Posted by: MartyPartys.9187

MartyPartys.9187

I’d love to see a list of the members in the guild and what rank they are. Or just the guild leader, that would be good enough for me.

[API Suggestion] Guilds

in API Development

Posted by: Renovatio.2504

Renovatio.2504

Maybe there’s a reason the guild API doesn’t return members, but wouldn’t it be nice to have it return total members, members online, members repping, etc.

80 Thief of [RET] Reticle
Fort Aspenwood

[API Suggestion] Guilds

in API Development

Posted by: Virtute.8251

Virtute.8251

Devs already published in this forum that the above few suggestions (chat, roster, moar, etc.) are all valid and likely additions to the guild API, after OAuth2 is implemented in the API.

Legendary PvF Keep Lord Anvu Pansu Senpai
RvR isn’t “endgame”, it’s the only game. Cu in CU.

[API Suggestion] Guilds

in API Development

Posted by: Belorn.2659

Belorn.2659

Being able to show a guild roster on a Guild site is one of those “sound much simpler than it is” features. Just keeping a 300+ guild roster up-to-date is quite hard, and it would be nice to also be able to show who is currently online so new recruits can easy be directed to someone they can talk to.

Any hints if such features is being added, and maybe when?

(edited by Belorn.2659)

[API Suggestion] Guilds

in API Development

Posted by: MartyPartys.9187

MartyPartys.9187

I believe it is, but it wont be before Oauth2 has been added

[API Suggestion] Guilds

in API Development

Posted by: coderjoe.7538

coderjoe.7538

I’m currently working on a support website for my guild which I imagine other guilds might find very useful. It would be amazing if there were an API to allow me to query a guild’s roster and get information about the players in the guild.

The most important pieces of information for me are:

1. Character or Account name
2. A timestamp representing the last login of the account.
3. A timestamp representing the last time any charater on the account represented the selected guild.
4. The current guild rank of each guild member by ID
5. A list of currently configured guild ranks.

A bunch of nice to have information is:

1. All of the information from the current roster page for statistcs gathering.
2. Currently logged in member information.
3. Influence information (ideally with a way to keep track of highest earners).

Right now I’m only looking for read-only data, but in the future it would be awesome if there were a read/write API that allowed a user to authenticate with Arenanet so they could automate some of the guild maintenance tasks that people might want to perform.

Is anything like this on the horizon? Currently guild management is a very time consuming task for me, and I’d really like to simplify my life.

[API Suggestion] Guilds

in API Development

Posted by: Stefan Larimore.6872

Previous

Stefan Larimore.6872

Programmer

Next

Hi coderjoe,

Yes, we do have plans to offer guild and character APIs in an authenticated fashion (via OAuth2) – but secured to a particular user. For example, you would programmatically be able to obtain last-login/representation information for yourself, not any arbitrary user in your guild.

It sounds like what you would like is some enhanced permissions for guild leaders to obtain members’ guild stats. We will definitely keep this in mind when implementing the guild APIs. Thank you for the suggestion.

[API Suggestion] Guilds

in API Development

Posted by: smiley.1438

smiley.1438

[API Suggestion] Guilds

in API Development

Posted by: Drakma.1549

Drakma.1549

If you haven’t look at it yet, I highly suggest you look at how Eve Online does their guild API.

Each person is given 2 unique keys.

Key 1 is a read only key and gives very basic information on an account/character

Key 2 is a read/write key that allows an account to actually “do stuff”

With this system, the user can give out their Key 1 to whomever they wish to have access to their basic information. There is no requirement to give it out, but I am sure that large guilds can make it mandatory, etc.

Each key can be regenerated at any time allowing the user to effectively “cut off” access to their information.

A type of system like this + OAuth2 would be as secure as you can get it while allowing everybody involved to get the data they need.

It’s not extremely difficult to do. I’ve done it before with one of my applications. While not as big as GW2, it still has a fairly large user base.

That being said, I’ve submitted my application to Anet. I can start anytime.

[API Suggestion] Guilds

in API Development

Posted by: Lazarus.9716

Lazarus.9716

Drakma makes a very good point. CCP spent years figuring that out and it’s a good approach to keeping things secure while giving users the ability to control what type of information is available for a specific key. Definitely worth looking at as a model, depending on what type of information you’re planning to release through the API>

[API Suggestion] Guilds

in API Development

Posted by: rodadams.5963

rodadams.5963

I’d actually prefer a slightly different approach.

Be able to generate any number of keys, each with a different set of permissions, perhaps, and then be able to deactivate them individually.

That way, you could experiment with site XYZ, decide you don’t trust them, and cut them off without interfering with your guild site (or whatever).

[API Suggestion] Guilds

in API Development

Posted by: Drakma.1549

Drakma.1549

Honestly, that is a great approach.

Generate a key for a specific domain as well. So only that domain can use that specific key.

This is probably an approach that I will be taking to gw2stats.net as the API picks up use as well.

[API Suggestion] Guilds

in API Development

Posted by: Heimdall.4510

Heimdall.4510

rodadams.5963

I’d actually prefer a slightly different approach.

Be able to generate any number of keys, each with a different set of permissions, perhaps, and then be able to deactivate them individually.

That way, you could experiment with site XYZ, decide you don’t trust them, and cut them off without interfering with your guild site (or whatever).

all in all this is a rly good idea but why do you want to generate multiple keys? In my oppinion it’s much easier to provide a public and a private Version of the API. Within the public Version i would let the user choose which data he wants to share. The private Version could then contain the administrative stuff.

~ Heimdall
Die Vollenstrecker [VS] – Elona Reach [DE]
https://gw2apicpp.codeplex.com – Gw2API C/C++ Project

[API Suggestion] Guilds

in API Development

Posted by: Virtute.8251

Virtute.8251

… For example, you would programmatically be able to obtain last-login/representation information for yourself, not any arbitrary user in your guild.

It sounds like what you would like is some enhanced permissions for guild leaders to obtain members’ guild stats. We will definitely keep this in mind when implementing the guild APIs. Thank you for the suggestion.

This is precisely what we need—to be able to remotely query for the current guild roster table—and here is a use-case: Drupal 7 implementation of GW2 API.

In that case, what we would like to do is have our web server periodically (perhaps hourly on cron) query for changes in the guild roster, to keep a website user database up-to-date. This relieves a major pain-point for managing third-party guild websites. When a guild operates a website (say a forum) which has some permissions configured which require knowledge of the simple fact of whether or not a website-account owner is a member of this guild in-game, then this API proposal will make that significantly easier.

The root problem we want to address is that our third-party systems support contains data that always grows stale quickly. We absolutely must keep third-party copies of our guild rosters, and often the ranks as well. Currently, we are being forced to do this manually in all cases.

This API suggestion would truly be a major step toward helping player-organized communities grow up around your game. The hurdles we have to jump through currently are prohibitive. We have no clean and trustworthy access to any of the user- or guild-related data, and we’re forced to spend man-hours doing free data entry to compensate. Most of us refuse to do that, and our communities suffer.

We do not require write access, you can keep that in the game client. We do need read access, and it can be put behind OAuth2. I propose that a separate OAuth2 token should be generated for each guild, and it should be revealed only to the guild leader(s). This would be an API access token in the same respect as implemented in Google API, but with read-only access. The data made available there should be the same as we see in the guild screen in-game. The order in which you choose to implement these is yours to make, but I could likely give you a solid case for read-access to most pieces of it.

The roster is the most important data for us. The full roster and achievement points (including exact time that the most recent points were earned) are already public to every guild member, on the web, and the rest of data is public to them in-game. We just want it in a machine-readable format, up front, through the API, without having to parse DOM on that page.

Some examples of using the other data for community-building and support purposes:

  • Query influence point history to plot on a graph when the guild is most actively playing.
  • Query influence point history to calculate an estimate of upgrade capabilities (how often can we activate a planned set of Boost upgrades).
  • Query upgrades building status to generate an alert message on some condition like no upgrade running.
  • Query Message of the Day to publish it in other systems, like a website.
  • Query histories like Upgrades, Missions, Roster to know who is accomplishing all of that work, over a longer period than the 1 to 2 weeks shown in-game.

However, my favorite and most desired one would be read-access to the ranks and the roster (with user rank included) so that we can use the rank system in-game, to affect ACLs outside of the game. I don’t mean the in-game permissions assignments here, just simply the rank naming and positioning of the ranks within the list of 10 possible ranks. It would be fairly straight-forward for us to create 1:1 relationships between ranks in-game and, for example, account roles in Drupal or channel/server groupings in TeamSpeak.

Also note that there is discussion of this solution’s pain-point here, where some thought to use the Mumble memory-mapped file as a temporary unsecured solution.

Legendary PvF Keep Lord Anvu Pansu Senpai
RvR isn’t “endgame”, it’s the only game. Cu in CU.

(edited by Virtute.8251)

[API Suggestion] Guilds

in API Development

Posted by: Syranus Crade.6154

Syranus Crade.6154

if not suggested a list of goods stored into the guild-bank with its item_id’s would be nice too as example guild_bank array with item_id, count and also gold. For this its necessary to have view-rights of the guild bank

[API Suggestion] Guilds

in API Development

Posted by: Miss.5930

Miss.5930

An api that allows displays of guild’s current influence points, merits, member counts, and if possible active guild buffs.

This would be very useful.

Guild Leader of Archangels Haven [HALO] from SOR
Website: www.gw2halo.com
FB: https://www.facebook.com/gw2HALO

[API Suggestion] Guilds

in API Development

Posted by: lolage.1450

lolage.1450

Hi coderjoe,

Yes, we do have plans to offer guild and character APIs in an authenticated fashion (via OAuth2) – but secured to a particular user. For example, you would programmatically be able to obtain last-login/representation information for yourself, not any arbitrary user in your guild.

It sounds like what you would like is some enhanced permissions for guild leaders to obtain members’ guild stats. We will definitely keep this in mind when implementing the guild APIs. Thank you for the suggestion.

I think the best approach to character data permissions would be to basically copy how Eve does it. Basically you let the player create “API keys” with permissions so he could create one that only shows his current gear, or characters or another that shows all of his stats.

When implementing guild APIs, I’d really love to be able to query my guild member list and see who is representing. The reason behind this is to make member management easier and it’d be a good way to poll for activity. Is this something that might be available in future?

[API Suggestion] Guilds

in API Development

Posted by: Stefan Larimore.6872

Previous

Stefan Larimore.6872

Programmer

Hi Lolage,

Yes, I expect ultimately we would allow guild leaders to obtain guild representation and other basic guild activity of their members.

Regarding the ‘Eve’ approach to API keys: we instead are going with the OAuth2 approach, in which it is up to the 3rd party app to request required information permissions and the user may allow or deny these permissions en masse.

[API Suggestion] Guilds

in API Development

Posted by: lolage.1450

lolage.1450

Ah ok, thanks for the response. That sounds great Stefan, hope you guys keep up the good work.

Thanks.

[API Suggestion] Guilds

in API Development

Posted by: Naz.2607

Naz.2607

I’m not a techie by any means here so, help me understand this.

Are you talking about public access to guild information? Or just access to guild information if you are a member of that guild?
Public access to guild information is a truly bad idea. no-no-& no

Allowing only Guild Leaders access to special member information is also not helpful.
I am an officer and I run the guild in the guild leaders absence. The guild leader is only on a cpl of hours a day. I spend hours of my rl time keeping up the multiple guild spreadsheets required to keep track of what’s going on with our members.
Honestly, I’m not sure why the Guild Panel has not been revamped in 16 months… It’s almost useless. Why won’t you guys fix it?

What I would give for just a “Last log-in” date & the ability to grant individual members certain levels of access apart from rank…

Naz ©

[API Suggestion] Guilds

in API Development

Posted by: Morhyn.8032

Morhyn.8032

Hi Lolage,

Yes, I expect ultimately we would allow guild leaders to obtain guild representation and other basic guild activity of their members.

Regarding the ‘Eve’ approach to API keys: we instead are going with the OAuth2 approach, in which it is up to the 3rd party app to request required information permissions and the user may allow or deny these permissions en masse.

I am starting work on an application that my guild leader can use to manage a weekly raffle. It would be really helpful if this application could read the bank deposit list. This would greatly reduce the effort involved in running this raffle because the application could track who bought how many tickets instead of the guild leader having to do manual entry.

I realize such access would need to be secured, but the guild API is basically useless for me as it is. Guild leaders should be able to grant authorization to an application such that the application can get at least read-only access to all of the guild’s information (roster, bank history, etc.). And they should be able to revoke that access from a GW2 system (e.g. maybe the guild’s app developer went missing and the guild leader no longer trusts logging in to that app. The guild leader should be able to login to GW2 and revoke access for that app).

It would be really nice if this granting/revoking privilege could be granted to members with certain ranks.

[API Suggestion] Guilds

in API Development

Posted by: Ryan.9387

Ryan.9387

Guild leaders should just have access to a password key that needs to be passed to the API. Allow it to be changed and used by officers who are given the password.

This would be great for guild management.

Ranger | Elementalist

[API Suggestion] Guilds

in API Development

Posted by: Nabrok.9023

Nabrok.9023

I’m not a techie by any means here so, help me understand this.

Are you talking about public access to guild information? Or just access to guild information if you are a member of that guild?
Public access to guild information is a truly bad idea. no-no-& no

It would only be public if the guild published the information publicly. It wouldn’t be available for just anybody to retrieve (this is the point of authentication).

Allowing only Guild Leaders access to special member information is also not helpful.
I am an officer and I run the guild in the guild leaders absence. The guild leader is only on a cpl of hours a day. I spend hours of my rl time keeping up the multiple guild spreadsheets required to keep track of what’s going on with our members.
Honestly, I’m not sure why the Guild Panel has not been revamped in 16 months… It’s almost useless. Why won’t you guys fix it?

What I would give for just a “Last log-in” date & the ability to grant individual members certain levels of access apart from rank…

At a minimum, information we have in-game should be available. For example, every single guild members can log in, look at the roster and see who is online, who is representing, which server they are on, what zone they are in, etc. This information should all be retrievable.

The API may or may not include a last log-in date, but if it does not you can create one by having your app query the data at regular intervals (maybe every 15 minutes for example) and logging who is online and if they are representing or not. This is similar to how camp timers work in the WvW apps … that information isn’t exposed in the API but people query often and mark the time when a camp changes hands.

P.S. You can get currently get the next best thing to a last log in date from the achievements leaderboard. It’s actually last time an achievement point was earned, but most people earn at least 1 achievement point as they play. Filter by guild, you can hover over people to get a date.
Advanced: append ?pjax=1 to the URL and copy/paste into a spreadsheet.
Extra advanced: Paste into a text editor first and search & replace " Since " with a tab character, which puts the dates in their own column when you copy/paste again into the spreadsheet.

“I’m not a PvE, WvW, or PvP player – I am a Guild Wars 2 player”
Tarnished Coast – Dissentient [DIS]
All classes

(edited by Nabrok.9023)