Skip to content

Commit 958e205

Browse files
committed
added comments
1 parent 4a9b7da commit 958e205

File tree

5 files changed

+22
-10
lines changed

5 files changed

+22
-10
lines changed

src/Endpoints/Database.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ public function query(): array
4848
if ($this->filter->isNotEmpty())
4949
$postData["filter"] = []; //Filter::filterQuery($this->filter);
5050

51-
if($this->startCursor !== null)
51+
if ($this->startCursor !== null)
5252
$postData["start_cursor"] = $this->startCursor;
5353

54-
if($this->pageSize !== null)
54+
if ($this->pageSize !== null)
5555
$postData["page_size"] = $this->pageSize;
5656

5757
$response = $this->post(

src/Endpoints/Databases.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@
88
use FiveamCode\LaravelNotionApi\Notion;
99
use FiveamCode\LaravelNotionApi\Query\StartCursor;
1010

11+
12+
/**
13+
* Class Databases
14+
*
15+
* This endpoint is not recommended by Notion anymore.
16+
* Use the search() endpoint instead.
17+
*
18+
* @package FiveamCode\LaravelNotionApi\Endpoints
19+
*/
1120
class Databases extends Endpoint implements EndpointInterface
1221
{
1322

src/Endpoints/Endpoint.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Endpoint
2121

2222

2323
protected ?StartCursor $startCursor = null;
24-
protected ?int $pageSize = null;
24+
protected ?int $pageSize = null;
2525

2626
public function __construct(Notion $notion)
2727
{
@@ -31,7 +31,7 @@ public function __construct(Notion $notion)
3131

3232
/**
3333
* Checks if given version for notion-api is valid
34-
*
34+
*
3535
* @param string $version
3636
*/
3737
public function checkValidVersion(string $version): void
@@ -41,9 +41,9 @@ public function checkValidVersion(string $version): void
4141
}
4242
}
4343

44-
44+
4545
/**
46-
*
46+
*
4747
* @param string $endpoint
4848
* @return string
4949
*/
@@ -52,9 +52,9 @@ protected function url(string $endpoint): string
5252
return Endpoint::BASE_URL . "{$this->notion->getVersion()}/{$endpoint}";
5353
}
5454

55-
55+
5656
/**
57-
*
57+
*
5858
* @param string $url
5959
* @return array
6060
*/

src/Notion.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ public function __construct(string $version = null, string $token = null)
3030
{
3131
if ($token !== null) {
3232
$this->setToken($token);
33-
}
34-
else{
33+
} else {
3534
$this->setToken(config('laravel-notion-api.notion-api-token'));
3635
}
3736

src/Query/Filter.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,9 @@ public function __construct(string $property )
1414

1515
}
1616

17+
// public static function textFilter(string $property, ) {
18+
//
19+
// }
20+
1721

1822
}

0 commit comments

Comments
 (0)