poirot/client-content

There is no license information available for the latest version (dev-devel) of this package.

Http Client Of Content Posts Module.

dev-devel 2017-08-07 08:44 UTC

This package is auto-updated.

Last update: 2024-04-24 04:00:25 UTC


README

Http Client For Content Posts Module.

Create New Post With Related Content Image File

# Upload File To O-Storage
#
$uploadedFile = $ClientTenderBin->store(
        fopen(__DIR__.'/files/infinie.jpeg', 'r')
        , null
        , 'Infinite'
        , []
        , time() + (5 * 60) // file available just for 5 minute
    );

# Insert New Post
#
$r = $ClientContent->create(new PostContentObject([
        'content_type' => 'general',
        'content'      => [
            "description" => "any text content #with_hash_tag or @mention that will extracted.",
            'medias' => [
                [ 'hash' => $uploadedFile['bindata']['hash']
                    , 'content_type' => $uploadedFile['bindata']['content_type'] ],
            ],
        ],
    ]));