summaryrefslogtreecommitdiff
path: root/bin/client
diff options
context:
space:
mode:
Diffstat (limited to 'bin/client')
-rw-r--r--bin/client16
1 files changed, 8 insertions, 8 deletions
diff --git a/bin/client b/bin/client
index 8675f18..c5e2a65 100644
--- a/bin/client
+++ b/bin/client
@@ -6,8 +6,9 @@ use DeWeave::Storage;
use DeWeave::Crypto;
use DeWeave::Collection;
use Getopt::Long;
+use Class::MOP;
-my ($server,$username,$password,$sync_key);
+my ($server,$username,$password,$sync_key,$what);
{
my $p = Getopt::Long::Parser->new(
@@ -38,12 +39,11 @@ my $crypto = DeWeave::Crypto->new({
sync_key => $sync_key,
});
-use Data::Dump 'pp';
-my $data = $storage->get_item('storage/tabs');
+$what=ucfirst(shift);
+my $class = "DeWeave::Collection::$what";
+Class::MOP::load_class($class);
-my $foo = DeWeave::Collection->from_json(
- $data,
- $crypto,
-);
+my $foo = $class->fetch($storage,$crypto);
+
+print $_->as_string,"\n" for @{$foo->items};
-print pp $foo;