Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(note): fix docs #215 #217

Merged
merged 2 commits into from
Aug 1, 2024
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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Get GroupTypeRoles ([PR197](https://github.com/5pm-HDH/churchtools-api/pull/197))
- PHP coding standard ([PR193](https://github.com/5pm-HDH/churchtools-api/pull/193))
- Added new property 'postsEnabled' to the group type model ([PR204](https://github.com/5pm-HDH/churchtools-api/pull/204))
- Add Note for Group and SongArrangement ([PR216](https://github.com/5pm-HDH/churchtools-api/pull/216))
- Add Note for Group and SongArrangement ([PR216](https://github.com/5pm-HDH/churchtools-api/pull/216), [PR217](https://github.com/5pm-HDH/churchtools-api/pull/217))
- Login with Session Cookie ([PR207](https://github.com/5pm-HDH/churchtools-api/pull/207))

### Changed
Expand Down
46 changes: 42 additions & 4 deletions docs/out/GroupAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -618,16 +618,54 @@

Retrieve all notes:

(EXAMPLE CODE IS MISSING)
```php
use CTApi\Models\Common\Note\NoteRequest;

$notes = NoteRequest::forGroup(212)->get();
var_dump( $notes[0]->getText());
// Output: "Hello new comment!"

var_dump( $notes[0]->getDomainId());
// Output: "17"

var_dump( $notes[0]->getDomainType());
// Output: "group"

var_dump( $notes[0]->getId());
// Output: "212"


```

Create new note:

(EXAMPLE CODE IS MISSING)
```php
use CTApi\Models\Common\Note\NoteRequest;

$note = NoteRequest::forGroup(52)->create("Add new comment.");
var_dump( $note->getText());
// Output: "Add new comment."


```

Update note:

(EXAMPLE CODE IS MISSING)
```php
use CTApi\Models\Common\Note\NoteRequest;

$note = NoteRequest::forGroup(52)->update(25, "Updated comment.");
var_dump( $note->getText());
// Output: "Updated comment."


```

Delete note:

(EXAMPLE CODE IS MISSING)
```php
use CTApi\Models\Common\Note\NoteRequest;

NoteRequest::forGroup(52)->delete(25);

```
26 changes: 25 additions & 1 deletion docs/out/SongAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,31 @@

## Create Song-Arrangement Notes

(EXAMPLE CODE IS MISSING)
```php
use CTApi\Models\Common\Note\NoteRequest;

$notes = NoteRequest::forSongArrangement(21)->get();

var_dump( $notes[0]->getText());
// Output: "Hello new comment!"

var_dump( $notes[0]->getDomainId());
// Output: "17"

var_dump( $notes[0]->getDomainType());
// Output: "group"

var_dump( $notes[0]->getId());
// Output: "212"


$securityLevelId = 2;
$note = NoteRequest::forSongArrangement(21)->create("New comment", $securityLevelId);
$note = NoteRequest::forSongArrangement(21)->update(2, "New comment");

NoteRequest::forSongArrangement(21)->delete(2);

```

## Retrieve Data from CCLI

Expand Down
8 changes: 4 additions & 4 deletions docs/src/ressources/GroupAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@

Retrieve all notes:

{{ \CTApi\Test\Unit\Docs\NoteRequest.testRequestNotes }}
{{ \CTApi\Test\Unit\Docs\NoteRequestTest.testRequestNotes }}

Create new note:

{{ \CTApi\Test\Unit\Docs\NoteRequest.testCreateNote }}
{{ \CTApi\Test\Unit\Docs\NoteRequestTest.testCreateNote }}

Update note:

{{ \CTApi\Test\Unit\Docs\NoteRequest.testUpdateNote }}
{{ \CTApi\Test\Unit\Docs\NoteRequestTest.testUpdateNote }}

Delete note:

{{ \CTApi\Test\Unit\Docs\NoteRequest.testDeleteNote }}
{{ \CTApi\Test\Unit\Docs\NoteRequestTest.testDeleteNote }}
2 changes: 1 addition & 1 deletion docs/src/ressources/SongAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

## Create Song-Arrangement Notes

{{ \CTApi\Test\Unit\Docs\NoteRequest.testUpdateSongArrangementNotes }}
{{ \CTApi\Test\Unit\Docs\NoteRequestTest.testUpdateSongArrangementNotes }}

## Retrieve Data from CCLI

Expand Down
Loading