Testopia:Documentation:XMLRPC:Build: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 13: Line 13:


{| border=1 cellpadding=4
{| border=1 cellpadding=4
| '''Attribute''' || '''Data Type''' || '''Comments'''  
| '''Attribute''' || '''Data Type''' || '''Comments''' || '''Create''' || '''Read''' || '''Update'''
|-
|-
| build_id || integer ||
| build_id || integer || ||  || X || 
|-
|-
| product_id || integer ||
| product_id || integer || || Required || X || X
|-
|-
| name || string ||
| name || string || || Required || X || X
|-
|-
| description || string ||
| description || string || || Optional || X || X
|-
|-
| milestone || string ||
| milestone || string || || Optional || X || X
|-
| isactive || boolean || || Optional || X || X
|-
|-
|}
|}
Line 29: Line 31:


===Methods===
===Methods===
----
====get - Get A Build by ID====
----
=====Usage=====
Build.get
=====Parameters=====
{| border=1 cellpadding=4
| '''Parameter''' || '''Data Type''' || '''Comments'''
|-
| build_id || integer || Must be greater than 0.
|-
|}
=====Result=====
A hash map of key/value pairs for the attributes listed above or a hash map containing values for the keys, "faultcode" and "faultstring".
=====Example=====
<b>Perl</b>
my $build_id = 1;
my $result = $proxy->call('Build.get', $build_id);
----
====create - Create A New Build====
----
=====Usage=====
Build.create
=====Parameters=====
{| border=1 cellpadding=4
| '''Parameter''' || '''Data Type''' || '''Comments'''
|-
| new_values || hashmap || See required attributes list<sup>1</sup> below.
|-
|}
<sup>1</sup> Required attributes: name and product_id.
=====Result=====
An integer value representing the new build_id or a hash map containing values for the keys, "faultcode" and "faultstring".
=====Example=====
<b>Perl</b>
my $result = $proxy->call('Build.create', {'product_id' => 1, 'name' => 'New Build'});
----
====update - Update An Existing Build====
----
=====Usage=====
Build.update
=====Parameters=====
{| border=1 cellpadding=4
| '''Parameter''' || '''Data Type''' || '''Comments'''
|-
| buld_id || integer ||
|-
| new_values || hashmap || build_id and product_id can not be modified.
|-
|}
=====Result=====
The modified Build on success or a hash map containing values for the keys, "faultcode" and "faultstring".
=====Example=====
<b>Perl</b>
my $build_id = 1;
my $result = $proxy->call('Build.update', $build_id, {'name' => 'New Build'});


----
----
Line 51: Line 129:
=====Example=====
=====Example=====
<b>Perl</b>
<b>Perl</b>
  $proxy->call('Build.lookup_id_by_name', 'First Build');
  my $build_name = 'Build Name';
my $result = $proxy->call('Build.lookup_id_by_name', $build_name);




Line 76: Line 155:
=====Example=====
=====Example=====
<b>Perl</b>
<b>Perl</b>
  $proxy->call('Build.lookup_name_by_id', 1);
  my $build_id = 1;
my $result = $proxy->call('Build.lookup_name_by_id', $build_id);





Revision as of 20:44, 25 September 2007

Back to Testopia:Documentation:XMLRPC

Build

Description

An object representing a Testopia build number.

Hiearchy

Bugzilla::WebService::Testopia::Build

Attributes

Attribute Data Type Comments Create Read Update
build_id integer X
product_id integer Required X X
name string Required X X
description string Optional X X
milestone string Optional X X
isactive boolean Optional X X


Methods


get - Get A Build by ID


Usage

Build.get

Parameters
Parameter Data Type Comments
build_id integer Must be greater than 0.
Result

A hash map of key/value pairs for the attributes listed above or a hash map containing values for the keys, "faultcode" and "faultstring".

Example

Perl

my $build_id = 1;
my $result = $proxy->call('Build.get', $build_id);

create - Create A New Build


Usage

Build.create

Parameters
Parameter Data Type Comments
new_values hashmap See required attributes list1 below.

1 Required attributes: name and product_id.


Result

An integer value representing the new build_id or a hash map containing values for the keys, "faultcode" and "faultstring".

Example

Perl

my $result = $proxy->call('Build.create', {'product_id' => 1, 'name' => 'New Build'});



update - Update An Existing Build


Usage

Build.update

Parameters
Parameter Data Type Comments
buld_id integer
new_values hashmap build_id and product_id can not be modified.


Result

The modified Build on success or a hash map containing values for the keys, "faultcode" and "faultstring".

Example

Perl

my $build_id = 1;
my $result = $proxy->call('Build.update', $build_id, {'name' => 'New Build'});



lookup_id_by_name - Lookup A Build ID By Its Name


Usage

Build.lookup_id_by_name

Parameters
Parameter Data Type Comments
name string Cannot be null or empty string


Result

The build id for the respective name or 0 if an error occurs.

Example

Perl

my $build_name = 'Build Name';
my $result = $proxy->call('Build.lookup_id_by_name', $build_name);



lookup_name_by_id - Lookup A Build Name By Its ID


Usage

Build.lookup_name_by_id

Parameters
Parameter Data Type Comments
id integer Cannot be 0


Result

The build name for the respective id or empty string if an error occurs.

Example

Perl

my $build_id = 1;
my $result = $proxy->call('Build.lookup_name_by_id', $build_id);




Back to Testopia