Skip to content

Commit 67e0686

Browse files
committed
updated fake responses to match latest api version
1 parent 412c864 commit 67e0686

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

src/Entities/Properties/Property.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,9 @@ private static function mapTypeToClass(string $type): string
183183
$class = str_replace('_', '', ucwords($type, '_'));
184184
return "FiveamCode\\LaravelNotionApi\\Entities\\Properties\\" . $class;
185185
case 'text':
186+
case 'rich_text':
186187
# TODO: Depending on the Notion API version.
187-
return RichText::class;
188+
return Text::class;
188189
default:
189190
return Property::class;
190191
}

tests/stubs/endpoints/databases/response_query_limit1_200.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"properties": {
1515
"Birth year": {
1616
"id": "_f<<",
17-
"type": "text",
18-
"text": [
17+
"type": "rich_text",
18+
"rich_text": [
1919
{
2020
"type": "text",
2121
"text": {
@@ -82,6 +82,6 @@
8282
}
8383
}
8484
],
85-
"next_cursor": null,
86-
"has_more": false
87-
}
85+
"next_cursor": "ab2a7a85-08a1-4dfc-be89-0e30aeffc0f6",
86+
"has_more": true
87+
}

tests/stubs/endpoints/databases/response_query_limit2_200.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"properties": {
1515
"Birth year": {
1616
"id": "_f<<",
17-
"type": "text",
18-
"text": [
17+
"type": "rich_text",
18+
"rich_text": [
1919
{
2020
"type": "text",
2121
"text": {
@@ -94,8 +94,8 @@
9494
"properties": {
9595
"Birth year": {
9696
"id": "_f<<",
97-
"type": "text",
98-
"text": [
97+
"type": "rich_text",
98+
"rich_text": [
9999
{
100100
"type": "text",
101101
"text": {

0 commit comments

Comments
 (0)