Fix fatal error when setting API key

No such property $url, updated to use constant
Merge pull request #20 from chrisgeary92/patch-1

Fix fatal error when setting API key