src/Operations.php
public function post(string $author, string $title, string $body, array $tags, string $app = '')
    {
        $first_tag = Helpers::slug(array_shift($tags));
        $shorty    = Helpers::limit($title, 35);
        $permalink = Helpers::slug($shorty).'-'.time();
        $metadata  = [];

        if (count($tags) > 0)
        {
            $metadata['tags'] = $tags;
        }
        if (!empty($app))
        {
            $metadata['app'] = $app;
        }

        $metadata  = json_encode($metadata);
        $request   = [
            'operations' =>
                [
                    [
                        'comment',
                        [
                            'parent_author'   => '',
                            'parent_permlink' => $first_tag,
                            'author'          => $author,
                            'permlink'        => $permalink,
                            'title'           => $title,
                            'body'            => $body,
                            'json_metadata'   => empty($metadata) ? '' : $metadata
                        ]
                    ]
                ]
        ];

        return $request;
    }
public function post(string $author, string $title, string $body, array $tags, string $app = '')
    {
        $first_tag = Helpers::slug(array_shift($tags));
        $shorty    = Helpers::limit($title, 35);
        $permalink = Helpers::slug($shorty).'-'.time();
        $metadata  = [];

        if (count($tags) > 0)
        {
            $metadata['tags'] = $tags;
        }
        if (!empty($app))
        {
            $metadata['app'] = $app;
        }

        $metadata  = json_encode($metadata);
        $request   = [
            'operations' =>
                [
                    [
                        'comment',
                        [
                            'parent_author'   => '',
                            'parent_permlink' => $first_tag,
                            'author'          => $author,
                            'permlink'        => $permalink,
                            'title'           => $title,
                            'body'            => $body,
                            'json_metadata'   => empty($metadata) ? '' : $metadata
                        ]
                    ]
                ]
        ];

        return $request;
    }
New post

@param string $author The author who is posting
@param string $title  Post title, the permalink is gonna be created by title
@param string $body   Body of the post
@param array  $tags   Array of tags
@param string $app    Name of the application in use for the post
@return array