PHP WoW Battle.net Armory API

1 Dwarf Warrior
0
Hi all,

This API has now reached version 3.4 and is growing rapidly.
Feel free to contact me with questions and suggestions.

http://sourceforge.net/projects/wowarmoryapi/

### Features ###
* Extract all information from Battle.net armory
* Handles guilds, characters, arena teams and items.
* WoWHead integration for extracting remaining information
* WoWHead integration for easy tool tip links
* Full cache to limit connections and ensure speedy information
* Generates emblems based on guild tabard design
* Add your guild level to the emblem
* Built in sorting and filtering
* Locale support
and much much more..

Documentation of use:
http://sourceforge.net/p/wowarmoryapi/home/Home/

Please let me know what you think of this and give me ideas on how to improve.

Br,
Gro
Edited by Growar on 9/5/2011 1:24 PM PDT
Reply Quote
1 Dwarf Warrior
0
updated for version 3.4
Reply Quote
88 Draenei Priest
9495
This is amazingly written. Thank you

I have questions about setting up the DB to work with this.

Specifying the username and password and database name should be the only changes I need to make to:

<?php
$GLOBALS['wowarmory']['db']['driver'] = 'mysql'; // Dont change. Only mysql supported so far.
$GLOBALS['wowarmory']['db']['hostname'] = '127.0.0.1'; // Hostname of server.
$GLOBALS['wowarmory']['db']['dbname'] = ''; //Name of your database
$GLOBALS['wowarmory']['db']['username'] = ''; //Insert your database username
$GLOBALS['wowarmory']['db']['password'] = ''; //Insert your database password
// Only use the two below if you have received API keys from Blizzard.
$GLOBALS['wowarmory']['keys']['private'] = ''; // if you have an API key from Blizzard
$GLOBALS['wowarmory']['keys']['public'] = ''; // if you have an API key from Blizzard
include('BattlenetArmory.class.php'); //include the main class
?>

or do I need to change something else. Also do I need to specify in the database anything particular?

I'm sorry, I haven't worked a lot with php and mysql.
Reply Quote
1 Dwarf Warrior
0
username and password and database name should be the only changes you need to make.
You should delete these two if you dont have a blizz api key.
$GLOBALS['wowarmory']['keys']['private'] = ''; // if you have an API key from Blizzard
$GLOBALS['wowarmory']['keys']['public'] = ''; // if you have an API key from Blizzard


Other than that i normally dont keep track of the forum posts here. Posting on sourceforge where you download is better. Gives me emails ;)

Br,
Gro
Reply Quote
1 Undead Rogue
0
I use this API PHP too.
Much update with additions of function to simplify the use.
Reply Quote
90 Human Mage
7830
Just wanted to say thanks for this. I switched from my own code to this once I checked it out.
Reply Quote
1 Dwarf Warrior
0
You are welcome. :)
Suggestions are welcome on sourceforge.

Br,
Gro
Reply Quote
1 Dwarf Warrior
0
updated for version 3.5
http://sourceforge.net/projects/wowarmoryapi/
Reply Quote
85 Night Elf Rogue
7925
I am unable to get this functioning.
Looks like the user simply doesn't have access to the database I've set up but that's not the case. I've tested the connection and it's valid.

[25-Oct-2011 12:43:46] PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000] [1044] Access denied for user 'USERNAME'@'localhost' to database 'DATABASENAME'' in //pathto/wowarmoryapi/SafePDO.class.php:21
Stack trace:
#0 //pathto/wowarmoryapi/SafePDO.class.php(21): PDO->__construct('mysql:host=loca...', 'USERNAM...', 'PASSWORD')
#1 //pathto/wowarmoryapi/CacheControl.class.php(158): SafePDO->__construct()
#2 //pathto/wowarmoryapi/CacheControl.class.php(29): CacheControl->openDatabase()
#3 //pathto/wowarmoryapi/jsonConnect.class.php(28): CacheControl->__construct()
#4 //pathto/wowarmoryapi/Guild.class.php(20): jsonConnect->__construct()
#5 //pathto/wowarmoryapi/BattlenetArmory.class.php(138): Guil in //pathto/wowarmoryapi/SafePDO.class.php on line 21
Edited by Zushiba on 10/25/2011 10:54 AM PDT
Reply Quote
1 Human Warrior
0
You have to set the name of the database in the config file. Currently you are trying to use the database 'DATABASENAME'
Reply Quote
85 Human Warlock
4760
Is this so that you can add have your own armory app or something?Because I was curious as if blizzard allows us to add them to our own websites
Reply Quote
90 Night Elf Hunter
11595
scripts like this are to use the Blizzard api and format the data so that webpages can use it there are many different scripts to chose from this is one of them
Reply Quote
Is this the PHP library that's the most current right now? I read something that Blizzard released one, but I'm not finding it on their Git or on this forum.
Edited by Kaga on 9/12/2012 9:28 AM PDT
Reply Quote
90 Night Elf Hunter
11595
they did then removed it it was a demo
many people have made there own
Reply Quote
90 Troll Druid
2390
Not sure if this thread is still alive or not. But

$character->isValid();

is returning true aka 1, for invalid characters... :/

anyone seen this before?
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Reason
Explain (256 characters max)
Submit Cancel

Reported!

[Close]