Hello everyone,
I am about to release the first version of an API module used to integrate Blizzard Community Plateform API and Drupal; It need reviews and any help is appreciated.
Here is the link of the discussion: http://drupal.org/node/1351312
This module is a set of a base component and products to integrate with drupal core. The Blizzard Community Platform API enables communication with the RESTful APIs exposed through the World of Warcraft community site.
This module is only available for Drupal 7 and the first release only support Character, Guilds and Rank management. The code is tested and more work is needed to cover all the features. The module is used in production on the live demo website provided on the project page.
Here is the project page: http://drupal.org/sandbox/SylvainLecoy/1256604
Here is the git repository: http://drupalcode.org/sandbox/SylvainLecoy/1256604.git
Here is the production website: http://shinsen.fr/
Please feel free to ask any questions or make remark about the code, copy or architecture.
Sylvain Lecoy

Comments
Nice work.
I was looking at getting something like this implemented on my site. It appears you've done a load of the grunt work already. Nice :D
I have a few points/queries though.
Thanks
Adam
Hi cooperaj, I'm glad you
Hi cooperaj,
I'm glad you find it useful, and you have to know that i'm open to discussion about this module. I am also looking for co-maintainer :)
About your questions:
1 - I am actually using this function to display usernames. I don't know if it worth to put it in the base module.
<?php
/**
* Implements hook_preprocess_forum_submitted().
*
* Replace topic author by its main character if existing.
*/
function wow_character_preprocess_forum_submitted(&$variables) {
$characters = &drupal_static(__FUNCTION__);
$uid = isset($variables['topic']->uid) ? $variables['topic']->uid : 0;
if (empty($characters[$uid])) {
$characters[$uid] = db_select('wow_characters', 'c')
->fields('c')
->condition('uid', $uid)
->condition('is_main', TRUE)
->execute()
->fetch();
}
if ($characters[$uid]) {
$character = $characters[$uid];
$size = array('size' => 14);
drupal_add_css(drupal_get_path('module', 'wow') . '/css/wow.css');
$variables['author'] = '<span class="icon-frame frame-14" style="">' . theme('wow_character_class', array('character' => $character) + $size) . '</span> ';
$variables['author'] .= theme('wow_character_name', array('character' => $character));
}
}
?>
2 - Yes I got it too, I didn't yet pushed the code into the repository, nice catch anyway. If you want to post your in-depth review in the project application page, it would be very welcomed.
3 - I was really thinking about renaming the character entity into wow_character entity, i'm planning to do it. What do you think ?
4 - What do you mean by character listings ? In the admin panel ? Sure if there is something that is not standard, please do not hesitate to correct me, I'll fix it.
Sylvain