You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

replay 638B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env ruby
  2. require 'cross-post'
  3. require 'awesome_print'
  4. class Twitter::REST::Client
  5. def update(*args, **kargs)
  6. ap args
  7. ap kargs
  8. 0
  9. end
  10. end
  11. config = CrossPost::Config.new
  12. url = config['mastodon.url']
  13. token = config['mastodon.token']
  14. client = ::Mastodon::REST::Client.new base_url: url, bearer_token: token
  15. status = client.status 439490
  16. ap status
  17. twitter = CrossPost::Twitter.new config
  18. twitter.post_status status
  19. # media = '/home/aeris/Images/tux-debian.png'
  20. # media = client.upload_media media
  21. # status = client.create_status 'Test', nil, [media.id]
  22. # ap status
  23. # sleep 5
  24. # client.destroy_status status.id