Skip to content

Instantly share code, notes, and snippets.

View vchudnov-g's full-sized avatar

Victor Chudnovsky vchudnov-g

View GitHub Profile
type: manifest/samples
schema_version: 3
base: &common
env: 'java'
chdir: '{@manifest_dir}/../..'
basepath: '/tmp'
samples:
- <<: *common
path: '{basepath}/echo-me'
sample: 'first'
type: manifest/samples
schema_version: 3
base: &common
env: 'java'
bin: 'echo mvn exec:java -q -D{sample} -Dexec.args=@args'
chdir: '{@manifest_dir}/../..'
basepath: '.'
samples:
- <<: *common
path: '{basepath}/src/main/java/com/google/cloud/examples/speech/v1/SpeechTranscribeAsyncWordTimeOffsetsGcs.java'
@vchudnov-g
vchudnov-g / analyze_entity_sentiment_request_entity_sentiment_text_simple.py
Created January 14, 2019 22:31
Generated entity-sentiment samples with NO response handling
# -*- coding: utf-8 -*-
#
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
@vchudnov-g
vchudnov-g / analyze_entity_sentiment_request_entity_sentiment_file.py
Created January 14, 2019 22:29
Generated entity-sentiment samples with response handling
# -*- coding: utf-8 -*-
#
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#

πŸ–‹ GAPIC :: Library Partials

So you want to write a partial helper, eh?

Hand-written code adds all kinds of functionality on top of generated GAPIC client libraries!

Let's look at the most common type of hand-written extension:

>> Helper Methods added to service object which wraps call to 1 rpc method <<

@vchudnov-g
vchudnov-g / . Simplest gRPC API with working generated client libraries & samples .md Simplest gRPC API with working generated client libraries & samples – # codelab

πŸ¦‘ G.A.P.I.C πŸ–₯ codelab πŸŽ“

.
β”œβ”€β”€ artman_dogs.yaml
β”œβ”€β”€ dogs.proto
β”œβ”€β”€ dogs_gapic.yaml
β”œβ”€β”€ dogs_server.js
β”œβ”€β”€ dogs_service.yaml
└── generate-and-run.sh