1. get url, 2. load url via generic HTTP method, 3. check response?


On 25 December 2013 14:37, Antonio Bertucci <notifications@github.com>wrote:

> In core/src/main/java/uk/co/ataulm/mijur/core/model/GalleryItem.java:
>
> > +    @Override
> > +    public String toString() {
> > +        StringBuilder builder = new StringBuilder(GalleryItem.class.getSimpleName());
> > +        builder.append('{')
> > +                .append("id:").append(id).append(',')
> > +                .append("title:").append(title).append(',')
> > +                .append("is_album:").append(is_album).append(',')
> > +                .append("link:").append(link).append('}');
> > +
> > +        return builder.toString();
> > +    }
> > +
> > +    public static String getImageUrlFor(GalleryItem item) {
> > +        if (item.is_album) {
> > +            // worried it's not a jpg? The jpg extension also works for gifs on Imgur (2013.12.24)
> > +            return String.format("http://i.imgur.com/%s.jpg", item.cover);
>
> I would have a test for this: given this pattern can change later on imgur
> side, is better to have a test to properly highlight that.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/ataulm/mijur/pull/13/files#r8550953>
> .
>