instagram API mashup

there's a lot in ToDo, it's 'Coming soon'
I was trying to return responses only after all ajax calls are done. success seems to return only a single object, so I had to wrap the array 'responses'.

Date: Tue, 8 Jul 2014 13:53:41 -0700
From: notifications@github.com
To: mashup@noreply.github.com
CC: futurus@live.com
Subject: Re: [mashup] instagram API mashup (#10)

In script/instagram.js:

> +            $.ajax({
> +                dataType: "jsonp",
> +                url: requests[i].url,
> +                data: requests[i].data,
> +                success: function (response) {
> +                    responses.push(response);
> +
> +                    if (responses.length === requests.length) {
> +                        that.trigger('done', {
> +                                out: responses
> +                            }
> +                        );
> +                    }
> +                }
> +            });
> +        }

What is this doing? (tell me via code)


—
Reply to this email directly or view it on GitHub.