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.
-
#custom_emoji_path(custom_emoji:) ⇒ ::String
Create a fully-qualified CustomEmoji 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_notification_setting_path(user:, space:) ⇒ ::String
Create a fully-qualified SpaceNotificationSetting 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/#{message}/attachments/#{attachment}" end |
#custom_emoji_path(custom_emoji:) ⇒ ::String
Create a fully-qualified CustomEmoji resource string.
The resource will be in the following format:
customEmojis/{custom_emoji}
56 57 58 |
# File 'lib/google/apps/chat/v1/chat_service/paths.rb', line 56 def custom_emoji_path custom_emoji: "customEmojis/#{custom_emoji}" 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}
71 72 73 74 75 |
# File 'lib/google/apps/chat/v1/chat_service/paths.rb', line 71 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}
88 89 90 91 92 |
# File 'lib/google/apps/chat/v1/chat_service/paths.rb', line 88 def space:, message: raise ::ArgumentError, "space cannot contain /" if space.to_s.include? "/" "spaces/#{space}/messages/#{message}" 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}
106 107 108 109 110 111 |
# File 'lib/google/apps/chat/v1/chat_service/paths.rb', line 106 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/#{message}/quotedMessageMetadata/#{quoted_message_metadata}" 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}
125 126 127 128 129 130 |
# File 'lib/google/apps/chat/v1/chat_service/paths.rb', line 125 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/#{message}/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}
157 158 159 160 161 |
# File 'lib/google/apps/chat/v1/chat_service/paths.rb', line 157 def space_event_path space:, space_event: raise ::ArgumentError, "space cannot contain /" if space.to_s.include? "/" "spaces/#{space}/spaceEvents/#{space_event}" end |
#space_notification_setting_path(user:, space:) ⇒ ::String
Create a fully-qualified SpaceNotificationSetting resource string.
The resource will be in the following format:
users/{user}/spaces/{space}/spaceNotificationSetting
174 175 176 177 178 |
# File 'lib/google/apps/chat/v1/chat_service/paths.rb', line 174 def space_notification_setting_path user:, space: raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/" "users/#{user}/spaces/#{space}/spaceNotificationSetting" end |
#space_path(space:) ⇒ ::String
Create a fully-qualified Space resource string.
The resource will be in the following format:
spaces/{space}
142 143 144 |
# File 'lib/google/apps/chat/v1/chat_service/paths.rb', line 142 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
191 192 193 194 195 |
# File 'lib/google/apps/chat/v1/chat_service/paths.rb', line 191 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}
208 209 210 211 212 |
# File 'lib/google/apps/chat/v1/chat_service/paths.rb', line 208 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
226 227 228 229 230 231 |
# File 'lib/google/apps/chat/v1/chat_service/paths.rb', line 226 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 |