Module: Mastodon::REST::DomainBlocks
Instance Method Summary collapse
-
#block_domain(domain) ⇒ Object
Block a domain.
-
#domain_blocks(options = {}) ⇒ Mastodon::Collection<String>
Get a list of blocked domains.
-
#unblock_domain(domain) ⇒ Object
Unblock a domain.
Methods included from Utils
#array_param, #perform_request, #perform_request_with_collection, #perform_request_with_object
Instance Method Details
#block_domain(domain) ⇒ Object
Block a domain
21 22 23 |
# File 'lib/mastodon/rest/domain_blocks.rb', line 21 def block_domain(domain) perform_request(:post, '/api/v1/domain_blocks', domain: domain) end |
#domain_blocks(options = {}) ⇒ Mastodon::Collection<String>
Get a list of blocked domains
15 16 17 |
# File 'lib/mastodon/rest/domain_blocks.rb', line 15 def domain_blocks( = {}) perform_request_with_collection('/api/v1/domain_blocks', , String) end |
#unblock_domain(domain) ⇒ Object
Unblock a domain
27 28 29 |
# File 'lib/mastodon/rest/domain_blocks.rb', line 27 def unblock_domain(domain) perform_request(:delete, '/api/v1/domain_blocks', domain: domain) end |