Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Read your notion pages as Markdown in Laravel applications
Example:

```php
use RedberryProducts\MdNotion\Facades\MdNotion;
use Redberry\MdNotion\Facades\MdNotion;

$pageId = '263d9316605a806f9e95e1377a46ff3e';

Expand Down Expand Up @@ -77,8 +77,8 @@ return [
* Customize these to use your own adapters.
*/
'adapters' => [
'paragraph' => \RedberryProducts\MdNotion\Adapters\ParagraphAdapter::class,
'heading_1' => \RedberryProducts\MdNotion\Adapters\HeadingAdapter::class,
'paragraph' => \Redberry\MdNotion\Adapters\ParagraphAdapter::class,
'heading_1' => \Redberry\MdNotion\Adapters\HeadingAdapter::class,
// ... many more block adapters
],
];
Expand Down Expand Up @@ -123,7 +123,7 @@ To get your Notion API key:
Get the content of a single page as markdown:

```php
use RedberryProducts\MdNotion\Facades\MdNotion;
use Redberry\MdNotion\Facades\MdNotion;

$pageId = '263d9316605a806f9e95e1377a46ff3e';
$content = MdNotion::make($pageId)->content()->read();
Expand Down Expand Up @@ -230,7 +230,7 @@ The `MdNotion` package provides rich object models for working with Notion pages
#### Basic Properties and Methods

```php
use RedberryProducts\MdNotion\Objects\Page;
use Redberry\MdNotion\Objects\Page;

// Create from data
$page = Page::from([
Expand Down Expand Up @@ -279,7 +279,7 @@ $updatedPage = $originalPage->fetch();
#### Basic Properties and Methods

```php
use RedberryProducts\MdNotion\Objects\Database;
use Redberry\MdNotion\Objects\Database;

// Create from data
$database = Database::from([
Expand Down Expand Up @@ -507,7 +507,7 @@ You will need adapter class extending `src\Adapters\BaseBlockAdapter.php` and cu

namespace App\Adapters;

use RedberryProducts\MdNotion\Adapters\BaseBlockAdapter;
use Redberry\MdNotion\Adapters\BaseBlockAdapter;

class CustomCodeAdapter extends BaseBlockAdapter
{
Expand Down Expand Up @@ -550,8 +550,8 @@ return [
'adapters' => [
'callout' => \App\Adapters\CustomCalloutAdapter::class,
// Keep existing adapters...
'paragraph' => \RedberryProducts\MdNotion\Adapters\ParagraphAdapter::class,
'heading_1' => \RedberryProducts\MdNotion\Adapters\HeadingAdapter::class,
'paragraph' => \Redberry\MdNotion\Adapters\ParagraphAdapter::class,
'heading_1' => \Redberry\MdNotion\Adapters\HeadingAdapter::class,
// ... other adapters
],
];
Expand Down
4 changes: 2 additions & 2 deletions column-list-fetch-example.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Illuminate\View\Engines\EngineResolver;
use Illuminate\View\Factory;
use Illuminate\View\FileViewFinder;
use RedberryProducts\MdNotion\Adapters\ColumnListAdapter;
use Redberry\MdNotion\Adapters\ColumnListAdapter;

// Set up Laravel container
$container = new Container;
Expand Down Expand Up @@ -56,7 +56,7 @@
// Bind view factory to container
$container->instance('view', $factory);
View::setFacadeApplication($container);
use RedberryProducts\MdNotion\SDK\Notion;
use Redberry\MdNotion\SDK\Notion;

// Use actual block ID from Notion
$columnListBlock = [
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "redberry/md-notion",
"description": "Read your notion pages as Markdown in Laravel applications.",
"keywords": [
"RedberryProducts",
"Redberry",
"laravel",
"md-notion"
],
Expand Down Expand Up @@ -31,12 +31,12 @@
},
"autoload": {
"psr-4": {
"RedberryProducts\\MdNotion\\": "src/"
"Redberry\\MdNotion\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"RedberryProducts\\MdNotion\\Tests\\": "tests/",
"Redberry\\MdNotion\\Tests\\": "tests/",
"Workbench\\App\\": "workbench/app/"
}
},
Expand All @@ -57,10 +57,10 @@
"extra": {
"laravel": {
"providers": [
"RedberryProducts\\MdNotion\\MdNotionServiceProvider"
"Redberry\\MdNotion\\MdNotionServiceProvider"
],
"aliases": {
"MdNotion": "RedberryProducts\\MdNotion\\Facades\\MdNotion"
"MdNotion": "Redberry\\MdNotion\\Facades\\MdNotion"
}
}
},
Expand Down
42 changes: 21 additions & 21 deletions config/md-notion.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

// config for RedberryProducts/MdNotion
// config for Redberry/MdNotion
return [

/**
Expand All @@ -27,25 +27,25 @@
* Values are fully qualified adapter class names.
*/
'adapters' => [
'paragraph' => \RedberryProducts\MdNotion\Adapters\ParagraphAdapter::class,
'heading_1' => \RedberryProducts\MdNotion\Adapters\HeadingAdapter::class,
'heading_2' => \RedberryProducts\MdNotion\Adapters\HeadingAdapter::class,
'heading_3' => \RedberryProducts\MdNotion\Adapters\HeadingAdapter::class,
'bulleted_list_item' => \RedberryProducts\MdNotion\Adapters\BulletedListItemAdapter::class,
'numbered_list_item' => \RedberryProducts\MdNotion\Adapters\NumberedListItemAdapter::class,
'to_do' => \RedberryProducts\MdNotion\Adapters\ToDoAdapter::class,
'toggle' => \RedberryProducts\MdNotion\Adapters\ToggleAdapter::class,
'code' => \RedberryProducts\MdNotion\Adapters\CodeAdapter::class,
'quote' => \RedberryProducts\MdNotion\Adapters\QuoteAdapter::class,
'callout' => \RedberryProducts\MdNotion\Adapters\CalloutAdapter::class,
'divider' => \RedberryProducts\MdNotion\Adapters\DividerAdapter::class,
'bookmark' => \RedberryProducts\MdNotion\Adapters\BookmarkAdapter::class,
'image' => \RedberryProducts\MdNotion\Adapters\ImageAdapter::class,
'file' => \RedberryProducts\MdNotion\Adapters\FileAdapter::class,
'video' => \RedberryProducts\MdNotion\Adapters\VideoAdapter::class,
'column_list' => \RedberryProducts\MdNotion\Adapters\ColumnListAdapter::class,
'column' => \RedberryProducts\MdNotion\Adapters\ColumnAdapter::class,
'table' => \RedberryProducts\MdNotion\Adapters\TableAdapter::class,
'table_row' => \RedberryProducts\MdNotion\Adapters\TableRowAdapter::class,
'paragraph' => \Redberry\MdNotion\Adapters\ParagraphAdapter::class,
'heading_1' => \Redberry\MdNotion\Adapters\HeadingAdapter::class,
'heading_2' => \Redberry\MdNotion\Adapters\HeadingAdapter::class,
'heading_3' => \Redberry\MdNotion\Adapters\HeadingAdapter::class,
'bulleted_list_item' => \Redberry\MdNotion\Adapters\BulletedListItemAdapter::class,
'numbered_list_item' => \Redberry\MdNotion\Adapters\NumberedListItemAdapter::class,
'to_do' => \Redberry\MdNotion\Adapters\ToDoAdapter::class,
'toggle' => \Redberry\MdNotion\Adapters\ToggleAdapter::class,
'code' => \Redberry\MdNotion\Adapters\CodeAdapter::class,
'quote' => \Redberry\MdNotion\Adapters\QuoteAdapter::class,
'callout' => \Redberry\MdNotion\Adapters\CalloutAdapter::class,
'divider' => \Redberry\MdNotion\Adapters\DividerAdapter::class,
'bookmark' => \Redberry\MdNotion\Adapters\BookmarkAdapter::class,
'image' => \Redberry\MdNotion\Adapters\ImageAdapter::class,
'file' => \Redberry\MdNotion\Adapters\FileAdapter::class,
'video' => \Redberry\MdNotion\Adapters\VideoAdapter::class,
'column_list' => \Redberry\MdNotion\Adapters\ColumnListAdapter::class,
'column' => \Redberry\MdNotion\Adapters\ColumnAdapter::class,
'table' => \Redberry\MdNotion\Adapters\TableAdapter::class,
'table_row' => \Redberry\MdNotion\Adapters\TableRowAdapter::class,
],
];
6 changes: 3 additions & 3 deletions examples/mdnotion-facade-full-example.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
use Illuminate\View\Engines\EngineResolver;
use Illuminate\View\Factory;
use Illuminate\View\FileViewFinder;
use RedberryProducts\MdNotion\Facades\MdNotion;
use RedberryProducts\MdNotion\MdNotionServiceProvider;
use RedberryProducts\MdNotion\SDK\Notion;
use Redberry\MdNotion\Facades\MdNotion;
use Redberry\MdNotion\MdNotionServiceProvider;
use Redberry\MdNotion\SDK\Notion;

// Set up Laravel container
$container = new Container;
Expand Down
6 changes: 3 additions & 3 deletions examples/mdnotion-facade-read-example.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
use Illuminate\View\Engines\EngineResolver;
use Illuminate\View\Factory;
use Illuminate\View\FileViewFinder;
use RedberryProducts\MdNotion\Facades\MdNotion;
use RedberryProducts\MdNotion\MdNotionServiceProvider;
use RedberryProducts\MdNotion\SDK\Notion;
use Redberry\MdNotion\Facades\MdNotion;
use Redberry\MdNotion\MdNotionServiceProvider;
use Redberry\MdNotion\SDK\Notion;

// Set up Laravel container
$container = new Container;
Expand Down
12 changes: 6 additions & 6 deletions examples/page-reader-example.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
use Illuminate\View\Engines\EngineResolver;
use Illuminate\View\Factory;
use Illuminate\View\FileViewFinder;
use RedberryProducts\MdNotion\Adapters\BlockAdapterFactory;
use RedberryProducts\MdNotion\SDK\Notion;
use RedberryProducts\MdNotion\Services\BlockRegistry;
use RedberryProducts\MdNotion\Services\DatabaseReader;
use RedberryProducts\MdNotion\Services\DatabaseTable;
use RedberryProducts\MdNotion\Services\PageReader;
use Redberry\MdNotion\Adapters\BlockAdapterFactory;
use Redberry\MdNotion\SDK\Notion;
use Redberry\MdNotion\Services\BlockRegistry;
use Redberry\MdNotion\Services\DatabaseReader;
use Redberry\MdNotion\Services\DatabaseTable;
use Redberry\MdNotion\Services\PageReader;

// Set up Laravel container
$container = new Container;
Expand Down
2 changes: 1 addition & 1 deletion examples/sdk-example.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require_once __DIR__.'/../vendor/autoload.php';

use RedberryProducts\MdNotion\SDK\Notion;
use Redberry\MdNotion\SDK\Notion;

$token = include __DIR__.'/../notion-token.php';
$notion = new Notion($token, '2025-09-03');
Expand Down
4 changes: 2 additions & 2 deletions examples/table-fetch-example.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Illuminate\View\Engines\EngineResolver;
use Illuminate\View\Factory;
use Illuminate\View\FileViewFinder;
use RedberryProducts\MdNotion\Adapters\TableAdapter;
use Redberry\MdNotion\Adapters\TableAdapter;

// Set up Laravel container
$container = new Container;
Expand Down Expand Up @@ -56,7 +56,7 @@
// Bind view factory to container
$container->instance('view', $factory);
View::setFacadeApplication($container);
use RedberryProducts\MdNotion\SDK\Notion;
use Redberry\MdNotion\SDK\Notion;

// Load table JSON
$tableJson = file_get_contents(__DIR__.'/../BlockJsonExamples/TableJson.json');
Expand Down
4 changes: 2 additions & 2 deletions examples/toggle-fetch-example.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Illuminate\View\Engines\EngineResolver;
use Illuminate\View\Factory;
use Illuminate\View\FileViewFinder;
use RedberryProducts\MdNotion\Adapters\ToggleAdapter;
use Redberry\MdNotion\Adapters\ToggleAdapter;

// Set up Laravel container
$container = new Container;
Expand Down Expand Up @@ -56,7 +56,7 @@
// Bind view factory to container
$container->instance('view', $factory);
View::setFacadeApplication($container);
use RedberryProducts\MdNotion\SDK\Notion;
use Redberry\MdNotion\SDK\Notion;

// Load toggle JSON
$toggleJson = file_get_contents(__DIR__.'/../BlockJsonExamples/ToggleJson.json');
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require_once __DIR__.'/vendor/autoload.php';

use RedberryProducts\MdNotion\SDK\Notion;
use Redberry\MdNotion\SDK\Notion;

$token = include __DIR__.'/notion-token.php';
$notion = new Notion($token, '2025-09-03');
Expand Down
2 changes: 1 addition & 1 deletion mdnotion_prd.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The mission of MdNotion is to provide Laravel developers with an easy, reliable,
## Usage goal

```php
use RedberryProducts\Facades\MdNotion;
use Redberry\Facades\MdNotion;

$pageId = '263d9316605a806f9e95e1377a46ff3e';
$MdNotion = MdNotion::make($pageId);
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
backupStaticProperties="false"
>
<testsuites>
<testsuite name="RedberryProducts Test Suite">
<testsuite name="Redberry Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
Expand Down
6 changes: 3 additions & 3 deletions src/Adapters/BaseBlockAdapter.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace RedberryProducts\MdNotion\Adapters;
namespace Redberry\MdNotion\Adapters;

use Illuminate\Support\Facades\View;
use RedberryProducts\MdNotion\SDK\Notion;
use Redberry\MdNotion\SDK\Notion;

abstract class BaseBlockAdapter implements BlockAdapterInterface
{
Expand Down Expand Up @@ -101,7 +101,7 @@ protected function processAnnotations(array $annotations, string $text): string
/**
* Process rich text blocks from Notion
*
* @param \RedberryProducts\MdNotion\DTOs\RichTextDTO[] $richText Array of rich text DTOs
* @param \Redberry\MdNotion\DTOs\RichTextDTO[] $richText Array of rich text DTOs
*/
protected function processRichText(array $richText): string
{
Expand Down
4 changes: 2 additions & 2 deletions src/Adapters/BlockAdapterFactory.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace RedberryProducts\MdNotion\Adapters;
namespace Redberry\MdNotion\Adapters;

use Illuminate\Support\Arr;
use RedberryProducts\MdNotion\SDK\Notion;
use Redberry\MdNotion\SDK\Notion;

class BlockAdapterFactory
{
Expand Down
2 changes: 1 addition & 1 deletion src/Adapters/BlockAdapterInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RedberryProducts\MdNotion\Adapters;
namespace Redberry\MdNotion\Adapters;

interface BlockAdapterInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/Adapters/BookmarkAdapter.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace RedberryProducts\MdNotion\Adapters;
namespace Redberry\MdNotion\Adapters;

use RedberryProducts\MdNotion\DTOs\BookmarkDTO;
use Redberry\MdNotion\DTOs\BookmarkDTO;

class BookmarkAdapter extends BaseBlockAdapter
{
Expand Down
4 changes: 2 additions & 2 deletions src/Adapters/BulletedListItemAdapter.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace RedberryProducts\MdNotion\Adapters;
namespace Redberry\MdNotion\Adapters;

use RedberryProducts\MdNotion\DTOs\BulletedListItemDTO;
use Redberry\MdNotion\DTOs\BulletedListItemDTO;

class BulletedListItemAdapter extends BaseBlockAdapter
{
Expand Down
4 changes: 2 additions & 2 deletions src/Adapters/CalloutAdapter.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace RedberryProducts\MdNotion\Adapters;
namespace Redberry\MdNotion\Adapters;

use RedberryProducts\MdNotion\DTOs\CalloutDTO;
use Redberry\MdNotion\DTOs\CalloutDTO;

class CalloutAdapter extends BaseBlockAdapter
{
Expand Down
4 changes: 2 additions & 2 deletions src/Adapters/CodeAdapter.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace RedberryProducts\MdNotion\Adapters;
namespace Redberry\MdNotion\Adapters;

use RedberryProducts\MdNotion\DTOs\CodeDTO;
use Redberry\MdNotion\DTOs\CodeDTO;

class CodeAdapter extends BaseBlockAdapter
{
Expand Down
Loading