public class Instagram extends BaseSource<Instagram>
| Modifier and Type | Class and Description |
|---|---|
static class |
Instagram.Type |
BaseSource.AuthParams, BaseSource.ResourceParamsauth, config, log, parameters, resources, type| Constructor and Description |
|---|
Instagram(DataSiftConfig config) |
| Modifier and Type | Method and Description |
|---|---|
Instagram |
addOAutToken(String oAuthAccessToken,
long expires,
String name)
Adds an OAuth token to the managed source
|
protected Instagram |
addResource(Instagram.Type type,
String value,
float longitude,
float lattitude,
int distance,
boolean exactMatch,
String fourSquareLocation)
Adds a resource object to the request of the given type, which is always required
|
Instagram |
byArea(float longitude,
float lattitude) |
Instagram |
byArea(float longitude,
float latitude,
int distance)
Adds a resource a given area
|
Instagram |
byFoursquareLocation(String fourSquareLocation)
The same as
byLocation(float, float, int) but instead of using coordinates a foursquare location ID
is provided |
Instagram |
byLocation(float longitude,
float latitude) |
Instagram |
byLocation(float longitude,
float latitude,
int distance)
Adds a resource a given location
|
Instagram |
byPopularity()
Adds a resource that is filtered based on popularity
|
Instagram |
byTag(String tag,
boolean exactMatch)
Adds a resource by tag
|
Instagram |
byUser(String userId)
Adds a managed instagram source by user
|
Instagram |
enableComments(boolean enabled)
set to true, if you want to receive comment interactions.
|
Instagram |
enableLikes(boolean enabled)
set to true, if you want to receive like interactions.
|
getAuthAsJSON, getParametersAsJSON, getResourcesAsJSON, hasAuth, hasParams, hasResources, newAuthParams, newResourceParams, setParametersField, typepublic Instagram(DataSiftConfig config)
public Instagram enableLikes(boolean enabled)
public Instagram enableComments(boolean enabled)
public Instagram byUser(String userId)
userId - the ID of the userpublic Instagram byTag(String tag, boolean exactMatch)
tag - the tag, e.g catexactMatch - true when a tag must be an exact match or false when the tag should match the instragram tag
search behaviourpublic Instagram byArea(float longitude, float lattitude)
public Instagram byArea(float longitude, float latitude, int distance)
longitude - the longitude value of the coordinates to uselatitude - the latitude value of the coordinate to usedistance - an optional distance which marks the radius around the given area,
defaults to 1000 and must be between 1 and 5000 metrespublic Instagram byLocation(float longitude, float latitude)
public Instagram byLocation(float longitude, float latitude, int distance)
longitude - the longitude value of the coordinates to uselatitude - the latitude value of the coordinate to usedistance - an optional distance which marks the radius around the given area,
defaults to 1000 and must be between 1 and 5000 metresbyArea(float, float, int)public Instagram byFoursquareLocation(String fourSquareLocation)
byLocation(float, float, int) but instead of using coordinates a foursquare location ID
is providedfourSquareLocation - a valid foursquare location ID e.g. 5XfVJepublic Instagram byPopularity()
protected Instagram addResource(Instagram.Type type, String value, float longitude, float lattitude, int distance, boolean exactMatch, String fourSquareLocation)
type - the type of resource, all other params are optional dependent upon what this value ispublic Instagram addOAutToken(String oAuthAccessToken, long expires, String name)
oAuthAccessToken - an oauth2 tokenname - a human friendly name for this auth tokenexpires - identity resource expiry date/time as a UTC timestamp, i.e. when the token expiresCopyright © 2015. All Rights Reserved.