Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Commit

Permalink
added showFbLinkOnProfile in edit profile request (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
Taz03 authored Nov 7, 2023
1 parent 6583a34 commit b246d08
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public final class EditProfileTest {

@Test
public void editProfileTest() throws Exception {
EditProfileRequest request = new EditProfileRequest("JIA", "JIA test bio [edit profile request]", user.username(), user.phoneNumber(), user.email(), "");
EditProfileRequest request = new EditProfileRequest(user.username(), "JIA", "JIA test bio [edit profile request]", "", false, user.phoneNumber(), user.email());
UserResponse response = client.sendRequest(request).get();

assertEquals("ok", response.getStatus());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,26 @@
public final class EditProfileRequest extends InstagramPostRequest<UserResponse> {
/**
* Creates an Instagram edit profile request.
* <p>
* At least one connected contact is necessary to edit profile data.
*
* @param name New display name to set
* @param biography New biography to set
* @param username New username to set
* @param phoneNumber Current phone number
* @param email Current email
* @param externalUrl New external url to set
* @param username New username to set
* @param name New display name to set
* @param biography New biography to set
* @param externalUrl New external url to set
* @param showFbLinkOnProfile To show the connected Facebook account on the profile
* @param phoneNumber Current phone number
* @param email Current email
*/
public EditProfileRequest(String name, String biography, String username, String phoneNumber, String email, String externalUrl) {
public EditProfileRequest(String username, String name, String biography, String externalUrl, boolean showFbLinkOnProfile, String phoneNumber, String email) {
super(UserResponse.class, "/api/v1/accounts/edit_profile/", null, Map.of(
"username", username,
"first_name", name,
"biography", biography,
"username", username,
"external_url", externalUrl,
"show_fb_link_on_profile", showFbLinkOnProfile,
"phone_number", phoneNumber,
"email", email,
"external_url", externalUrl
"email", email
));
}
}

0 comments on commit b246d08

Please sign in to comment.