mirror of
https://github.com/google-wallet/rest-samples.git
synced 2026-01-08 05:03:54 -05:00
Merge pull request #100 from sagarkothari/main
Added batch URLs to the batch code for go, node and python
This commit is contained in:
@@ -537,6 +537,8 @@ func (d *demoEventticket) batchCreateObjects(issuerId, classSuffix string) {
|
||||
}
|
||||
data += "--batch_createobjectbatch--"
|
||||
|
||||
|
||||
// batchUrl = 'https://walletobjects.googleapis.com/batch';
|
||||
res, err := d.httpClient.Post(batchUrl, "multipart/mixed; boundary=batch_createobjectbatch", bytes.NewBuffer([]byte(data)))
|
||||
|
||||
if err != nil {
|
||||
|
||||
@@ -497,6 +497,7 @@ func (d *demoFlight) batchCreateObjects(issuerId, classSuffix string) {
|
||||
}
|
||||
data += "--batch_createobjectbatch--"
|
||||
|
||||
// batchUrl = 'https://walletobjects.googleapis.com/batch';
|
||||
res, err := d.httpClient.Post(batchUrl, "multipart/mixed; boundary=batch_createobjectbatch", bytes.NewBuffer([]byte(data)))
|
||||
|
||||
if err != nil {
|
||||
|
||||
@@ -489,6 +489,7 @@ func (d *demoGeneric) batchCreateObjects(issuerId, classSuffix string) {
|
||||
}
|
||||
data += "--batch_createobjectbatch--"
|
||||
|
||||
// batchUrl = 'https://walletobjects.googleapis.com/batch';
|
||||
res, err := d.httpClient.Post(batchUrl, "multipart/mixed; boundary=batch_createobjectbatch", bytes.NewBuffer([]byte(data)))
|
||||
|
||||
if err != nil {
|
||||
|
||||
@@ -466,6 +466,7 @@ func (d *demoGiftcard) batchCreateObjects(issuerId, classSuffix string) {
|
||||
}
|
||||
data += "--batch_createobjectbatch--"
|
||||
|
||||
// batchUrl = 'https://walletobjects.googleapis.com/batch';
|
||||
res, err := d.httpClient.Post(batchUrl, "multipart/mixed; boundary=batch_createobjectbatch", bytes.NewBuffer([]byte(data)))
|
||||
|
||||
if err != nil {
|
||||
|
||||
@@ -487,6 +487,7 @@ func (d *demoLoyalty) batchCreateObjects(issuerId, classSuffix string) {
|
||||
}
|
||||
data += "--batch_createobjectbatch--"
|
||||
|
||||
// batchUrl = 'https://walletobjects.googleapis.com/batch';
|
||||
res, err := d.httpClient.Post(batchUrl, "multipart/mixed; boundary=batch_createobjectbatch", bytes.NewBuffer([]byte(data)))
|
||||
|
||||
if err != nil {
|
||||
|
||||
@@ -469,6 +469,7 @@ func (d *demoOffer) batchCreateObjects(issuerId, classSuffix string) {
|
||||
}
|
||||
data += "--batch_createobjectbatch--"
|
||||
|
||||
// batchUrl = 'https://walletobjects.googleapis.com/batch';
|
||||
res, err := d.httpClient.Post(batchUrl, "multipart/mixed; boundary=batch_createobjectbatch", bytes.NewBuffer([]byte(data)))
|
||||
|
||||
if err != nil {
|
||||
|
||||
@@ -544,6 +544,7 @@ func (d *demoTransit) batchCreateObjects(issuerId, classSuffix string) {
|
||||
}
|
||||
data += "--batch_createobjectbatch--"
|
||||
|
||||
// batchUrl = 'https://walletobjects.googleapis.com/batch';
|
||||
res, err := d.httpClient.Post(batchUrl, "multipart/mixed; boundary=batch_createobjectbatch", bytes.NewBuffer([]byte(data)))
|
||||
|
||||
if err != nil {
|
||||
|
||||
@@ -990,7 +990,7 @@ class DemoEventTicket {
|
||||
|
||||
// Invoke the batch API calls
|
||||
let response = await this.httpClient.request({
|
||||
url: this.batchUrl,
|
||||
url: this.batchUrl, // https://walletobjects.googleapis.com/batch
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
|
||||
@@ -951,7 +951,7 @@ class DemoFlight {
|
||||
|
||||
// Invoke the batch API calls
|
||||
let response = await this.httpClient.request({
|
||||
url: this.batchUrl,
|
||||
url: this.batchUrl, // https://walletobjects.googleapis.com/batch
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
|
||||
@@ -859,7 +859,7 @@ class DemoGeneric {
|
||||
|
||||
// Invoke the batch API calls
|
||||
let response = await this.httpClient.request({
|
||||
url: this.batchUrl,
|
||||
url: this.batchUrl, // https://walletobjects.googleapis.com/batch
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
|
||||
@@ -920,7 +920,7 @@ class DemoGiftCard {
|
||||
|
||||
// Invoke the batch API calls
|
||||
let response = await this.httpClient.request({
|
||||
url: this.batchUrl,
|
||||
url: this.batchUrl, // https://walletobjects.googleapis.com/batch
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
|
||||
@@ -941,7 +941,7 @@ class DemoLoyalty {
|
||||
|
||||
// Invoke the batch API calls
|
||||
let response = await this.httpClient.request({
|
||||
url: this.batchUrl,
|
||||
url: this.batchUrl, // https://walletobjects.googleapis.com/batch
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
|
||||
@@ -923,7 +923,7 @@ class DemoOffer {
|
||||
|
||||
// Invoke the batch API calls
|
||||
let response = await this.httpClient.request({
|
||||
url: this.batchUrl,
|
||||
url: this.batchUrl, // https://walletobjects.googleapis.com/batch
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
|
||||
@@ -998,7 +998,7 @@ class DemoTransit {
|
||||
|
||||
// Invoke the batch API calls
|
||||
let response = await this.httpClient.request({
|
||||
url: this.batchUrl,
|
||||
url: this.batchUrl, // https://walletobjects.googleapis.com/batch
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
|
||||
@@ -901,7 +901,7 @@ class DemoEventTicket:
|
||||
|
||||
# Invoke the batch API calls
|
||||
response = self.http_client.post(
|
||||
url=self.batch_url,
|
||||
url=self.batch_url, # https://walletobjects.googleapis.com/batch
|
||||
data=data,
|
||||
headers={
|
||||
# `boundary` is the delimiter between API calls in the batch request
|
||||
|
||||
@@ -862,7 +862,7 @@ class DemoFlight:
|
||||
|
||||
# Invoke the batch API calls
|
||||
response = self.http_client.post(
|
||||
url=self.batch_url,
|
||||
url=self.batch_url, # https://walletobjects.googleapis.com/batch
|
||||
data=data,
|
||||
headers={
|
||||
# `boundary` is the delimiter between API calls in the batch request
|
||||
|
||||
@@ -871,7 +871,7 @@ class DemoGeneric:
|
||||
|
||||
# Invoke the batch API calls
|
||||
response = self.http_client.post(
|
||||
url=self.batch_url,
|
||||
url=self.batch_url, # https://walletobjects.googleapis.com/batch
|
||||
data=data,
|
||||
headers={
|
||||
# `boundary` is the delimiter between API calls in the batch request
|
||||
|
||||
@@ -831,7 +831,7 @@ class DemoGiftCard:
|
||||
|
||||
# Invoke the batch API calls
|
||||
response = self.http_client.post(
|
||||
url='https://walletobjects.googleapis.com/batch',
|
||||
url=self.batch_url, # https://walletobjects.googleapis.com/batch
|
||||
data=data,
|
||||
headers={
|
||||
# `boundary` is the delimiter between API calls in the batch request
|
||||
|
||||
@@ -854,7 +854,7 @@ class DemoLoyalty:
|
||||
|
||||
# Invoke the batch API calls
|
||||
response = self.http_client.post(
|
||||
url='https://walletobjects.googleapis.com/batch',
|
||||
url=self.batch_url, # https://walletobjects.googleapis.com/batch
|
||||
data=data,
|
||||
headers={
|
||||
# `boundary` is the delimiter between API calls in the batch request
|
||||
|
||||
@@ -834,7 +834,7 @@ class DemoOffer:
|
||||
|
||||
# Invoke the batch API calls
|
||||
response = self.http_client.post(
|
||||
url='https://walletobjects.googleapis.com/batch',
|
||||
url=self.batch_url, # https://walletobjects.googleapis.com/batch
|
||||
data=data,
|
||||
headers={
|
||||
# `boundary` is the delimiter between API calls in the batch request
|
||||
|
||||
@@ -911,7 +911,7 @@ class DemoTransit:
|
||||
|
||||
# Invoke the batch API calls
|
||||
response = self.http_client.post(
|
||||
url='https://walletobjects.googleapis.com/batch',
|
||||
url=self.batch_url, # https://walletobjects.googleapis.com/batch
|
||||
data=data,
|
||||
headers={
|
||||
# `boundary` is the delimiter between API calls in the batch request
|
||||
|
||||
Reference in New Issue
Block a user