"descriptions,... Can be : en-EN, en-US, tr-TR, fr-FR ... (default : en-EN)").setDefault(FeatureControl.SUPPRESS);
parser.addArgument("-a", "--host").nargs("?").help("Proxy host").setDefault(FeatureControl.SUPPRESS);
parser.addArgument("-l", "--port").type(Integer.class).nargs("?").help("Proxy port")
.setDefault(FeatureControl.SUPPRESS);
Subparsers subparsers = parser.addSubparsers().description("Command to be executed.");
/* =================Download Arguments============== */
Subparser downloadParser = subparsers.addParser("download", true).description("download file(s)!")
.setDefault("command", COMMAND.DOWNLOAD);
downloadParser.addArgument("packagename").nargs("+").help("applications to download");
/* =================Check-In Arguments============== */
subparsers.addParser("checkin", true).description("checkin section!").setDefault("command", COMMAND.CHECKIN);
/* =================List Arguments============== */
Subparser listParser = subparsers.addParser("list", true)
.description("Lists sub-categories and applications within them!").setDefault("command", COMMAND.LIST);
listParser.addArgument("category").required(true).help("defines category");
listParser.addArgument("-s", "--subcategory").required(false).help("defines sub-category");
listParser.addArgument("-o", "--offset").type(Integer.class).required(false)
.help("offset to define where list begins");
listParser.addArgument("-n", "--number").type(Integer.class).required(false)
.help("how many app will be listed");
/* =================Categories Arguments============== */
Subparser categoriesParser = subparsers.addParser("categories", true)
.description("list categories for browse section").setDefault("command", COMMAND.CATEGORIES);
/* =================Search Arguments============== */
Subparser searchParser = subparsers.addParser("search", true).description("search for query!")
.setDefault("command", COMMAND.SEARCH);
searchParser.addArgument("query").help("query to be searched");
searchParser.addArgument("-o", "--offset").type(Integer.class).required(false)
.help("offset to define where list begins");
searchParser.addArgument("-n", "--number").type(Integer.class).required(false)
.help("how many app will be listed");
/* =================Permissions Arguments============== */
Subparser permissionsParser = subparsers.addParser("permissions", true)
.description("list permissions of given application").setDefault("command", COMMAND.PERMISSIONS);
permissionsParser.addArgument("package").nargs("+").help("applications whose permissions to be listed");
/* =================Reviews Arguments============== */
Subparser reviewsParser = subparsers.addParser("reviews", true)
.description("lists reviews of given application").setDefault("command", COMMAND.REVIEWS);
reviewsParser.addArgument("package").help("application whose reviews to be listed");
reviewsParser.addArgument("-s", "--sort").choices(new ReviewSortChoice()).type(new ReviewSort())
.required(false).help("sorting type").setDefault(REVIEW_SORT.HELPFUL);
reviewsParser.addArgument("-o", "--offset").type(Integer.class).required(false)
.help("offset to define where list begins");
reviewsParser.addArgument("-n", "--number").type(Integer.class).required(false)
.help("how many reviews will be listed");
/* =================Recommendation Arguments============== */
Subparser recommendationParser = subparsers.addParser("recommendations", true)
.description("lists recommended apps of given application").setDefault("command", COMMAND.RECOMMENDATIONS);
recommendationParser.addArgument("package").help("application whose recommendations to be listed");
recommendationParser.addArgument("-t", "--type").choices(new ReleationChoice()).type(new RecommendationType())
.required(false).help("releations type").setDefault(RECOMMENDATION_TYPE.ALSO_INSTALLED);
recommendationParser.addArgument("-o", "--offset").type(Integer.class).required(false)
.help("offset to define where list begins");
recommendationParser.addArgument("-n", "--number").type(Integer.class).required(false)
.help("how many recommendations will be listed");
/* =================Register Arguments============== */
subparsers.addParser("register", true).description("registers device so that can be seen from web!")
.setDefault("command", COMMAND.REGISTER);
/* =================UseGCM Arguments============== */
subparsers.addParser("usegcm", true).description("listens GCM(GoogleCloudMessaging) for download notification and downloads them!")
.setDefault("command", COMMAND.USEGCM);
}