package cx.cad.nfsn;

import cx.cad.nfsn.objects.Account;
import cx.cad.nfsn.objects.Member;
import cx.cad.nfsn.objects.Site;

import java.util.List;

public class Examples {
    public static void main(String[] args){
        String login = System.getenv("NFSN_LOGIN");
        String apiKey = System.getenv("NFSN_KEY");
        API api = new API(login, apiKey);

        Member member = api.getMember(login);
        List<Account> list = member.getAccounts();
        for(Account a : list){
            Double balance = a.getBalance();
            String id = a.getIdentifier();
            System.out.println(String.format("Account %s has %f balance.", id, balance));
            System.out.print("Sites: ");
            for(Site s : a.getSites()){
                System.out.print(s.getIdentifier() + " ");
            }
            System.out.println();
        }
    }
}

@@ -15,16 +15,57 @@
 .nfsn;%0A%0A
+import cx.cad.nfsn.models.AccountStatus;%0A
 import c
@@ -705,16 +705,348 @@
 ance));%0A
+            String friendlyName = a.getFriendlyName();%0A            System.out.println(String.format(%22Account %25s has friendlyName %25s.%22, id, friendlyName));%0A            AccountStatus as = a.getStatus();%0A            System.out.println(String.format(%22Status: %25s: %25s (%25s)%22, as.getShortCode(), as.getStatus(), as.getColor().toString()));%0A
         

extend example to include account status output