Commit 31aeffb
authored
Add small, generated version of
* Generated sample: language_sentiment_text
FYI generated from the following YAML GAPIC config:
sample_value_sets:
- id: analyze_sentiment
title: "Analyzing Sentiment"
description: "Proof of concept for analyzing sentiment"
parameters:
defaults:
- document.type=PLAIN_TEXT
- document.content="Your text to analyze, e.g. Hello, world!"
attributes:
- parameter: document.content
sample_argument: true
on_success:
- define: sentiment=$resp.document_sentiment
- print:
- "Score: %s"
- sentiment.score
- print:
- "Magnitude: %s"
- sentiment.magnitude
samples:
standalone:
- calling_forms: ".*"
value_sets: analyze_sentiment
region_tag: language_sentiment_text
* Add requirements.txt (not currently generated)
* Add test for language_sentiment_text (not currently generated)
* Move language_python_migration_document_text
Move language_python_migration_document_text so it uses a different snippet in preparation for deprecation of existing language_sentiment_text sample
* Rename generated snippets so filename == region tag
* Fix test for generated code sample (file rename to match region tag)
* Update Copyright year to 2018 in new hand-written file
* Fix lint errors of #language_sentiment_text test
* Regenerate #language_sentiment_text to fix lint errors (updated Python sample template)
* Binary string support in samples!
From PR googleapis/gapic-generator#2272language_sentiment_text (GoogleCloudPlatform#1660)1 parent 84c2cb2 commit 31aeffb
File tree
4 files changed
+92
-2
lines changed- language
- cloud-client/v1
- generated-samples/v1
4 files changed
+92
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
47 | | - | |
48 | 46 | | |
49 | 47 | | |
50 | 48 | | |
| |||
87 | 85 | | |
88 | 86 | | |
89 | 87 | | |
| 88 | + | |
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments