Skip to content

Commit

Permalink
Tiny update for GetUserMedia... URI #428
Browse files Browse the repository at this point in the history
  • Loading branch information
ramtinak committed Oct 7, 2022
1 parent 6470e08 commit a957816
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/InstagramApiSharp/Helpers/UriCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1675,9 +1675,11 @@ public static Uri GetUserMediaListUri(long userPk, string nextId = "")
{
if (!Uri.TryCreate(BaseInstagramUri, string.Format(InstaApiConstants.USEREFEED, userPk), out var instaUri))
throw new Exception("Cant create URI for user media retrieval");
return !string.IsNullOrEmpty(nextId)
? new UriBuilder(instaUri) { Query = $"max_id={nextId}" }.Uri
: instaUri;
return instaUri
.AddQueryParameter("exclude_comment", "true")
.AddQueryParameter("max_id", nextId)
.AddQueryParameter("only_fetch_first_carousel_media", "false")
.AddQueryParameter("count", "9");
}

public static Uri GetArchivedMediaFeedsListUri(string nextId = "")
Expand Down

0 comments on commit a957816

Please sign in to comment.