forked from AY2324S2-CS2103T-T12-1/tp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request AY2324S2-CS2103T-T12-1#57 from tanguoyang/add-prof…
…ile-picture Add profile picture
- Loading branch information
Showing
19 changed files
with
246 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,7 +80,7 @@ Format: `help` | |
|
||
Adds a contact to the address book. | ||
|
||
Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS g/GITHUB_USERNAME [t/TAG] [ts/TECH_STACK]…` | ||
Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS g/GITHUB_USERNAME [t/TAG] pp/PROFILE_PICTURE [ts/TECH_STACK]…` | ||
|
||
<box type="tip" seamless> | ||
|
||
|
@@ -89,8 +89,8 @@ Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS g/GITHUB_USERNAME [t/TAG] [ | |
|
||
Examples: | ||
|
||
- `add n/John Doe p/98765432 e/[email protected] a/John street, block 123, #01-01 g/johnDoee` | ||
- `add n/Betsy Crowe t/friend e/[email protected] a/Newgate Prison p/1234567 g/betBetty t/criminal ts/Flutter` | ||
- `add n/John Doe p/98765432 e/[email protected] a/John street, block 123, #01-01 g/johnDoee pp/https://api-prod-minimal-v510.vercel.app/assets/images/avatar/avatar_1.jpg` | ||
- `add n/Betsy Crowe t/friend e/[email protected] a/Newgate Prison p/1234567 g/betBetty t/criminal ts/Flutter pp/https://api-prod-minimal-v510.vercel.app/assets/images/avatar/avatar_1.jpg` | ||
|
||
#### Listing all contacts : `list` | ||
|
||
|
@@ -102,7 +102,7 @@ Format: `list` | |
|
||
Edits an existing contact in the address book. | ||
|
||
Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [g/GITHUB_USERNAME] [t/TAG]… [ts/TECH_STACK]…` | ||
Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [g/GITHUB_USERNAME] [pp/PROFILE_PICTURE] [t/TAG]… [ts/TECH_STACK]…` | ||
|
||
- Edits the contact at the specified `INDEX`. The index refers to the index number shown in the displayed contact list. The index **must be a positive integer** 1, 2, 3, … | ||
- At least one of the optional fields must be provided. | ||
|
@@ -245,14 +245,14 @@ _Details coming soon ..._ | |
## Command summary | ||
|
||
|
||
| Action | Format, Examples | | ||
|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| **Add** | `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS g/GITHUB_USERNAME [t/TAG] [ts/TECH_STACK]…` <br> e.g., `add n/James Ho p/22224444 e/[email protected] a/123, Clementi Rd, 1234665 g/Jamesho123 t/friend t/colleague ts/Java ts/C++` | | ||
| **Clear** | `clear` | | ||
| **Delete** | `delete INDEX`<br> e.g., `delete 3` | | ||
| **Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/GITHUB_USERNAME] [t/TAG]… [ts/TECH_STACK]… `<br> e.g.,`edit 2 n/James Lee e/[email protected]` | | ||
| **Find** | `find KEYWORD [MORE_KEYWORDS]`<br> e.g., `find James Jake` | | ||
| **Find by Tags** | `find-tags KEYWORD [MORE_KEYWORDS]`<br> e.g., `find-tags School Work` | | ||
| **Find Tech Stack** | `find-ts KEYWORD [MORE_KEYWORDS]`<br> e.g., `find-ts Java Python` | | ||
| **List** | `list` | | ||
| **Help** | `help` | | ||
| Action | Format, Examples | | ||
|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| **Add** | `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS g/GITHUB_USERNAME pp/PROFILE_PICTURE [t/TAG] [ts/TECH_STACK]…` <br> e.g., `add n/James Ho p/22224444 e/[email protected] a/123, Clementi Rd, 1234665 g/Jamesho123 pp/https://api-prod-minimal-v510.vercel.app/assets/images/avatar/avatar_1.jpg t/friend t/colleague ts/Java ts/C++` | | ||
| **Clear** | `clear` | | ||
| **Delete** | `delete INDEX`<br> e.g., `delete 3` | | ||
| **Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/GITHUB_USERNAME] [pp/PROFILE_PICTURE] [t/TAG]… [ts/TECH_STACK]… `<br> e.g.,`edit 2 n/James Lee e/[email protected]` | | ||
| **Find** | `find KEYWORD [MORE_KEYWORDS]`<br> e.g., `find James Jake` | | ||
| **Find by Tags** | `find-tags KEYWORD [MORE_KEYWORDS]`<br> e.g., `find-tags School Work` | | ||
| **Find Tech Stack** | `find-ts KEYWORD [MORE_KEYWORDS]`<br> e.g., `find-ts Java Python` | | ||
| **List** | `list` | | ||
| **Help** | `help` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
package seedu.address.logic.commands; | ||
|
||
import static java.util.Objects.requireNonNull; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_GITHUB_USERNAME; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_TECH_STACK; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_GITHUB_USERNAME; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_PROFILE_PICTURE; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE; | ||
|
||
import seedu.address.commons.util.ToStringBuilder; | ||
import seedu.address.logic.Messages; | ||
import seedu.address.logic.commands.exceptions.CommandException; | ||
import seedu.address.model.Model; | ||
import seedu.address.model.contact.Contact; | ||
import seedu.address.model.contact.ProfilePicture; | ||
|
||
/** | ||
* Adds a contact to the address book. | ||
|
@@ -28,7 +30,8 @@ public class AddCommand extends Command { | |
+ PREFIX_PHONE + "PHONE " | ||
+ PREFIX_EMAIL + "EMAIL " | ||
+ PREFIX_ADDRESS + "ADDRESS " | ||
+ PREFIX_GITHUB_USERNAME + "GITHUB USERNAME " | ||
+ PREFIX_GITHUB_USERNAME + "GITHUB_USERNAME " | ||
+ PREFIX_PROFILE_PICTURE + "PROFILE_PICTURE " | ||
+ "[" + PREFIX_TECH_STACK + "TECH STACK]...\n" | ||
+ "[" + PREFIX_TAG + "TAG]...\n" | ||
+ "Example: " + COMMAND_WORD + " " | ||
|
@@ -37,6 +40,7 @@ public class AddCommand extends Command { | |
+ PREFIX_EMAIL + "[email protected] " | ||
+ PREFIX_ADDRESS + "311, Clementi Ave 2, #02-25 " | ||
+ PREFIX_GITHUB_USERNAME + "johndoee123 " | ||
+ PREFIX_PROFILE_PICTURE + ProfilePicture.DEFAULT_URL | ||
+ PREFIX_TECH_STACK + "Java " | ||
+ PREFIX_TECH_STACK + "Python " | ||
+ PREFIX_TAG + "friends " | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.