root/myexperiment-rest/trunk/bin/get_workflow_data.rb @ 151

Revision 151, 0.7 KB (checked in by kostas.karasavvas@…, 3 years ago)

Added workflow creator's (user) information to TavernaWorkflow? object

Line 
1#!/usr/bin/env ruby
2
3require "rubygems"
4require "myexperiment-rest"
5
6include MyExperimentREST
7
8my_exp_workflow = ARGV[0] || "http://www.myexperiment.org/workflows/74/download/bioaid_proteindiscovery_221429.xml?version=3"
9wkf = Workflows.new.read(my_exp_workflow)
10
11
12
13puts wkf.input_type
14puts wkf.xml_uri
15puts wkf.title
16puts wkf.description
17puts "--------------------------"
18
19wkf.inputs.each do |i|
20  puts i.name
21  i.descriptions.each do |d|
22    puts d
23  end
24  i.examples.each do |e|
25    puts e
26  end
27  puts "--------------------------"
28end
29
30puts wkf.user.name
31puts wkf.user.description
32puts wkf.user.email
33puts wkf.user.avatar
34puts wkf.user.website
35puts wkf.user.created_at
36
Note: See TracBrowser for help on using the browser.