2017 © Pedro Peláez
 

library wsclient-bundle

Web Service Client

image

overblog/wsclient-bundle

Web Service Client

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 2 % Grown

The README.md

OverBlog NG Ws Client

What is this repository ?

It's the place for the Web Service client library. Essentially to use with External Rest service and JSON-RCP (Internal API)., (*1)

Installation and setup

Juste add the following lines is your deps file:, (*2)

[OverblogWsClientBundle]
    git=git@github.com:ebuzzing/OverblogWsClientBundle.git
    target=/bundles/Overblog/WsClientBundle
    version=v0.4

You have now to tell Symfony2 autoloader where to find the API and the files that will be generated. Fire up your text editor and add the following lines to the app/autoload.php file:, (*3)

#app/autoload.php

    'Overblog'         => __DIR__.'/../vendor/bundles',

Let's register the WsClientBundle in the application kernel:, (*4)

#app/AppKernel.php
    // register your bundles
    new Overblog\WsClientBundle\OverblogWsClientBundle(),

You can now define your service settings in your main configuration file. The example below uses the yaml format:, (*5)

# app/config/config.yml
overblog_ws_client:
    urls:
        *cnct_name*:
          url: http://api.domain.tld/
          type: rest
          timeout: 2000
        *cnct_name_2*:
          url: http://api.domain.tld/json-rpc/user
          type: json

The cnct_name here is a name for your service. You can define several services using different names on different web service..., (*6)

Usage

Use the ws client is very simple. A simple Rest call look like this:, (*7)

$results = $this->get('ws_client')
            ->getConnection('*cnct_name*')
                ->get('/ws/uri')
            ->exec();

You can call together several services by chaining call like this:, (*8)

$results = $this->get('ws_client')
            ->getConnection('*cnct_name_2*')
                ->get('getMethod', array('param' => 'value'))
                ->get('setMethod', array('param' => 'value'))
            ->getConnection('*cnct_name*')
                ->get('/ws/uri')
            ->exec();

The execution time call will be the longuest call., (*9)

The Versions

08/02 2016

dev-master

9999999-dev https://github.com/overblog/WsClientBundle

Web Service Client

  Sources   Download

The Requires

  • php >=5.3.0
  • ext-curl *

 

05/02 2016

v0.6

0.6.0.0 https://github.com/overblog/WsClientBundle

Web Service Client

  Sources   Download

The Requires

  • php >=5.3.0
  • ext-curl *

 

22/07 2014

v0.5.6

0.5.6.0 https://github.com/overblog/WsClientBundle

Web Service Client

  Sources   Download

The Requires

  • php >=5.3.0
  • ext-curl *

 

12/09 2013

v0.5.5

0.5.5.0 https://github.com/ebuzzing/OverblogWsClientBundle

Web Service Client

  Sources   Download

The Requires

  • php >=5.3.0
  • ext-curl *

 

11/11 2012

v0.5.4

0.5.4.0 https://github.com/ebuzzing/OverblogWsClientBundle

Web Service Client

  Sources   Download

The Requires

  • php >=5.3.0
  • ext-curl *

 

09/11 2012

v0.5.3

0.5.3.0 https://github.com/ebuzzing/OverblogWsClientBundle

Web Service Client

  Sources   Download

The Requires

  • php >=5.3.0
  • ext-curl *

 

07/11 2012

v0.5.2

0.5.2.0 https://github.com/ebuzzing/OverblogWsClientBundle

Web Service Client

  Sources   Download

The Requires

  • php >=5.3.0
  • ext-curl *

 

29/10 2012

v0.5.1

0.5.1.0 https://github.com/ebuzzing/OverblogWsClientBundle

Web Service Client

  Sources   Download

The Requires

  • php >=5.3.0
  • ext-curl *