public function create(array $data)
    {
        if (array_key_exists("image", $data)) {
            if (class_exists('\CURLFile')) {
                $data["image"] = new \CURLFile($data['image']);
            } else {
                $data["image"] = '@' . $data['image'];
            }
        }

        $response = $this->request->post("pins", $data);
        return new Pin($this->master, $response);
    }
public function create(array $data)
    {
        if (array_key_exists("image", $data)) {
            if (class_exists('\CURLFile')) {
                $data["image"] = new \CURLFile($data['image']);
            } else {
                $data["image"] = '@' . $data['image'];
            }
        }

        $response = $this->request->post("pins", $data);
        return new Pin($this->master, $response);
    }
public function create ( array $ data ) { if ( array_key_exists ( "image" , $ data ) ) { if ( class_exists ( '\CURLFile' ) ) { $ data [ "image" ] = new \ CURLFile ( $ data [ 'image' ] ) ; } else { $ data [ "image" ] = '@' . $ data [ 'image' ] ; } } $ response = $ this -> request -> post ( "pins" , $ data ) ; return new Pin ( $ this -> master , $ response ) ; }
Create a pin

@access public
@param  array    $data
@throws \DirkGroenen\Pinterest\Exceptions\PinterestException
@return Pin
Create a pin