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
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "5a7add6", "specHash": "d028758", "version": "10.10.0" }
{ "engineHash": "2e559a0", "specHash": "d028758", "version": "10.10.0" }
2 changes: 1 addition & 1 deletion docs/notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the endpoint docs at
<!-- sample post_notes_convert_v2026.0 -->

```python
downscoped_client.notes.create_note_convert_v2026_r0(
client.notes.create_note_convert_v2026_r0(
markdown_content,
FolderReferenceV2026R0(id="0"),
note_name,
Expand Down
20 changes: 5 additions & 15 deletions test/notes.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from box_sdk_gen.internal.utils import to_string

from box_sdk_gen.schemas.access_token import AccessToken

from box_sdk_gen.schemas.v2026_r0.notes_convert_response_v2026_r0 import (
NotesConvertResponseV2026R0,
)
Expand All @@ -20,8 +18,6 @@

from box_sdk_gen.client import BoxClient

from box_sdk_gen.box.developer_token_auth import BoxDeveloperTokenAuth

from test.commons import get_default_client_with_user_subject

client: BoxClient = get_default_client_with_user_subject(get_env_var('USER_ID'))
Expand All @@ -32,17 +28,11 @@ def testConvertMarkdownToBoxNote():
markdown_content: str = r"""# Heading

Some text"""
downscoped_token: AccessToken = client.auth.downscope_token(['item_upload'])
downscoped_client: BoxClient = BoxClient(
auth=BoxDeveloperTokenAuth(token=downscoped_token.access_token)
)
response: NotesConvertResponseV2026R0 = (
downscoped_client.notes.create_note_convert_v2026_r0(
markdown_content,
FolderReferenceV2026R0(id='0'),
note_name,
content_format=CreateNoteConvertV2026R0ContentFormat.MARKDOWN,
)
response: NotesConvertResponseV2026R0 = client.notes.create_note_convert_v2026_r0(
markdown_content,
FolderReferenceV2026R0(id='0'),
note_name,
content_format=CreateNoteConvertV2026R0ContentFormat.MARKDOWN,
)
assert not response.id == ''
assert to_string(response.type) == 'file'
Expand Down
Loading