Class: Veye::User::Me

Inherits:
BaseExecutor show all
Defined in:
lib/veye/user/me.rb

Overview

Me class includes commands to manage and view authorized user profile and favorites.

Class Method Summary collapse

Methods inherited from BaseExecutor

catch_request_error, filter_dependencies, get_formatter, process_dependencies, show_bulk_dependencies, show_dependencies, show_message, show_results, sort_dependencies_by_upgrade_complexity, valid_response?

Methods included from FormatHelpers

#format_exists?, #formats_attached?, #supported_format?

Class Method Details

.get_favorites(api_key, options) ⇒ Object



30
31
32
33
34
35
36
37
# File 'lib/veye/user/me.rb', line 30

def self.get_favorites(api_key, options)
  results = Veye::API::User.get_favorites(api_key, options[:page])

  if valid_response?(results, 'Failed to read favorites.')
    paging = results.data['paging']
    show_results(@favorite_formats, results.data, options, paging)
  end
end

.get_profile(api_key, options) ⇒ Object



23
24
25
26
27
28
# File 'lib/veye/user/me.rb', line 23

def self.get_profile(api_key, options)
  results = Veye::API::User.get_profile(api_key)
  if valid_response?(results, 'Failed to read profile.')
    show_results(@profile_formats, results.data, options)
  end
end