Multiple Characters in one API request?

API Discussion
So I'm trying to pull the average ilevel for an entire guild. The guild endpoint allows me to pull all members in one call but the member data appears to be missing ilevel. Is there a way to request ilevel here?

Alternatively is there a way to request multiple characters from the character endpoint in one call as here I can query items.

Apologies if this is a silly question.
Hey Scoops,

Totally not a silly question :)!

Unfortunately we do not currently support any sort of "bulk fetch" functionality that would allow you to request multiple characters at once.
08/28/2018 07:29 AMPosted by Maguthul
Hey Scoops,

Totally not a silly question :)!

Unfortunately we do not currently support any sort of "bulk fetch" functionality that would allow you to request multiple characters at once.


I see in that case I'll have to limit the amount of characters or how often I query.

Thanks for the response!
08/28/2018 07:58 AMPosted by Scoops
08/28/2018 07:29 AMPosted by Maguthul
Hey Scoops,

Totally not a silly question :)!

Unfortunately we do not currently support any sort of "bulk fetch" functionality that would allow you to request multiple characters at once.


I see in that case I'll have to limit the amount of characters or how often I query.

Thanks for the response!


Best idea would be to store it in a database of some kind, and do your calculations from there... and only update the database once a day, once an hour, or whatever works best for you (keeping in mind the query limits)
08/29/2018 01:26 PMPosted by AussieEevee
08/28/2018 07:58 AMPosted by Scoops
...

I see in that case I'll have to limit the amount of characters or how often I query.

Thanks for the response!


Best idea would be to store it in a database of some kind, and do your calculations from there... and only update the database once a day, once an hour, or whatever works best for you (keeping in mind the query limits)


Hey Scoops, this is exactly what I did. Using a Javascript Cron job, I am storing my whole guild's characters, at least above an inactive rank number, in a PostgreSQL database. The Cron runs once an hour now, used to run once a day, and is sitting on a little Linode server that only costs me $5 per month. If you're interested in this, I'm more than happy to share the cron job with you. Just let me know.
09/06/2018 05:17 PMPosted by Kryo
<span class="truncated">...</span>

Best idea would be to store it in a database of some kind, and do your calculations from there... and only update the database once a day, once an hour, or whatever works best for you (keeping in mind the query limits)


Hey Scoops, this is exactly what I did. Using a Javascript Cron job, I am storing my whole guild's characters, at least above an inactive rank number, in a PostgreSQL database. The Cron runs once an hour now, used to run once a day, and is sitting on a little Linode server that only costs me $5 per month. If you're interested in this, I'm more than happy to share the cron job with you. Just let me know.


Thanks for the tip AussieEevee & Kryo.

I'd love to see your code! I was leaning towards this solution so it would certainly be helpful :)
...

Hey Scoops, this is exactly what I did. Using a Javascript Cron job, I am storing my whole guild's characters, at least above an inactive rank number, in a PostgreSQL database. The Cron runs once an hour now, used to run once a day, and is sitting on a little Linode server that only costs me $5 per month. If you're interested in this, I'm more than happy to share the cron job with you. Just let me know.


Thanks for the tip AussieEevee & Kryo.

I'd love to see your code! I was leaning towards this solution so it would certainly be helpful :)


Here you go, just remember that I'm still in school for Web Development so my code is OK at best, but it gets the job done.

https://github.com/KryoUS/ComplexityCharacterCron
Good afternoon. I have a script that creates a database of guild members. I need to get the "title" of each of them and add it to the database. The script searches for the "selected" key, if it finds the value "true", then it brings the "Title name" to the database.

The problem is that the guild members are too many, and the queries are about ~ 180. The script deserves error 500. Is it possible to get the current title by reducing the number of requests?

I'm sorry for my English

Join the Conversation

Return to Forum