You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,14 +42,14 @@ If the project maintainer has any additional requirements, you will find them li
42
42
43
43
-**[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](https://pear.php.net/package/PHP_CodeSniffer).
44
44
45
-
-**Add tests!** - Your patch won't be accepted if it doesn't have tests.
45
+
-**Add tests!** - Your pull request won't be accepted if it doesn't have tests. When implementing new tests, please use the Pest PHP framework. You can find examples and detailed documentation at [pestphp.com](https://pestphp.com/).
46
46
47
-
-**Document any change in behaviour** - Make sure the `README.md`and any other relevant documentation are kept up-to-date.
47
+
-**Document any change in behaviour** - Make sure the `README.md`is kept up-to-date. If you implement a new feature or propose significant changes to an existing feature, you will have to provide the documentation for these as well. The maintainers of the project will inform you about the process if necessary.
48
48
49
49
-**Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option.
50
50
51
51
-**One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
52
52
53
53
-**Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
[](https://packagist.org/packages/fiveam-code/laravel-notion-api)
@@ -14,90 +11,156 @@ This package provides a simple and crisp way to access the Notion API endpoints,
14
11
15
12
## Installation
16
13
17
-
You can install the package via composer:
14
+
The package is compatible with Laravel 8, 9 and 10 with their respective PHP versions.
18
15
19
-
```bash
20
-
composer require fiveam-code/laravel-notion-api
21
-
```
16
+
1. Install the package via composer:
22
17
23
-
### Authorization
18
+
```bash
19
+
composer require fiveam-code/laravel-notion-api
20
+
```
24
21
25
-
The Notion API requires an access token and a Notion integration, [the Notion documentation](https://developers.notion.com/docs/getting-started#before-we-begin) explains how this works. It's important to grant access to the integration within your Notion account to enable the API access.
22
+
2. Get your Notion API access token like explained in [their documentation](https://developers.notion.com/). It's also
23
+
important to grant access to the integration within your Notion pages, which is described in the developer
24
+
documentation at Notion as well.
26
25
27
-
Add your Notion API token to your `.env` file:
26
+
3.Add a new line to your applications`.env` file:
28
27
29
-
```
30
-
NOTION_API_TOKEN="$YOUR_ACCESS_TOKEN"
31
-
```
28
+
```bash
29
+
NOTION_API_TOKEN="$YOUR_ACCESS_TOKEN"
30
+
```
32
31
33
-
## Usage
32
+
4. You're ready to go! You can now access Notion endpoints through the `Notion` facade:
34
33
35
-
Head over to the [Documentation](https://5amco.de/docs) of this package.
34
+
```php
35
+
use \Notion;
36
36
37
-
### 🔥 Code Examples to jumpstart your Notion API Project
You can find even more usage examples by checking out the package tests in the `/tests` directory.
143
+
The tests are making use of Pest PHP and we are working on switching from PHPUNIT to it (todo sentence).
144
+
145
+
If you want to run the tests in your CLI:
93
146
94
147
```bash
95
-
vendor/bin/phpunit tests
148
+
vendor/bin/pest tests
96
149
```
97
150
98
151
## Support
99
152
100
-
If you use this package in one of your projects or just want to support our development, consider becoming a [Patreon](https://www.patreon.com/bePatron?u=56662485)!
153
+
If you use this package in one of your projects or want to support our development, consider becoming
154
+
a [Patreon Supporter](https://www.patreon.com/bePatron?u=56662485)!
The development of this package is supported by [Tinkerwell](https://tinkerwell.app/).
163
+
101
164
102
165
## Contributing
103
166
@@ -107,19 +170,15 @@ Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
107
170
108
171
If you discover any security related issues, please email hello@dianaweb.dev instead of using the issue tracker.
109
172
110
-
## Used By
111
-
112
-
- Julien Nahum created [notionforms.io](https://notionforms.io) with [laravel-notion-api](https://github.com/5am-code/laravel-notion-api), which allows you to easily create custom forms, based on your selected database within notion.
113
-
-[GitHub Notion Sync](https://githubnotionsync.com/), a service by [Beyond Code](https://beyondco.de) to sync the issues of multiple GitHub repositories into a Notion database
114
-
-[Notion Invoice](https://notioninvoice.com/), the first premium invoicing solution for freelancers and businesses that use Notion. Create beautiful PDF invoices from your Notion data.
115
-
116
-
Using this package in your project? Open a PR to add it in this section!
0 commit comments