Use ?s= for the size of an avatar image
This is shorter in the URL and more closely matches the API used by Gravatar, a popular avatar service that a lot of people use. Change-Id: Iec01bb5b4c959d76effe9afe78d6644218235130
This commit is contained in:
@@ -62,7 +62,7 @@ public class AvatarImage extends Image {
|
||||
}
|
||||
RestApi api = new RestApi("/accounts/" + u + "/avatar");
|
||||
if (size > 0) {
|
||||
api.addParameter("size", size);
|
||||
api.addParameter("s", size);
|
||||
}
|
||||
return api.url();
|
||||
}
|
||||
|
||||
@@ -27,7 +27,8 @@ import org.kohsuke.args4j.Option;
|
||||
class GetAvatar implements RestReadView<AccountResource> {
|
||||
private final DynamicItem<AvatarProvider> avatarProvider;
|
||||
|
||||
@Option(name = "--size", usage = "size in pixels (height and width)")
|
||||
@Option(name = "--size", aliases = {"-s"},
|
||||
usage = "recommended size in pixels, height and width")
|
||||
private int size;
|
||||
|
||||
@Inject
|
||||
|
||||
Reference in New Issue
Block a user