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.
28 lines
638 B
28 lines
638 B
#!/usr/bin/env ruby
|
|
require 'cross-post'
|
|
require 'awesome_print'
|
|
|
|
class Twitter::REST::Client
|
|
def update(*args, **kargs)
|
|
ap args
|
|
ap kargs
|
|
0
|
|
end
|
|
end
|
|
|
|
config = CrossPost::Config.new
|
|
url = config['mastodon.url']
|
|
token = config['mastodon.token']
|
|
client = ::Mastodon::REST::Client.new base_url: url, bearer_token: token
|
|
status = client.status 439490
|
|
ap status
|
|
|
|
twitter = CrossPost::Twitter.new config
|
|
twitter.post_status status
|
|
|
|
# media = '/home/aeris/Images/tux-debian.png'
|
|
# media = client.upload_media media
|
|
# status = client.create_status 'Test', nil, [media.id]
|
|
# ap status
|
|
# sleep 5
|
|
# client.destroy_status status.id
|
|
|