wwevo / guildhome

Day to day guild management tool and community hub for Guild Wars 2
0 stars 2 forks source link

Save API character data to database #92

Closed AniOnGit closed 7 years ago

AniOnGit commented 7 years ago

As a first step in persisting the api data we save a users characters to our database. It would be nice if we could cache the following columns there: Lvl,Name,Race,Class,Gender,Age,Created

Regarding to the current 'characters table view' we need the class additionally. Birthday in column can be calculated on request (as it's an ever changing field we don't want to save to the db). About deaths, I am not sure if we need it, I would drop that column for now just because it's ever changing und would need to be re-requested from the api every time. Other ideas?

Steps to success:

  1. Create database tables.
  2. Save data to the tables instead of one settings fields.
  3. Adjust query for receiving the character data.
  4. Request class value and integrate it in save and query routine.
Kakirtog commented 7 years ago

Can't we just do the birthdays a bit different? Like, save the actual date of birth, and then calculate what to display from there.

AniOnGit commented 7 years ago

What? The actual date of birth should be the 'Created' column, right? And as I wrote 'birthday in column can be calculated on request' it actually means that the birthday is calculated and not saved in a database. Other than that I don't understand what you mean ;)

wwevo commented 7 years ago

We also need a way of managing the characters. the order in which they are received from the api is random and characters don't have a unique ID. We could use create date and account name, there might be trouble with old account though, since all characters created before August/2013 or something have the same create date.

I suppose some sort of fingerprinting is required and we should hope that we don't have guildies who made their first ten alts human male eles or something :) I haven't really looked into it.

This should be an Issue in it's own right, coming up with a way to fingerprint Characters and account for things like name change contracts and such. so stuff posted under a character alias (it's on the agenda) won't get the boot because the character ain't there anymore.

wwevo commented 7 years ago

This step is quite important to deal with, so we can get started on the tagging stuff. To be able to tag characters we need em in the database in an organized way.

wwevo commented 7 years ago

I feel this feature can be considered implemented. Please open additional Issues for bugs, if you find any and also for feature requests, if you have any ^^