Created
May 22, 2024 21:53
-
-
Save mackuba/bcbba202b3979c15e68546d295865280 to your computer and use it in GitHub Desktop.
Find Joe's follows who opted in to Bridgy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
## gem install minisky | |
require 'minisky' | |
sky = Minisky.new('api.bsky.app', nil, progress: '.') | |
joe_follows = sky.fetch_all('app.bsky.graph.getFollows', { actor: 'mergesort.me', limit: 100 }, field: 'follows') | |
ap_followers = sky.fetch_all('app.bsky.graph.getFollowers', { actor: 'ap.brid.gy', limit: 100 }, field: 'followers') | |
list = joe_follows.map { |x| [x['did'], x['handle']] } & ap_followers.map { |x| [x['did'], x['handle']] } | |
list.each do |did, handle| | |
puts "#{did} (#{handle})" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment