@Test public void modifyTagPins() { mockServer.expect(requestTo("https: .andExpect(method(POST)) .andExpect(body(compactedJson("data/modifytag-pins"))) .andRespond(withResponse("", responseHeaders, HttpStatus.OK, "OK")); urbanAirship.tagOperations().modifyTagPins("newtag", asList("pin1", "pin2"), asList("pin3", "pin4")); mockServer.verify(); }
public void modifyTagPins(String tagName, List<String> pinsToAdd, List<String> pinsToRemove) { ModifyTags modifyTags = new ModifyTags(); modifyTags.setDevicePins(pinsToAdd, pinsToRemove); restOperations.postForObject(URBANAIRSHIP_API_URL + "tags/" + tagName, modifyTags, String.class); }
TagTemplate implements TagOperations { public void modifyTagPins(String tagName, List<String> pinsToAdd, List<String> pinsToRemove) { ModifyTags modifyTags = new ModifyTags(); modifyTags.setDevicePins(pinsToAdd, pinsToRemove); restOperations.postForObject(URBANAIRSHIP_API_URL + "tags/" + tagName, modifyTags, String.class); } }
TagTemplate implements TagOperations { public void modifyTagPins(String tagName, List<String> pinsToAdd, List<String> pinsToRemove) { ModifyTags modifyTags = new ModifyTags(); modifyTags.setDevicePins(pinsToAdd, pinsToRemove); restOperations.postForObject(URBANAIRSHIP_API_URL + "tags/" + tagName, modifyTags, String.class); } TagTemplate(RestOperations restOperations); }
TagTemplate implements TagOperations { public void modifyTagPins(String tagName, List<String> pinsToAdd, List<String> pinsToRemove) { ModifyTags modifyTags = new ModifyTags(); modifyTags.setDevicePins(pinsToAdd, pinsToRemove); restOperations.postForObject(URBANAIRSHIP_API_URL + "tags/" + tagName, modifyTags, String.class); } TagTemplate(RestOperations restOperations); List<String> getTags(); List<String> getTags(String deviceToken); void createTag(String tagName); void createTag(String deviceToken, String tagName); void modifyTagTokens(String tagName, List<String> tokensToAdd, List<String> tokensToRemove); void modifyTagPins(String tagName, List<String> pinsToAdd, List<String> pinsToRemove); void modifyTagAppIds(String tagName, List<String> idsToAdd, List<String> idsToRemove); void removeTags(); void removeTag(String deviceToken, String tagName); }
TagTemplate implements TagOperations { public void modifyTagPins(String tagName, List<String> pinsToAdd, List<String> pinsToRemove) { ModifyTags modifyTags = new ModifyTags(); modifyTags.setDevicePins(pinsToAdd, pinsToRemove); restOperations.postForObject(URBANAIRSHIP_API_URL + "tags/" + tagName, modifyTags, String.class); } TagTemplate(RestOperations restOperations); List<String> getTags(); List<String> getTags(String deviceToken); void createTag(String tagName); void createTag(String deviceToken, String tagName); void modifyTagTokens(String tagName, List<String> tokensToAdd, List<String> tokensToRemove); void modifyTagPins(String tagName, List<String> pinsToAdd, List<String> pinsToRemove); void modifyTagAppIds(String tagName, List<String> idsToAdd, List<String> idsToRemove); void removeTags(); void removeTag(String deviceToken, String tagName);  }