Skip to content

Commit bff13ff

Browse files
authored
Merge pull request #8 from gponty/removeapikey
2 parents 66762fc + 538a454 commit bff13ff

File tree

4 files changed

+229
-254
lines changed

4 files changed

+229
-254
lines changed

README.md

Lines changed: 41 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,59 @@
1-
# Symfony Monday Api
1+
# Symfony Monday API
22

3-
This is a Symfony 6/7 Bundle helps you to use monday API v2 : https://developer.monday.com/apps/docs/mondayapi.
4-
It use version 2023-10.
3+
This is a Symfony 6/7 Bundle that helps you use the Monday.com API v2:
4+
https://developer.monday.com/apps/docs/mondayapi
5+
It uses version `2023-10` of the API.
56

67
## Installation
78

8-
**1** Add to composer.json to the `require` key
9+
Install the package via Composer:
910

10-
``` shell
11-
composer require gponty/symfony-monday-api-bundle
11+
```bash
12+
composer require gponty/symfony-monday-api-bundle
1213
```
1314

14-
**2** Add to local .env file
15-
16-
``` shell
17-
MONDAY_API_KEY=your_token
18-
19-
```
15+
## Usage
2016

21-
**3** Add to framework config file config/packages/framework.yml
17+
Inject the service into your controller:
2218

23-
``` shell
24-
monday:
25-
api_key: '%env(MONDAY_API_KEY)%'
19+
```php
20+
public function __construct(
21+
readonly MondayApiService $mondayApiService
22+
) {}
2623
```
2724

25+
Use the service like this:
26+
27+
```php
28+
$query = '{
29+
boards(ids: 123456789) {
30+
id
31+
name
32+
groups {
33+
id
34+
title
35+
items_page(limit: 100, page: 1) {
36+
cursor
37+
items {
38+
id
39+
name
40+
}
41+
}
42+
}
43+
}
44+
}';
2845

29-
## Usage
46+
$this->mondayApiService->setApiKey('your-api-key-here');
47+
$response = $this->mondayApiService->request($query);
48+
```
3049

31-
Inject the service in your controller :
50+
## Changelog
3251

33-
``` php
34-
public function __construct(readonly MondayApiService $mondayApiService)
35-
{ }
36-
```
52+
### Version 1.0.7
3753

38-
Use the service :
39-
40-
``` php
41-
$query = '{
42-
boards(ids: 123456789) {
43-
id
44-
name
45-
groups {
46-
id
47-
title
48-
items_page(limit: 100, page:1) {
49-
cursor
50-
items{
51-
id
52-
name
53-
}
54-
}
55-
}
56-
}';
57-
$response = $this->mondayApiService->request($query);
58-
```
54+
You must now call `setApiKey()` before using the `request()` method.
55+
You MUST also remove the `config/packages/monday.yaml` file if it exists.
5956

6057
## License
6158

62-
This bundle is under the MIT license. See the complete license in the bundle.
59+
This bundle is released under the MIT License. See the LICENSE file for more information.

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "gponty/symfony-monday-api-bundle",
33
"description": "Service to use api Monday.com in Symfony",
44
"type": "symfony-bundle",
5+
"version": "dev-main",
56
"require": {
67
"php": ">=8.1",
78
"symfony/http-kernel": "^6.4|^7.0",
@@ -19,7 +20,7 @@
1920
"authors": [
2021
{
2122
"name": "Guillaume Ponty",
22-
"email": "g.ponty@dev-web.io"
23+
"email": "guillaume@ponty.dev"
2324
}
2425
],
2526
"require-dev": {

0 commit comments

Comments
 (0)