https://github.com/Shopify/shopify_api/blob/master/lib/shopify_api/limits.rb




?




Spin up some threads, should be easy to reproduce.

—
Sent from my iPhone

On Tue, Oct 29, 2013 at 6:28 PM, Christopher Saunders
<notifications@github.com> wrote:

>> @@ -140,6 +140,10 @@ def download_asset(key)
>>        elsif asset['attachment']
>>          content = Base64.decode64(asset['attachment'])
>>          format = "w+b"
>> +      else
>> +        response = asset['response']
>> +        handle_api_limit(key) if response.code == 429 || response.code >= 500
> Yeah I was looking through the docs but there's no examples of API
> responses along with their headers :/
> On 29 October 2013 17:56, John Duff <notifications@github.com> wrote:
>> In lib/shopify_theme/cli.rb:
>>
>> > @@ -140,6 +140,10 @@ def download_asset(key)
>> >        elsif asset['attachment']
>> >          content = Base64.decode64(asset['attachment'])
>> >          format = "w+b"
>> > +      else
>> > +        response = asset['response']
>> > +        handle_api_limit(key) if response.code == 429 || response.code >= 500
>>
>> We might return the actual time in a header if you want, then will be
>> future proof
>>
>> —
>> Reply to this email directly or view it on GitHub<https://github.com/Shopify/shopify_theme/pull/56/files#r7296302>
>> .
>>
> -- 
> Chris Saunders // Developer @ Shopify
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/Shopify/shopify_theme/pull/56/files#r7297205