Avatar URL Change Next Week

34 views
Skip to first unread message

Matt Graham

unread,
Jul 12, 2012, 4:41:12 PM7/12/12
to Etsy API V2
Hi all,
Next week, we will be making the same change to user avatar URLs that we recently made to listing images URLs where additional data is added to the avatar URLs. Querying the API will be the only way to get valid URLs for any avatars uploaded after this change is made. We are not breaking any old URLs. Any URLs to avatars that were uploaded prior to this change will continue to work.

Thanks and please let us know if you have any questions.
Matt

Chipit Prom

unread,
Jul 12, 2012, 4:44:26 PM7/12/12
to etsy-...@googlegroups.com
Thanks Mat. I have a ~semi~

related question.

For the etsy images, i *need* them in https. Right now, I'm using this function to "convert" http to https images:
private function httpsImage($url)
{
preg_match('/http:\/\/img(\d+)(?:-ec|-llalt)?.etsystatic.com\/(.*)/i', $url, $matches);
$https = "https://ny-image$matches[1].etsy.com/$matches[2]";
return $https;
}

I've had to update the function a couple of times as the URL structure began to vary… is there a more correct way to be doing this?

jake
> --
> You received this message because you are subscribed to the Google Groups "Etsy API V2" group.
> To post to this group, send email to etsy-...@googlegroups.com.
> To unsubscribe from this group, send email to etsy-api-v2...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/etsy-api-v2?hl=en.

Matt Graham

unread,
Jul 12, 2012, 4:58:54 PM7/12/12
to etsy-...@googlegroups.com
Hi Jake,
We hope at some point to make the HTTPS hostnames match the HTTP hostnames but there are some things to resolve before that can happen. The function you pasted is the best way to handle things as they currently stand.

Julian L.

unread,
Jul 13, 2012, 1:04:08 PM7/13/12
to etsy-...@googlegroups.com

Good to know, as long as we're doing updates to properly use listing URLs this is a good time to fix those, as well. Thanks for the note!

Not like it matters much on the scale of the typical Etsy app, but it seems like a shame to convert all of these nice integer fields in our database to characters, efficiency-wise.

Julian L.

unread,
Aug 4, 2012, 5:36:28 PM8/4/12
to etsy-...@googlegroups.com

Speaking of image URLs...

I was set to upgrade our Treasury apps to use the new image URLs, but using the API browser, it seems that the Treasury is still only returning a numeric image ID for listing images. Of course this is now inadequate to display the images.

For example from

{
          "creation_tsz": 1344097370
          "data": {
            "user_id": 15153332,
            "title": "Ivory Vintage Suitcase - Samsonite marbled finish luggage",
            "price": "42.00",
            "listing_id": 106009368,
            "state": "active",
            "shop_name": "charliesnest",
            "image_id": 362551532
          }
        
Will you be adding image urls to this resource any time soon, or should I go ahead and have it do a second query to get the image_urls for each items? (I know it can be done in semi-bulk, so that's not a problem. In fact if I recall, we already have to do that to get something about the currencies right, but just checking since it seems inefficient).

Thanks,
Julian

Julian L.

unread,
Aug 5, 2012, 3:52:45 PM8/5/12
to etsy-...@googlegroups.com

I checked on that and yes, currently I'm already doing a separate call to get the currency code for each item in a Treasury, since this info is not in the data packet, as shown here.

Maybe if you folks update it to give the proper image info, the currency code could also be added? 
Reply all
Reply to author
Forward
0 new messages