-1

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

Shila Mosammami
  • 999
  • 6
  • 20

1 Answers1

1

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();
}
vpgcloud
  • 1,294
  • 2
  • 10
  • 19
  • Thank you, what does attributePath and attributeMask look like? – Shila Mosammami Apr 12 '22 at 12:05
  • 1
    attributePath: locations/{locationId}/attributes – vpgcloud Apr 12 '22 at 12:35
  • 1
    attributeMask: e.g. attributes/has_wheelchair_accessible_entrance – vpgcloud Apr 12 '22 at 12:35
  • Would you please also write some examples of setting attributes in different types? for example: List attributes = new ArrayList(); Attribute attribute=new Attribute(); then I need to do attribute.setValues(values); but the problem is that depending on the type i have various result. – Shila Mosammami Apr 12 '22 at 15:42