Skip to content

Commit 7963aa5

Browse files
navingerSimon Zeltser
authored andcommitted
Changed region tags in sample (#1612)
Currently none of the Endpoints Frameworks docs are using the "echo_api" region tag in this sample. I would like to show just a small snippet of code, so I added the "echo_api_method" region tag. In case we want to show the entire class in the docs, I've renamed the "echo_api" region tag to "echo_api_class".
1 parent 6f5f3bc commit 7963aa5

File tree

1 file changed

+4
-2
lines changed
  • appengine/standard/endpoints-frameworks-v2/echo

1 file changed

+4
-2
lines changed

appengine/standard/endpoints-frameworks-v2/echo/main.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@ class EchoResponse(messages.Message):
3939
# [END messages]
4040

4141

42-
# [START echo_api]
42+
# [START echo_api_class]
4343
@endpoints.api(name='echo', version='v1')
4444
class EchoApi(remote.Service):
4545

46+
# [START echo_api_method]
4647
@endpoints.method(
4748
# This method takes a ResourceContainer defined above.
4849
ECHO_RESOURCE,
@@ -54,6 +55,7 @@ class EchoApi(remote.Service):
5455
def echo(self, request):
5556
output_content = ' '.join([request.content] * request.n)
5657
return EchoResponse(content=output_content)
58+
# [END echo_api_method]
5759

5860
@endpoints.method(
5961
# This method takes a ResourceContainer defined above.
@@ -98,7 +100,7 @@ def get_user_email(self, request):
98100
if not user:
99101
raise endpoints.UnauthorizedException
100102
return EchoResponse(content=user.email())
101-
# [END echo_api]
103+
# [END echo_api_class]
102104

103105

104106
# [START api_server]

0 commit comments

Comments
 (0)