Skip to content

Commit ffa6474

Browse files
T3RAN13T3RAN13
authored andcommitted
Commands update
1 parent 4977b8a commit ffa6474

7 files changed

+66
-66
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
4+
namespace GrapheneNodeClient\Commands\DataBase;
5+
6+
7+
class GetContentCommand extends CommandAbstract
8+
{
9+
/** @var string */
10+
protected $method = 'get_content';
11+
12+
/** @var array */
13+
protected $requiredParams = [
14+
'0' => ['string'], //author
15+
'1' => ['string'], //permlink
16+
];
17+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
4+
namespace GrapheneNodeClient\Commands\DataBase;
5+
6+
7+
class GetDiscussionsByAuthorBeforeDateCommand extends CommandAbstract
8+
{
9+
protected $method = 'get_discussions_by_author_before_date';
10+
protected $requiredParams = [
11+
'0' => ['string'], //'author',
12+
'1' => ['string'], //'start_permlink' for pagination,
13+
'2' => ['string'], //'before_date'
14+
'3' => ['integer'], //'limit'
15+
];
16+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
4+
namespace GrapheneNodeClient\Commands\DataBase;
5+
6+
7+
use GrapheneNodeClient\Connectors\ConnectorInterface;
8+
9+
class GetDiscussionsByBlogCommand extends CommandAbstract
10+
{
11+
protected $method = 'get_discussions_by_blog';
12+
protected $requiredParams = [
13+
ConnectorInterface::PLATFORM_GOLOS => [
14+
'*:limit' => ['integer'], //the discussions return amount top limit
15+
'*:select_tags:*' => ['nullOrString'], //list of tags to include, posts without these tags are filtered
16+
'*:select_authors:*' => ['nullOrString'], //list of authors to select
17+
'*:truncate_body' => ['nullOrInteger'], //the amount of bytes of the post body to return, 0 for all
18+
'*:start_author' => ['nullOrString'], //the author of discussion to start searching from
19+
'*:start_permlink' => ['nullOrString'], //the permlink of discussion to start searching from
20+
'*:parent_author' => ['nullOrString'], //the author of parent discussion
21+
'*:parent_permlink' => ['nullOrString'] //the permlink of parent discussion
22+
],
23+
ConnectorInterface::PLATFORM_STEEMIT => [
24+
'*:tag' => ['string'], //'author',
25+
'*:limit' => ['integer'], //'limit'
26+
'*:start_author' => ['nullOrString'], //'start_author' for pagination,
27+
'*:start_permlink' => ['nullOrString'] //'start_permlink' for pagination,
28+
]
29+
];
30+
}
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?php
22

33

4-
namespace GrapheneNodeClient\Commands;
4+
namespace GrapheneNodeClient\Commands\DataBase;
55

66

77
class GetTrendingCategoriesCommand extends CommandAbstract
88
{
99
protected $method = 'get_trending_categories';
1010
protected $requiredParams = [
11-
0, //'after'
12-
1, //'limit'
11+
'0' => ['nullOrString'], //after
12+
'1' => ['integer'], //permlink
1313
];
1414
}

Commands/GetContentCommand.php

Lines changed: 0 additions & 17 deletions
This file was deleted.

Commands/GetDiscussionsByAuthorBeforeDateCommand.php

Lines changed: 0 additions & 16 deletions
This file was deleted.

Commands/GetDiscussionsByBlogCommand.php

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)