how to Update attributes for a given location in java using new API Google mybusiness information

239 views Asked by At

Using this link: Method: locations.updateAttributes , I need to do updateAttributes for every location I have in google mybusiness information API. I cannot find any code example. Would anyone please provide some codes? Thanks a million

1

There are 1 answers

4
vpgcloud On BEST ANSWER

I get that Attributes vs List<Attribute> might be confusing. This should help:

 public void updateAttributes(String attributePath, List<Attribute> attributes, 
    String attributeMask) {

    UpdateAttributes request = myBusinessBusinessInformation.locations()
        .updateAttributes(attributePath, new Attributes().setAttributes(attributes))
        .setAttributeMask(attributeMask);

       request.execute();
}