348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
|
# File 'lib/twterm/rest_client.rb', line 348
def (status)
send_request do
Twitter::REST::Request.new(rest_client, :post, "/1.1/statuses/unretweet/#{status.id}.json").perform
end
.then do |json, *_|
json[:retweet_count] -= 1
json[:retweeted] = false
Twitter::Tweet.new(json)
end
.then do ||
status = status_repository.create()
publish(Event::Message::Success.new('Successfully unretweeted: @%s "%s"' % [
.user.screen_name, status.text
]))
status
end
end
|