April 3, 2009

AssociateTag for Zend_Service_Amazon

I've been using the Zend Framework recently.
Zend_Service_Amazon did not have an option to configure your AssociateTag, which is your identifier from Amazon's Associate Web Services.

So I added that to the Zend Service, now all returned links contain your tag.

To use it, just call the constructor with your AssociateTag:

$amazon = new Zend_Service_Amazon_Query($awsId, $countryCode, $associateTag);

Here are the changes to Amazon.php:

class Amazon {
 ...
public $associateTag;

public function __construct($appId, $countryCode = 'US', $associateTag = '')
{
...
$this->associateTag = (string) $associateTag;
...
 }

public function itemSearch(array $options)
{
$defaultOptions = array('ResponseGroup' => 'Small', 'AssociateTag' => $this->associateTag);
 ...
 }

public function itemLookup($asin, array $options = array())
{
$defaultOptions = array('IdType' => 'ASIN', 'ResponseGroup' => 'Small', 'AssociateTag' => $this->associateTag);
 ...
 }
That's it! Easy, right?

Suggestions are welcome!
Tell me if it works for you and what you use it for. :)

March 27, 2009

Buchzeiger

Was ist Buchzeiger?

Buchzeiger ist ein soziales Netzwerk für alle die gerne Bücher lesen!

Warum teilnehmen?

Du willst neue interessante Bücher entdecken? Deine Freunde könnten welche wissen!

Hast du schonmal ein Buch gelesen und...
  • wolltest aller Welt mitteilen wie gut oder grausam es war?
  • warst auf der Suche nach einem ähnlichen?
  • hattest den Plan einem Freund ein Buch zu schenken aber wusstest nicht welches?

Welche Features hat Buchzeiger.de?
  • Richte Dir ein virtuelles Bücherregal ein!
  • Füge deine Freunde hinzu!
  • Mach Dir einen Wunschzettel!
  • Wirf schlechte Bücher in deinen Papierkorb!

Details und Anmeldung unter www.buchzeiger.de

Auch bei twitter sind wir vertreten: twitter.com/buchzeiger

October 31, 2008

Introduction

Hi,
I'm Daniel and this is my new blog. :)

I want to give you a short overview of the topics I plan to cover here:
  • the development of applications for mobile phones using Google's free Android SDK and Eclipse.
  • a variety of things you can develop using Sun's Java

Ok, that's for it now. See you next time!