Permalink
Browse files

Add more examples to the manual

  • Loading branch information...
1 parent d9f6789 commit bf698c525f35f5ac8f9cb8dca2aa0fc0711206d4 @leto committed Nov 12, 2010
Showing with 19 additions and 0 deletions.
  1. +19 −0 lib/WWW/PhyloBox/Manual.pod
@@ -38,6 +38,25 @@ phylogenetic trees. The preferred data format for importing phylogenetic trees
is PhyloXML, but the Newick format is also marginally supported.
+=head1 EXAMPLES
+
+This example sets the API root, in the case of the developer wanting to talk to a different PhyloBox instance. It also uses a zipped remote PhyloXML file.
+
+ # this is the default api_root
+ my $phylobox = WWW::PhyloBox->new(
+ api_root => 'http://2-0.latest.phylobox.appspot.com'
+ );
+
+ # this creates a phylogenetic tree from a remote zipped file
+ # Zipped Newick files are also supported
+ my $tree = $phylobox->create(
+ phyloUrl => "http://example.com/phylo.xml.zip",
+ response => "key",
+ name => "Moose speciation",
+ );
+ print $tree->name . " tree is at " . $tree->url . "\n";
+
+
=head1 ACKNOWLEDGEMENTS
This software was initially written at the GMOD Evolutionary Biology Hackathon

0 comments on commit bf698c5

Please sign in to comment.