lib/github_cli/apis/label.rb in github_cli-0.2.1 vs lib/github_cli/apis/label.rb in github_cli-0.3.0

- old
+ new

@@ -3,47 +3,69 @@ module GithubCLI class Label < API class << self - def all(params) - github_api.issues.labels params + def all(params, format) + output format do + github_api.issues.labels params + end end - def get(user, repo, name, params) - github_api.issues.get_label user, repo, name, params + def get(user, repo, name, params, format) + output format do + github_api.issues.get_label user, repo, name, params + end end - def create(user, repo, params) - github_api.issues.create_label user, repo, params + def create(user, repo, params, format) + output format do + github_api.issues.create_label user, repo, params + end end - def update(user, repo, name, params) - github_api.issues.update_label user, repo, params + def update(user, repo, name, params, format) + output format do + github_api.issues.update_label user, repo, params + end end - def delete(user, repo, name, params) - github_api.issues.delete_label user, repo, name, params + def delete(user, repo, name, params, format) + output format do + github_api.issues.delete_label user, repo, name, params + end end - def issue(user, repo, number, params) - github_api.issues.labels_for user, repo, number, params + def issue(user, repo, number, params, format) + output format do + github_api.issues.labels_for user, repo, number, params + end end def add(user, repo, number, *args) - github_api.issues.add_labels user, repo, args + # TODO extract params from args + output :table do + github_api.issues.add_labels user, repo, args + end end - def remove(user, repo, number, name=nil, params) - github_api.issues.remove_label user, repo, number, name, params + def remove(user, repo, number, name=nil, params, format) + output format do + github_api.issues.remove_label user, repo, number, name, params + end end def replace(user, repo, number, *args) - github_api.issues.replace_labels user, repo, number, args + # TODO extract params from args + output :table do + github_api.issues.replace_labels user, repo, number, args + end end - def milestone(user, repo, number, params) - gitub_api.issues.milestone_labels user, repo, number, params + def milestone(user, repo, number, params, format) + output format do + gitub_api.issues.milestone_labels user, repo, number, params + end end end end # Label end # GithubCLI