/** * @author braango * * Sample code showing how to delete footers for a personnel * */publicclassDeleteFooters{staticStringbasePath="https://testapi2.braango.com/v2/braango";/** * @param args */publicstaticvoidmain(String[]args){// TODO Auto-generated method stubApiClientbraangoApiClient=newApiClient();// TEST auth token. Please contact// sales@braango.com to have one// created for youStringauthToken="ISNWF0P30WM0CMK";braangoApiClient.setBasePath(basePath);// Set the auth_token for api client to// interact with Braango systembraangoApiClient.setApiKey(authToken);// Api key is authorization to to access// resources within braango system//// This key is different than auth_token// that is used to validate the master accountStringapiKey="ISNfTMNOumV3xYNDd2g";// Create personnel api. Personnel is hosted by subDealerFootersApifooterApi=newFootersApi(braangoApiClient);ApiCallback<FootersOutput>callBack=newApiCallback<FootersOutput>(){@OverridepublicvoidonUploadProgress(longbytesWritten,longcontentLength,booleandone){System.out.println("Place holder for tracking"+" request progress");}@OverridepublicvoidonSuccess(FootersOutputresult,intstatusCode,Map<String,List<String>>responseHeaders){FootersInputBodyfootersList=result.getBody().getData();List<String>dealerFooters=footersList.getDealerFooters();List<String>clientFooters=footersList.getClientFooters();List<String>supervisorFooters=footersList.getSupervisorFooters();System.out.println("Dealer banners = "+dealerFooters);System.out.println("Client banners = "+clientFooters);System.out.println("Supervisor banners = "+supervisorFooters);}@OverridepublicvoidonFailure(ApiExceptione,intstatusCode,Map<String,List<String>>responseHeaders){System.out.println("Error is "+statusCode+" "+e.getResponseBody());}@OverridepublicvoidonDownloadProgress(longbytesRead,longcontentLength,booleandone){}};try{StringsubDealerId="subdealers1002";StringsalesPersonId="0550c168-6117-45d5-a95f-e66593e6336b";StringaccountType="partner";StringfooterType="dealer";// "dealer", "client", "supervisor"footerApi.deleteFootersAsync(subDealerId,salesPersonId,footerType,apiKey,accountType,callBack);}catch(ApiExceptione1){e1.printStackTrace();}}}
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.