Class: Slackup::Stars

Inherits:
Slackup show all
Defined in:
lib/slackup/stars.rb

Constant Summary

Constants inherited from Slackup

Error, RUN_ROOT, SEMAPHORE, VERSION

Instance Attribute Summary

Attributes inherited from Slackup

#client, #name

Instance Method Summary collapse

Methods inherited from Slackup

backup, configure_client, #execute, #initialize, run_root, team_config, team_config_file

Constructor Details

This class inherits a constructor from Slackup

Instance Method Details

#listObject Also known as: stars



3
4
5
# File 'lib/slackup/stars.rb', line 3

def list
  client.stars_list(count: "1000", page: "1")
end

#write!Object



8
9
10
11
12
13
14
# File 'lib/slackup/stars.rb', line 8

def write!
  with_messages "stars", list do |messages|
    File.open(backup_filename("stars"), "w")  do |f|
      f.write(serialize(messages))
    end
  end
end