ensembl-hive  2.6
Bio::EnsEMBL::Hive::Utils::RESTclient Class Reference
+ Inheritance diagram for Bio::EnsEMBL::Hive::Utils::RESTclient:

Public Member Functions

public new ()
 
public base_url ()
 
public run_curl_capture_and_parse_result ()
 
public GET ()
 
public POST ()
 

Detailed Description

Synopsis

# Example without an instance:
'http://server.address:1234/create_tasks?with=parameters',
$extra_data_hash,
'intermediate_dump.json'
);
# Example with an instance:
my $head_node = Bio::EnsEMBL::Hive::Utils::RESTclient->new( 'http://server.address:1234' );
my $swarm_id = $head_node->GET( '/swarm' )->{'ID'};
my $tasks_struct = $head_node->GET( '/tasks', "${output_prefix}/${container_prefix}.tasks.json" );
my $nodes_struct = $head_node->GET( '/nodes', "${output_prefix}/${container_prefix}.nodes.json" );

Description

    This module provides a generic REST client interface via GET and POST methods.
    The current implementation is via calling 'curl' external command and capturing its output.

    There is no requirement to instantiate an object when using this module (same methods will work as class methods),
    but if you need to make multiple requests to the same server you may find it convenient to store its base_url in the object.

Definition at line 33 of file RESTclient.pm.

Member Function Documentation

◆ base_url()

public Bio::EnsEMBL::Hive::Utils::RESTclient::base_url ( )

Undocumented method

Code:
click to view

◆ GET()

public Bio::EnsEMBL::Hive::Utils::RESTclient::GET ( )

Undocumented method

Code:
click to view

◆ new()

public Bio::EnsEMBL::Hive::Utils::RESTclient::new ( )

Undocumented method

Code:
click to view

◆ POST()

public Bio::EnsEMBL::Hive::Utils::RESTclient::POST ( )

Undocumented method

Code:
click to view

◆ run_curl_capture_and_parse_result()

public Bio::EnsEMBL::Hive::Utils::RESTclient::run_curl_capture_and_parse_result ( )

Undocumented method

Code:
click to view

The documentation for this class was generated from the following file:
Bio::EnsEMBL::Hive::Utils::RESTclient
Definition: RESTclient.pm:33
Bio::EnsEMBL::Hive::Utils::RESTclient::POST
public POST()
Bio::EnsEMBL::Hive::Utils::RESTclient::new
public new()
Bio::EnsEMBL::Hive::Utils::RESTclient::GET
public GET()
Bio::EnsEMBL::Hive::Utils::RESTclient::base_url
public base_url()
Bio::EnsEMBL::Hive::Utils::RESTclient::run_curl_capture_and_parse_result
public run_curl_capture_and_parse_result()