Module: Google::Apps::Chat::V1::ChatService::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/apps/chat/v1/chat_service/paths.rb
Overview
Path helper methods for the ChatService API.
Instance Method Summary collapse
-
#attachment_path(space:, message:, attachment:) ⇒ ::String
Create a fully-qualified Attachment resource string.
-
#membership_path(space:, member:) ⇒ ::String
Create a fully-qualified Membership resource string.
-
#message_path(space:, message:) ⇒ ::String
Create a fully-qualified Message resource string.
-
#quoted_message_metadata_path(space:, message:, quoted_message_metadata:) ⇒ ::String
Create a fully-qualified QuotedMessageMetadata resource string.
-
#reaction_path(space:, message:, reaction:) ⇒ ::String
Create a fully-qualified Reaction resource string.
-
#space_event_path(space:, space_event:) ⇒ ::String
Create a fully-qualified SpaceEvent resource string.
-
#space_path(space:) ⇒ ::String
Create a fully-qualified Space resource string.
-
#space_read_state_path(user:, space:) ⇒ ::String
Create a fully-qualified SpaceReadState resource string.
-
#thread_path(space:, thread:) ⇒ ::String
Create a fully-qualified Thread resource string.
-
#thread_read_state_path(user:, space:, thread:) ⇒ ::String
Create a fully-qualified ThreadReadState resource string.
Instance Method Details
#attachment_path(space:, message:, attachment:) ⇒ ::String
Create a fully-qualified Attachment resource string.
The resource will be in the following format:
spaces/{space}/messages/{message}/attachments/{attachment}
39 40 41 42 43 44 |
# File 'lib/google/apps/chat/v1/chat_service/paths.rb', line 39 def space:, message:, attachment: raise ::ArgumentError, "space cannot contain /" if space.to_s.include? "/" raise ::ArgumentError, "message cannot contain /" if .to_s.include? "/" "spaces/#{space}/messages/#{}/attachments/#{}" end |
#membership_path(space:, member:) ⇒ ::String
Create a fully-qualified Membership resource string.
The resource will be in the following format:
spaces/{space}/members/{member}
57 58 59 60 61 |
# File 'lib/google/apps/chat/v1/chat_service/paths.rb', line 57 def membership_path space:, member: raise ::ArgumentError, "space cannot contain /" if space.to_s.include? "/" "spaces/#{space}/members/#{member}" end |
#message_path(space:, message:) ⇒ ::String
Create a fully-qualified Message resource string.
The resource will be in the following format:
spaces/{space}/messages/{message}
74 75 76 77 78 |
# File 'lib/google/apps/chat/v1/chat_service/paths.rb', line 74 def space:, message: raise ::ArgumentError, "space cannot contain /" if space.to_s.include? "/" "spaces/#{space}/messages/#{}" end |
#quoted_message_metadata_path(space:, message:, quoted_message_metadata:) ⇒ ::String
Create a fully-qualified QuotedMessageMetadata resource string.
The resource will be in the following format:
spaces/{space}/messages/{message}/quotedMessageMetadata/{quoted_message_metadata}
92 93 94 95 96 97 |
# File 'lib/google/apps/chat/v1/chat_service/paths.rb', line 92 def space:, message:, quoted_message_metadata: raise ::ArgumentError, "space cannot contain /" if space.to_s.include? "/" raise ::ArgumentError, "message cannot contain /" if .to_s.include? "/" "spaces/#{space}/messages/#{}/quotedMessageMetadata/#{}" end |
#reaction_path(space:, message:, reaction:) ⇒ ::String
Create a fully-qualified Reaction resource string.
The resource will be in the following format:
spaces/{space}/messages/{message}/reactions/{reaction}
111 112 113 114 115 116 |
# File 'lib/google/apps/chat/v1/chat_service/paths.rb', line 111 def reaction_path space:, message:, reaction: raise ::ArgumentError, "space cannot contain /" if space.to_s.include? "/" raise ::ArgumentError, "message cannot contain /" if .to_s.include? "/" "spaces/#{space}/messages/#{}/reactions/#{reaction}" end |
#space_event_path(space:, space_event:) ⇒ ::String
Create a fully-qualified SpaceEvent resource string.
The resource will be in the following format:
spaces/{space}/spaceEvents/{space_event}
143 144 145 146 147 |
# File 'lib/google/apps/chat/v1/chat_service/paths.rb', line 143 def space_event_path space:, space_event: raise ::ArgumentError, "space cannot contain /" if space.to_s.include? "/" "spaces/#{space}/spaceEvents/#{space_event}" end |
#space_path(space:) ⇒ ::String
Create a fully-qualified Space resource string.
The resource will be in the following format:
spaces/{space}
128 129 130 |
# File 'lib/google/apps/chat/v1/chat_service/paths.rb', line 128 def space_path space: "spaces/#{space}" end |
#space_read_state_path(user:, space:) ⇒ ::String
Create a fully-qualified SpaceReadState resource string.
The resource will be in the following format:
users/{user}/spaces/{space}/spaceReadState
160 161 162 163 164 |
# File 'lib/google/apps/chat/v1/chat_service/paths.rb', line 160 def space_read_state_path user:, space: raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/" "users/#{user}/spaces/#{space}/spaceReadState" end |
#thread_path(space:, thread:) ⇒ ::String
Create a fully-qualified Thread resource string.
The resource will be in the following format:
spaces/{space}/threads/{thread}
177 178 179 180 181 |
# File 'lib/google/apps/chat/v1/chat_service/paths.rb', line 177 def thread_path space:, thread: raise ::ArgumentError, "space cannot contain /" if space.to_s.include? "/" "spaces/#{space}/threads/#{thread}" end |
#thread_read_state_path(user:, space:, thread:) ⇒ ::String
Create a fully-qualified ThreadReadState resource string.
The resource will be in the following format:
users/{user}/spaces/{space}/threads/{thread}/threadReadState
195 196 197 198 199 200 |
# File 'lib/google/apps/chat/v1/chat_service/paths.rb', line 195 def thread_read_state_path user:, space:, thread: raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/" raise ::ArgumentError, "space cannot contain /" if space.to_s.include? "/" "users/#{user}/spaces/#{space}/threads/#{thread}/threadReadState" end |