Merge pull request #100 from sagarkothari/main

Added batch URLs to the batch code for go, node and python
This commit is contained in:
Alex Muramoto
2023-12-04 12:32:37 -08:00
committed by GitHub
21 changed files with 22 additions and 14 deletions

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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: {

View File

@@ -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: {

View File

@@ -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: {

View File

@@ -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: {

View File

@@ -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: {

View File

@@ -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: {

View File

@@ -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: {

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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