Module: Croudia::Rest::Blocks
- Included in:
- Client
- Defined in:
- lib/croudia/rest/blocks.rb
Instance Method Summary collapse
-
#block(params = {}) ⇒ Croudia::Object::User
Blocks the specified user from following the authenticating user.
-
#block_ids(params = {}) ⇒ Croudia::Object::IDs
Returns a collection of user ids that the authenticating user is blocking.
-
#blocks(params = {}) ⇒ Croudia::Object::List
Returns a collection of user objects that the authenticating user is blocking.
-
#unblock(params = {}) ⇒ Croudia::Object::User
Un-blocks the user specified in the ID parameter for the authenticating user.
Instance Method Details
#block(params = {}) ⇒ Croudia::Object::User
Blocks the specified user from following the authenticating user.
16 17 18 19 |
# File 'lib/croudia/rest/blocks.rb', line 16 def block(params = {}) response = post('blocks/create.json', params) Croudia::Object::User.new(response) end |
#block_ids(params = {}) ⇒ Croudia::Object::IDs
Returns a collection of user ids that the authenticating user is blocking.
50 51 52 53 |
# File 'lib/croudia/rest/blocks.rb', line 50 def block_ids(params = {}) response = get('blocks/ids.json', params) Croudia::Object::IDs.new(response) end |
#blocks(params = {}) ⇒ Croudia::Object::List
Returns a collection of user objects that the authenticating user is blocking.
39 40 41 42 |
# File 'lib/croudia/rest/blocks.rb', line 39 def blocks(params = {}) response = get('blocks/list.json', params) Croudia::Object::List.new(response) end |
#unblock(params = {}) ⇒ Croudia::Object::User
Un-blocks the user specified in the ID parameter for the authenticating user.
28 29 30 31 |
# File 'lib/croudia/rest/blocks.rb', line 28 def unblock(params = {}) response = post('blocks/destroy.json', params) Croudia::Object::User.new(response) end |