Skip to content

Commit dd5c60d

Browse files
authored
Fixed javadocs comments
1 parent a0e4d6b commit dd5c60d

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

EasyInsta/src/main/java/com/xcoder/easyinsta/Instagram.java

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
import com.github.instagram4j.instagram4j.models.user.Profile;
55
import com.github.instagram4j.instagram4j.models.user.User;
66
import com.github.instagram4j.instagram4j.requests.direct.DirectThreadsBroadcastRequest;
7+
import com.github.instagram4j.instagram4j.requests.feed.FeedUserStoryRequest;
78
import com.github.instagram4j.instagram4j.requests.friendships.FriendshipsActionRequest;
89
import com.github.instagram4j.instagram4j.requests.friendships.FriendshipsPendingRequest;
910
import com.github.instagram4j.instagram4j.responses.IGResponse;
1011
import com.github.instagram4j.instagram4j.responses.accounts.LoginResponse;
12+
import com.github.instagram4j.instagram4j.responses.feed.FeedUserStoryResponse;
1113
import com.github.instagram4j.instagram4j.responses.feed.FeedUsersResponse;
1214
import com.github.instagram4j.instagram4j.responses.media.MediaResponse;
1315
import com.github.instagram4j.instagram4j.utils.IGChallengeUtils;
@@ -256,7 +258,7 @@ public Task<String> removeFollower(@NotNull String username) {
256258
* @param caption Caption for the post
257259
* @return A {@link Task} holding response of the request.
258260
*/
259-
public Task<String> postPhoto(@NotNull File photo, @Nullable String caption) {
261+
public Task<String> postPhoto(@NotNull File photo, String caption) {
260262
if (photo.getName().endsWith(".mp4"))
261263
throw new InstagramException("Uploading or sending video is not currently supported",Reasons.UNSUPPORTED_FILE_FORMAT);
262264

@@ -405,7 +407,7 @@ public Void apply(Throwable throwable) {
405407
* @param username The username of the account.
406408
* @return A {@link Task} holding bio of the user.
407409
*/
408-
public @Nullable Task<String> getBio(@NotNull String username) {
410+
public Task<String> getBio(@NotNull String username) {
409411
Object object = utils.getProfileMetadata(client.actions().users().findByUsername(username),"bio");
410412
Task<String> task = new Task<>();
411413

@@ -421,10 +423,9 @@ public Void apply(Throwable throwable) {
421423
/**
422424
* Gets the profile photo link of the account associated with the username provided.
423425
* @param username The username of the account.
424-
* @param callback Callback that shows the success or failure of the request. This is optional (Nullable)
425426
* @return A {@link Task} holding profile picture of the user.
426427
*/
427-
public @Nullable Task<String> getProfilePicUrl(@NotNull String username) {
428+
public Task<String> getProfilePicUrl(@NotNull String username) {
428429
Object object = utils.getProfileMetadata(client.actions().users().findByUsername(username),"dp");
429430
Task<String> task = new Task<>();
430431

@@ -476,7 +477,7 @@ public Task<Integer> getFollowingsCount(@NotNull String username) {
476477
/**
477478
* Gets the post count of the account associated with the username provided.
478479
* @param username The username of the account.
479-
* @param callback Callback that shows the success or failure of the request. This is optional (Nullable)
480+
480481
* @return A {@link Task} holding number of posts of the user.
481482
*/
482483
public Task<Integer> getPostCount(@NotNull String username) {
@@ -490,9 +491,3 @@ public Task<Integer> getPostCount(@NotNull String username) {
490491

491492
return task;
492493
}
493-
494-
public static void main(String[] args) {
495-
Instagram instagram = null;
496-
instagram.getProfilePicUrl("username",);
497-
}
498-
}

0 commit comments

Comments
 (0)