src/Material/Temporary.php
public function getStream($mediaId)
    {
        $response = $this->getHttp()->get(self::API_GET, ['media_id' => $mediaId]);

        $response->getBody()->rewind();

        $body = $response->getBody()->getContents();

        $json = json_decode($body, true);

        if (JSON_ERROR_NONE === json_last_error()) {
            $this->checkAndThrow($json);
        }

        return $body;
    }
public function getStream($mediaId)
    {
        $response = $this->getHttp()->get(self::API_GET, ['media_id' => $mediaId]);

        $response->getBody()->rewind();

        $body = $response->getBody()->getContents();

        $json = json_decode($body, true);

        if (JSON_ERROR_NONE === json_last_error()) {
            $this->checkAndThrow($json);
        }

        return $body;
    }
public function getStream ( $ mediaId ) { $ response = $ this -> getHttp ( ) -> get ( self :: API_GET , [ 'media_id' => $ mediaId ] ) ; $ response -> getBody ( ) -> rewind ( ) ; $ body = $ response -> getBody ( ) -> getContents ( ) ; $ json = json_decode ( $ body , true ) ; if ( JSON_ERROR_NONE === json_last_error ( ) ) { $ this -> checkAndThrow ( $ json ) ; } return $ body ; }
Fetch item from WeChat server.

@param string $mediaId

@return mixed

@throws \EasyWeChat\Core\Exceptions\RuntimeException
Fetch item from WeChat server .