|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sola.instagram.InstagramSession
public class InstagramSession
Constains a methods used to interact with the API.
Constructor Summary | |
---|---|
InstagramSession()
|
|
InstagramSession(AccessToken accessToken)
Creates a new Instagram session |
Method Summary | |
---|---|
java.util.ArrayList<Media> |
getFeed(int pageNumber)
Gets the recent media in the current user's feed. |
java.util.List<User> |
getFollowers(int userId,
int pageNumber)
|
java.util.List<User> |
getFollowRequests()
|
java.util.List<User> |
getFollows(int userId,
int pageNumber)
Gets a list of users that the user, whose id is passed, follows. |
java.util.List<Media> |
getLikedMedia(int pageNumber)
Gets the recent media that the current user has liked. |
Location |
getLocation(int locationId)
|
Media |
getMedia(java.lang.String mediaId)
Gets the media with the id passed. |
java.util.List<Media> |
getPopularMedia()
Finds and returns the most popular media on instagram. |
java.util.List<Media> |
getRecentMediaForTag(java.lang.String tagName,
int pageNumber)
|
java.util.List<Media> |
getRecentMediaFromLocation(int locationId,
int pageNumber)
|
java.util.List<Media> |
getRecentPublishedMedia(int userId,
int pageNumber)
Finds and returns the most recent media published by the user with the id passed. |
Relationship |
getRelationshipWith(int userId)
|
Tag |
getTag(java.lang.String tagName)
|
User |
getUserById(int userId)
Finds and returns a user with the given id. |
boolean |
likeMedia(java.lang.String mediaId)
|
boolean |
modifyRelationship(int userId,
Relationship.Action action)
|
Comment |
postComment(java.lang.String mediaId,
java.lang.String text)
|
boolean |
removeComment(java.lang.String mediaId,
java.lang.String commentId)
|
boolean |
removeMediaLike(java.lang.String mediaId)
|
java.util.List<Media> |
searchMedia(java.lang.Object latitude,
java.lang.Object longitude,
java.lang.Object minTimestamp,
java.lang.Object maxTimestamp,
java.lang.Object distance)
Searches for media by location and creation time. |
java.util.List<Tag> |
searchTags(java.lang.String tagName)
|
java.util.List<User> |
searchUsersByName(java.lang.String name)
Searches for users by name. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InstagramSession()
public InstagramSession(AccessToken accessToken)
accessToken
- the session's access tokenMethod Detail |
---|
public User getUserById(int userId) throws InstagramException
userId
- id of the user
InstagramException
public java.util.List<Media> getRecentPublishedMedia(int userId, int pageNumber) throws InstagramException
userId
- id of the userpageNumber
- the required result page. Must be > 0.
InstagramException
public java.util.ArrayList<Media> getFeed(int pageNumber) throws InstagramException
pageNumber
- the required result page. Must be > 0.
InstagramException
public java.util.List<Media> getLikedMedia(int pageNumber) throws InstagramException
pageNumber
- the required result page. Must be > 0.
InstagramException
public Media getMedia(java.lang.String mediaId) throws InstagramException
mediaId
- the id of the media to be returned
InstagramException
public java.util.List<Media> searchMedia(java.lang.Object latitude, java.lang.Object longitude, java.lang.Object minTimestamp, java.lang.Object maxTimestamp, java.lang.Object distance) throws InstagramException
latitude
- latitude of locationlongitude
- longitude of locationminTimestamp
- the min timestamp of media to be returned. Can be null if
needed.maxTimestamp
- the max timestamp of media to be returned. Can be null if
needed.distance
- the of the location. Can be null if needed.
InstagramException
public java.util.List<Media> getPopularMedia() throws InstagramException
InstagramException
public java.util.List<User> searchUsersByName(java.lang.String name) throws InstagramException
name
- the full name or username of the user to be returned
InstagramException
public java.util.List<User> getFollows(int userId, int pageNumber) throws InstagramException
userId
- id of the user whose follow list is to be returnedpageNumber
- the required result page. Must be > 0.
InstagramException
public java.util.List<User> getFollowers(int userId, int pageNumber) throws InstagramException
InstagramException
public java.util.List<User> getFollowRequests() throws InstagramException
InstagramException
public Relationship getRelationshipWith(int userId) throws InstagramException
InstagramException
public boolean modifyRelationship(int userId, Relationship.Action action) throws InstagramException
InstagramException
public Comment postComment(java.lang.String mediaId, java.lang.String text) throws InstagramException
InstagramException
public boolean removeComment(java.lang.String mediaId, java.lang.String commentId) throws InstagramException
InstagramException
public boolean likeMedia(java.lang.String mediaId) throws InstagramException
InstagramException
public boolean removeMediaLike(java.lang.String mediaId) throws InstagramException
InstagramException
public Tag getTag(java.lang.String tagName) throws InstagramException
InstagramException
public java.util.List<Media> getRecentMediaForTag(java.lang.String tagName, int pageNumber) throws InstagramException
InstagramException
public java.util.List<Tag> searchTags(java.lang.String tagName) throws InstagramException
InstagramException
public Location getLocation(int locationId) throws InstagramException
InstagramException
public java.util.List<Media> getRecentMediaFromLocation(int locationId, int pageNumber) throws InstagramException
InstagramException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |