aweber/AWeber-API-PHP-Library — Issue #13: get 'url' key value from links collection entry
Author: tigerlight
Created: 2012-02-11 01:55:44+00:00
State: open

I'm trying to get the 'url' value from a link entry object. I typically work with javascript and json so I expected to be able to do something in php like,

$link_entry->url

that format gives me what I want for keys like, $link_entry->total_unique_clicks

but for url I get the 'self_link' value (without the aweber root).

For instance if I echo a link entry formatted as I would expect a json object. I get something that looks like,

{
"total_unique_clicks":1, "clicks_collection_link":"https:\/\/api.aweber.com\/1.0\/accounts\/530794\/lists\/1738491\/campaigns\/b12999136\/links\/311\/clicks",
"url":"http:\/\/www.amiraalvarez.com",
"self_link":"https:\/\/api.aweber.com\/1.0\/accounts\/530794\/lists\/1738491\/campaigns\/b12999136\/links\/311",
"resource_type_link":"https:\/\/api.aweber.com\/1.0\/#link",
}

if I echo $link_entry->url I get,

/accounts/530794/lists/1738491/campaigns/b12999136/links/311

This is probably me not knowing some php magic. How would I get the value of the 'url' key?