public class ImgurClient extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ImgurClient.ImageResponse
An image response is composed of two Maps, one describing the image and
another describing its links
|
static class |
ImgurClient.ImgurType |
static class |
ImgurClient.ImgurTypeHash
The type and hash usually returned from
imgurURLtoHash(URL) |
| Constructor and Description |
|---|
ImgurClient() |
| Modifier and Type | Method and Description |
|---|---|
List<ImgurClient.ImageResponse> |
getAlbumImages(String hash)
Calls http://api.imgur.com/2/album/:ID
|
List<ImgurClient.ImageResponse> |
getGalleryImages()
Calls http://imgur.com/gallery.json
|
List<ImgurClient.ImageResponse> |
getImages(ImgurClient.ImgurTypeHash typehash)
Depending on the
ImgurClient.ImgurTypeHash instance calls
getSingleImage(String), getAlbumImages(String) or
getGalleryImages() |
ImgurClient.ImageResponse |
getSingleImage(String hash)
Calls http://api.imgur.com/2/image/:HASH
|
static ImgurClient.ImgurTypeHash |
imgurURLtoHash(URL url) |
public ImgurClient()
public List<ImgurClient.ImageResponse> getImages(ImgurClient.ImgurTypeHash typehash) throws org.apache.http.client.ClientProtocolException, IOException
ImgurClient.ImgurTypeHash instance calls
getSingleImage(String), getAlbumImages(String) or
getGalleryImages()typehash - ImgurClient.ImageResponse instancesIOExceptionorg.apache.http.client.ClientProtocolExceptionpublic ImgurClient.ImageResponse getSingleImage(String hash) throws org.apache.http.client.ClientProtocolException, IOException
hash - IOExceptionorg.apache.http.client.ClientProtocolExceptionpublic List<ImgurClient.ImageResponse> getAlbumImages(String hash) throws org.apache.http.client.ClientProtocolException, IOException
hash - IOExceptionorg.apache.http.client.ClientProtocolExceptionpublic List<ImgurClient.ImageResponse> getGalleryImages()
public static ImgurClient.ImgurTypeHash imgurURLtoHash(URL url)
url -