Class: Weekdone::Cli::Tag

Inherits:
Thor
  • Object
show all
Includes:
Weekdone::Cli
Defined in:
lib/weekdone/cli/command_tag.rb

Constant Summary

Constants included from Weekdone::Cli

VERSION

Instance Method Summary collapse

Methods included from Weekdone::Cli

#build_client

Instance Method Details

#getObject



24
25
26
27
28
29
30
# File 'lib/weekdone/cli/command_tag.rb', line 24

def get
  client = build_client

  tag = client.getSingleTag(options[:tagid])
  Credential.write_credential(client.token_hash)
  Output.format(tag, format: :json)
end

#listObject



14
15
16
17
18
19
20
# File 'lib/weekdone/cli/command_tag.rb', line 14

def list
  client = build_client

  tags = client.getAllTags
  Credential.write_credential(client.token_hash)
  Output.format(tags, format: :json)
end