Module: Vox::HTTP::Routes::Invite
- Defined in:
- lib/vox/http/routes/invite.rb
Overview
Mixin for invite routes.
Instance Method Summary collapse
-
#delete_invite(invite_code, reason: nil) ⇒ Hash<Symbol, Object>
Delete an invite by its code.
-
#get_invite(invite_code, with_counts: :undef) ⇒ Hash<Symbol, Object>
Get an invite by its code.
Instance Method Details
#delete_invite(invite_code, reason: nil) ⇒ Hash<Symbol, Object>
Delete an invite by its code.
30 31 32 33 |
# File 'lib/vox/http/routes/invite.rb', line 30 def delete_invite(invite_code, reason: nil) route = Route.new(:DELETE, '/invites/%{invite_code}', invite_code: invite_code) request(route, reason: reason) end |
#get_invite(invite_code, with_counts: :undef) ⇒ Hash<Symbol, Object>
Get an invite by its code.
19 20 21 22 |
# File 'lib/vox/http/routes/invite.rb', line 19 def get_invite(invite_code, with_counts: :undef) route = Route.new(:GET, '/invites/%{invite_code}', invite_code: invite_code) request(route, query: filter_undef({ with_counts: with_counts })) end |