lib/ayadn/app.rb in ayadn-1.7.0 vs lib/ayadn/app.rb in ayadn-1.7.1
- old
+ new
@@ -1,11 +1,11 @@
# encoding: utf-8
module Ayadn
class App < Thor
package_name "Ayadn"
- %w{action stream api search descriptions endpoints cnx view workers settings post status extend databases fileops logs pinboard set alias errors blacklist scroll authorize switch mark nicerank debug check nowplaying nowwatching tvshow annotations}.each { |r| require_relative "#{r}" }
+ %w{action stream api search descriptions endpoints cnx view workers settings post status extend databases fileops logs pinboard set alias errors blacklist scroll authorize switch mark nicerank debug check nowplaying nowwatching tvshow annotations profile}.each { |r| require_relative "#{r}" }
##
# These methods are intended to be called from the CLI.
desc "timeline", "Show your App.net timeline, aka the Unified Stream (-tl)"
@@ -230,10 +230,25 @@
option :raw, aliases: "-x", type: :boolean, desc: Descriptions.options_raw
def userinfo(*username)
Action.new.userinfo(username, options)
end
+ desc "userupdate", "Update your user profile informations (-U)"
+ map "-U" => :userupdate
+ long_desc Descriptions.userupdate
+ option :delete, aliases: "-D", type: :boolean, desc: "Delete this content from your profile"
+ option :bio, type: :boolean, desc: "Update your user bio"
+ option :name, type: :boolean, desc: "Update your user full name"
+ option :twitter, type: :boolean, desc: "Update your Twitter username"
+ option :blog, type: :boolean, desc: "Update your blog url"
+ option :web, type: :boolean, desc: "Update your web url"
+ option :avatar, type: :array, desc: "Update your avatar picture"
+ option :cover, type: :array, desc: "Update your cover picture"
+ def userupdate
+ Action.new.userupdate(options)
+ end
+
desc "postinfo POST", "Show detailed informations about a post (-pi)"
map "-pi" => :postinfo
long_desc Descriptions.postinfo
option :raw, aliases: "-x", type: :boolean, desc: Descriptions.options_raw
option :force, aliases: "-f", type: :boolean, desc: Descriptions.options_force
@@ -336,11 +351,13 @@
end
desc "channels", "List your active channels (-ch)"
map "-ch" => :channels
long_desc Descriptions.channels
+ option :id, aliases: "-i", type: :array, desc: "Retrieve only the specified channel(s)"
+ option :raw, aliases: "-x", type: :boolean, desc: Descriptions.options_raw
def channels
- Action.new.channels
+ Action.new.channels(options)
end
desc "messages CHANNEL", "Show messages in a CHANNEL (-ms)"
map "-ms" => :messages
long_desc Descriptions.messages