Exemplo n.º 1
0
        public void fetchItems()
        {
            APIKeyInfoComponent        info        = GetComponent <APIKeyInfoComponent>();
            APIKeyPermissionsComponent permissions = GetComponent <APIKeyPermissionsComponent>();

            if (info == null)
            {
                throw new Exceptions.APIKeyNotFoundException();
            }
            if (!info.isValid())
            {
                throw new Exceptions.APIKeyInvalidException();
            }
            if (permissions == null)
            {
                throw new Exceptions.APIKeyPermissionsNotFoundException();
            }
            if (!permissions.hasRequiredPermission("inventories"))
            {
                throw new Exceptions.APIKeyLacksPermissionException("inventories");
            }
            bankItems = requestJSON <List <BankInfo> >(URL + info.getAPIKey());
        }
 public SetAPIKeyForm(APIKeyInfoComponent info)
 {
     InitializeComponent();
     myKey         = info;
     keyField.Text = info.getAPIKey();
 }