Class: Rocksky::Resources::Graph
- Defined in:
- lib/rocksky/resources/graph.rb
Overview
‘app.rocksky.graph.*` endpoints.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#follow_account(account:) ⇒ Object
Follow an account.
-
#get_followers(actor:, limit: nil, dids: nil, cursor: nil) ⇒ Object
Followers of an actor.
-
#get_follows(actor:, limit: nil, dids: nil, cursor: nil) ⇒ Object
Accounts an actor follows.
-
#get_known_followers(actor:, limit: nil, cursor: nil) ⇒ Object
Followers of an actor that the viewer also knows.
-
#unfollow_account(account:) ⇒ Object
Unfollow an account.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Rocksky::Resources::Base
Instance Method Details
#follow_account(account:) ⇒ Object
Follow an account. ‘account` is a DID or handle.
6 7 8 |
# File 'lib/rocksky/resources/graph.rb', line 6 def follow_account(account:) procedure("app.rocksky.graph.followAccount", params: { account: account }) end |
#get_followers(actor:, limit: nil, dids: nil, cursor: nil) ⇒ Object
Followers of an actor. ‘dids` may be a list; it will be CSV-encoded.
16 17 18 19 |
# File 'lib/rocksky/resources/graph.rb', line 16 def get_followers(actor:, limit: nil, dids: nil, cursor: nil) query("app.rocksky.graph.getFollowers", actor: actor, limit: limit, dids: dids, cursor: cursor) end |
#get_follows(actor:, limit: nil, dids: nil, cursor: nil) ⇒ Object
Accounts an actor follows.
22 23 24 25 |
# File 'lib/rocksky/resources/graph.rb', line 22 def get_follows(actor:, limit: nil, dids: nil, cursor: nil) query("app.rocksky.graph.getFollows", actor: actor, limit: limit, dids: dids, cursor: cursor) end |
#get_known_followers(actor:, limit: nil, cursor: nil) ⇒ Object
Followers of an actor that the viewer also knows.
28 29 30 31 |
# File 'lib/rocksky/resources/graph.rb', line 28 def get_known_followers(actor:, limit: nil, cursor: nil) query("app.rocksky.graph.getKnownFollowers", actor: actor, limit: limit, cursor: cursor) end |
#unfollow_account(account:) ⇒ Object
Unfollow an account.
11 12 13 |
# File 'lib/rocksky/resources/graph.rb', line 11 def unfollow_account(account:) procedure("app.rocksky.graph.unfollowAccount", params: { account: account }) end |