original_string: public function request($type, $params = array())
      {
          if (isset($this->iTunesConfig['api'])) {
              if (
                  isset($this->iTunesConfig['api']['url']) &&
                  isset($this->iTunesConfig['api']['search_uri']) &&
                  isset($this->iTunesConfig['api']['lookup_uri'])
              ) {
                  $host = $this->iTunesConfig['api']['url'];
  
                  switch ($type) {
                      case 'search':
                      default:
                          $uri = $this->iTunesConfig['api']['search_uri'];
                          $params = array_merge(
                              array(
                                  'limit' => isset($this->iTunesConfig['limit']) ? $this->iTunesConfig['limit'] : 50,
                              ),
                              $params
                          );
                      break;
  
                      case 'lookup':
                          $uri = $this->iTunesConfig['api']['lookup_uri'];
                      break;
                  }
  
                  return array(
                      'url' => $host.$uri,
                      'params' => $params,
                  );
              }
          }
  
          throw new ConfigurationException('Incomplete Configuration');
      }
code: public function request($type, $params = array())
      {
          if (isset($this->iTunesConfig['api'])) {
              if (
                  isset($this->iTunesConfig['api']['url']) &&
                  isset($this->iTunesConfig['api']['search_uri']) &&
                  isset($this->iTunesConfig['api']['lookup_uri'])
              ) {
                  $host = $this->iTunesConfig['api']['url'];
  
                  switch ($type) {
                      case 'search':
                      default:
                          $uri = $this->iTunesConfig['api']['search_uri'];
                          $params = array_merge(
                              array(
                                  'limit' => isset($this->iTunesConfig['limit']) ? $this->iTunesConfig['limit'] : 50,
                              ),
                              $params
                          );
                      break;
  
                      case 'lookup':
                          $uri = $this->iTunesConfig['api']['lookup_uri'];
                      break;
                  }
  
                  return array(
                      'url' => $host.$uri,
                      'params' => $params,
                  );
              }
          }
  
          throw new ConfigurationException('Incomplete Configuration');
      }
code_tokens: public function request ( $ type , $ params = array ( ) ) { if ( isset ( $ this -> iTunesConfig [ 'api' ] ) ) { if ( isset ( $ this -> iTunesConfig [ 'api' ] [ 'url' ] ) && isset ( $ this -> iTunesConfig [ 'api' ] [ 'search_uri' ] ) && isset ( $ this -> iTunesConfig [ 'api' ] [ 'lookup_uri' ] ) ) { $ host = $ this -> iTunesConfig [ 'api' ] [ 'url' ] ; switch ( $ type ) { case 'search' : default : $ uri = $ this -> iTunesConfig [ 'api' ] [ 'search_uri' ] ; $ params = array_merge ( array ( 'limit' => isset ( $ this -> iTunesConfig [ 'limit' ] ) ? $ this -> iTunesConfig [ 'limit' ] : 50 , ) , $ params ) ; break ; case 'lookup' : $ uri = $ this -> iTunesConfig [ 'api' ] [ 'lookup_uri' ] ; break ; } return array ( 'url' => $ host . $ uri , 'params' => $ params , ) ; } } throw new ConfigurationException ( 'Incomplete Configuration' ) ; }
docstring: Builds up the request array.
  
  @param string $type   supported: search | lookup
  @param string $term
  @param array  $params
  
  @return array
docstring_tokens: Builds up the request array .