rixl 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- feeds/feeds_request_builder.py +38 -0
- feeds/item/creators/creators_request_builder.py +38 -0
- feeds/item/creators/item/with_creator_item_request_builder.py +94 -0
- feeds/item/item/with_post_item_request_builder.py +82 -0
- feeds/item/with_feed_item_request_builder.py +119 -0
- images/images_request_builder.py +127 -0
- images/item/with_image_item_request_builder.py +125 -0
- images/upload/complete/complete_request_builder.py +93 -0
- images/upload/init/init_request_builder.py +92 -0
- images/upload/upload_request_builder.py +43 -0
- models/audio_track.py +79 -0
- models/audio_track_delete.py +51 -0
- models/chapter.py +59 -0
- models/file.py +86 -0
- models/file_status.py +10 -0
- models/github_com_rixlhq_api_db_sqlc/plan_type.py +8 -0
- models/github_com_rixlhq_api_db_sqlc/video_quality.py +7 -0
- models/github_com_rixlhq_api_internal_errors/error_response.py +65 -0
- models/github_com_rixlhq_api_internal_videos/video_response.py +107 -0
- models/github_com_rixlhq_api_internal_videos_handler_upload/complete_request.py +50 -0
- models/github_com_rixlhq_api_internal_videos_handler_upload/init_response.py +63 -0
- models/github_com_rixlhq_api_internal_videos_types/chapter_input.py +51 -0
- models/image.py +74 -0
- models/internal_images_handler/complete_request.py +54 -0
- models/internal_images_handler/init_response.py +55 -0
- models/internal_images_handler/upload_init_request.py +54 -0
- models/internal_videos_handler_subtitles/language_response.py +51 -0
- models/pagination/paginated_response_image.py +61 -0
- models/pagination/paginated_response_post.py +61 -0
- models/pagination/paginated_response_video.py +61 -0
- models/pagination/pagination.py +58 -0
- models/post.py +99 -0
- models/post_type.py +6 -0
- models/subtitle.py +75 -0
- models/subtitle_delete.py +51 -0
- models/update_chapters_request.py +57 -0
- models/update_chapters_response.py +58 -0
- models/video.py +107 -0
- models/video_upload_init_request.py +65 -0
- rixl-1.0.0.dist-info/METADATA +183 -0
- rixl-1.0.0.dist-info/RECORD +61 -0
- rixl-1.0.0.dist-info/WHEEL +5 -0
- rixl-1.0.0.dist-info/licenses/LICENSE +21 -0
- rixl-1.0.0.dist-info/top_level.txt +5 -0
- rixl_client.py +70 -0
- videos/item/audio_tracks/audio_tracks_request_builder.py +90 -0
- videos/item/audio_tracks/item/with_lang_code_item_request_builder.py +117 -0
- videos/item/audio_tracks/item/with_lang_code_put_request_body.py +51 -0
- videos/item/chapters/chapters_request_builder.py +134 -0
- videos/item/delete/delete_request_builder.py +82 -0
- videos/item/subtitles/item/with_lang_code_item_request_builder.py +117 -0
- videos/item/subtitles/item/with_lang_code_put_request_body.py +51 -0
- videos/item/subtitles/subtitles_request_builder.py +90 -0
- videos/item/thumbnail/thumbnail_put_request_body.py +47 -0
- videos/item/thumbnail/thumbnail_request_builder.py +93 -0
- videos/item/with_video_item_request_builder.py +135 -0
- videos/languages/languages_request_builder.py +75 -0
- videos/upload/complete/complete_request_builder.py +93 -0
- videos/upload/init/init_request_builder.py +92 -0
- videos/upload/upload_request_builder.py +43 -0
- videos/videos_request_builder.py +137 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from collections.abc import Callable
|
|
3
|
+
from kiota_abstractions.base_request_builder import BaseRequestBuilder
|
|
4
|
+
from kiota_abstractions.get_path_parameters import get_path_parameters
|
|
5
|
+
from kiota_abstractions.request_adapter import RequestAdapter
|
|
6
|
+
from typing import Any, Optional, TYPE_CHECKING, Union
|
|
7
|
+
|
|
8
|
+
if TYPE_CHECKING:
|
|
9
|
+
from .item.with_feed_item_request_builder import WithFeedItemRequestBuilder
|
|
10
|
+
|
|
11
|
+
class FeedsRequestBuilder(BaseRequestBuilder):
|
|
12
|
+
"""
|
|
13
|
+
Builds and executes requests for operations under /feeds
|
|
14
|
+
"""
|
|
15
|
+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
|
|
16
|
+
"""
|
|
17
|
+
Instantiates a new FeedsRequestBuilder and sets the default values.
|
|
18
|
+
param path_parameters: The raw url or the url-template parameters for the request.
|
|
19
|
+
param request_adapter: The request adapter to use to execute the requests.
|
|
20
|
+
Returns: None
|
|
21
|
+
"""
|
|
22
|
+
super().__init__(request_adapter, "{+baseurl}/feeds", path_parameters)
|
|
23
|
+
|
|
24
|
+
def by_feed_id(self,feed_id: str) -> WithFeedItemRequestBuilder:
|
|
25
|
+
"""
|
|
26
|
+
Gets an item from the rixl_sdk.feeds.item collection
|
|
27
|
+
param feed_id: Feed ID
|
|
28
|
+
Returns: WithFeedItemRequestBuilder
|
|
29
|
+
"""
|
|
30
|
+
if feed_id is None:
|
|
31
|
+
raise TypeError("feed_id cannot be null.")
|
|
32
|
+
from .item.with_feed_item_request_builder import WithFeedItemRequestBuilder
|
|
33
|
+
|
|
34
|
+
url_tpl_params = get_path_parameters(self.path_parameters)
|
|
35
|
+
url_tpl_params["feedId"] = feed_id
|
|
36
|
+
return WithFeedItemRequestBuilder(self.request_adapter, url_tpl_params)
|
|
37
|
+
|
|
38
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from collections.abc import Callable
|
|
3
|
+
from kiota_abstractions.base_request_builder import BaseRequestBuilder
|
|
4
|
+
from kiota_abstractions.get_path_parameters import get_path_parameters
|
|
5
|
+
from kiota_abstractions.request_adapter import RequestAdapter
|
|
6
|
+
from typing import Any, Optional, TYPE_CHECKING, Union
|
|
7
|
+
|
|
8
|
+
if TYPE_CHECKING:
|
|
9
|
+
from .item.with_creator_item_request_builder import WithCreatorItemRequestBuilder
|
|
10
|
+
|
|
11
|
+
class CreatorsRequestBuilder(BaseRequestBuilder):
|
|
12
|
+
"""
|
|
13
|
+
Builds and executes requests for operations under /feeds/{feedId}/creators
|
|
14
|
+
"""
|
|
15
|
+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
|
|
16
|
+
"""
|
|
17
|
+
Instantiates a new CreatorsRequestBuilder and sets the default values.
|
|
18
|
+
param path_parameters: The raw url or the url-template parameters for the request.
|
|
19
|
+
param request_adapter: The request adapter to use to execute the requests.
|
|
20
|
+
Returns: None
|
|
21
|
+
"""
|
|
22
|
+
super().__init__(request_adapter, "{+baseurl}/feeds/{feedId}/creators", path_parameters)
|
|
23
|
+
|
|
24
|
+
def by_creator_id(self,creator_id: str) -> WithCreatorItemRequestBuilder:
|
|
25
|
+
"""
|
|
26
|
+
Gets an item from the rixl_sdk.feeds.item.creators.item collection
|
|
27
|
+
param creator_id: Creator ID
|
|
28
|
+
Returns: WithCreatorItemRequestBuilder
|
|
29
|
+
"""
|
|
30
|
+
if creator_id is None:
|
|
31
|
+
raise TypeError("creator_id cannot be null.")
|
|
32
|
+
from .item.with_creator_item_request_builder import WithCreatorItemRequestBuilder
|
|
33
|
+
|
|
34
|
+
url_tpl_params = get_path_parameters(self.path_parameters)
|
|
35
|
+
url_tpl_params["creatorId"] = creator_id
|
|
36
|
+
return WithCreatorItemRequestBuilder(self.request_adapter, url_tpl_params)
|
|
37
|
+
|
|
38
|
+
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from collections.abc import Callable
|
|
3
|
+
from dataclasses import dataclass, field
|
|
4
|
+
from kiota_abstractions.base_request_builder import BaseRequestBuilder
|
|
5
|
+
from kiota_abstractions.base_request_configuration import RequestConfiguration
|
|
6
|
+
from kiota_abstractions.default_query_parameters import QueryParameters
|
|
7
|
+
from kiota_abstractions.get_path_parameters import get_path_parameters
|
|
8
|
+
from kiota_abstractions.method import Method
|
|
9
|
+
from kiota_abstractions.request_adapter import RequestAdapter
|
|
10
|
+
from kiota_abstractions.request_information import RequestInformation
|
|
11
|
+
from kiota_abstractions.request_option import RequestOption
|
|
12
|
+
from kiota_abstractions.serialization import Parsable, ParsableFactory
|
|
13
|
+
from typing import Any, Optional, TYPE_CHECKING, Union
|
|
14
|
+
from warnings import warn
|
|
15
|
+
|
|
16
|
+
if TYPE_CHECKING:
|
|
17
|
+
from .....models.github_com_rixlhq_api_internal_errors.error_response import ErrorResponse
|
|
18
|
+
from .....models.pagination.paginated_response_post import PaginatedResponsePost
|
|
19
|
+
|
|
20
|
+
class WithCreatorItemRequestBuilder(BaseRequestBuilder):
|
|
21
|
+
"""
|
|
22
|
+
Builds and executes requests for operations under /feeds/{feedId}/creators/{creatorId}
|
|
23
|
+
"""
|
|
24
|
+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
|
|
25
|
+
"""
|
|
26
|
+
Instantiates a new WithCreatorItemRequestBuilder and sets the default values.
|
|
27
|
+
param path_parameters: The raw url or the url-template parameters for the request.
|
|
28
|
+
param request_adapter: The request adapter to use to execute the requests.
|
|
29
|
+
Returns: None
|
|
30
|
+
"""
|
|
31
|
+
super().__init__(request_adapter, "{+baseurl}/feeds/{feedId}/creators/{creatorId}{?limit*,offset*}", path_parameters)
|
|
32
|
+
|
|
33
|
+
async def get(self,request_configuration: Optional[RequestConfiguration[WithCreatorItemRequestBuilderGetQueryParameters]] = None) -> Optional[PaginatedResponsePost]:
|
|
34
|
+
"""
|
|
35
|
+
Retrieve posts in a feed by a specific creator, with pagination.
|
|
36
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
|
37
|
+
Returns: Optional[PaginatedResponsePost]
|
|
38
|
+
"""
|
|
39
|
+
request_info = self.to_get_request_information(
|
|
40
|
+
request_configuration
|
|
41
|
+
)
|
|
42
|
+
from .....models.github_com_rixlhq_api_internal_errors.error_response import ErrorResponse
|
|
43
|
+
|
|
44
|
+
error_mapping: dict[str, type[ParsableFactory]] = {
|
|
45
|
+
"400": ErrorResponse,
|
|
46
|
+
"500": ErrorResponse,
|
|
47
|
+
}
|
|
48
|
+
if not self.request_adapter:
|
|
49
|
+
raise Exception("Http core is null")
|
|
50
|
+
from .....models.pagination.paginated_response_post import PaginatedResponsePost
|
|
51
|
+
|
|
52
|
+
return await self.request_adapter.send_async(request_info, PaginatedResponsePost, error_mapping)
|
|
53
|
+
|
|
54
|
+
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WithCreatorItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
|
|
55
|
+
"""
|
|
56
|
+
Retrieve posts in a feed by a specific creator, with pagination.
|
|
57
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
|
58
|
+
Returns: RequestInformation
|
|
59
|
+
"""
|
|
60
|
+
request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
|
|
61
|
+
request_info.configure(request_configuration)
|
|
62
|
+
request_info.headers.try_add("Accept", "application/json")
|
|
63
|
+
return request_info
|
|
64
|
+
|
|
65
|
+
def with_url(self,raw_url: str) -> WithCreatorItemRequestBuilder:
|
|
66
|
+
"""
|
|
67
|
+
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
|
68
|
+
param raw_url: The raw URL to use for the request builder.
|
|
69
|
+
Returns: WithCreatorItemRequestBuilder
|
|
70
|
+
"""
|
|
71
|
+
if raw_url is None:
|
|
72
|
+
raise TypeError("raw_url cannot be null.")
|
|
73
|
+
return WithCreatorItemRequestBuilder(self.request_adapter, raw_url)
|
|
74
|
+
|
|
75
|
+
@dataclass
|
|
76
|
+
class WithCreatorItemRequestBuilderGetQueryParameters():
|
|
77
|
+
"""
|
|
78
|
+
Retrieve posts in a feed by a specific creator, with pagination.
|
|
79
|
+
"""
|
|
80
|
+
# Maximum number of items to return in a single request. <br> **Default:** `25`
|
|
81
|
+
limit: Optional[int] = None
|
|
82
|
+
|
|
83
|
+
# Starting point of the result set. <br>To get page 2 with a limit of 25, set `offset` to `25`. <br> **Default:** `0`
|
|
84
|
+
offset: Optional[int] = None
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
@dataclass
|
|
88
|
+
class WithCreatorItemRequestBuilderGetRequestConfiguration(RequestConfiguration[WithCreatorItemRequestBuilderGetQueryParameters]):
|
|
89
|
+
"""
|
|
90
|
+
Configuration for the request such as headers, query parameters, and middleware options.
|
|
91
|
+
"""
|
|
92
|
+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
|
|
93
|
+
|
|
94
|
+
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from collections.abc import Callable
|
|
3
|
+
from dataclasses import dataclass, field
|
|
4
|
+
from kiota_abstractions.base_request_builder import BaseRequestBuilder
|
|
5
|
+
from kiota_abstractions.base_request_configuration import RequestConfiguration
|
|
6
|
+
from kiota_abstractions.default_query_parameters import QueryParameters
|
|
7
|
+
from kiota_abstractions.get_path_parameters import get_path_parameters
|
|
8
|
+
from kiota_abstractions.method import Method
|
|
9
|
+
from kiota_abstractions.request_adapter import RequestAdapter
|
|
10
|
+
from kiota_abstractions.request_information import RequestInformation
|
|
11
|
+
from kiota_abstractions.request_option import RequestOption
|
|
12
|
+
from kiota_abstractions.serialization import Parsable, ParsableFactory
|
|
13
|
+
from typing import Any, Optional, TYPE_CHECKING, Union
|
|
14
|
+
from warnings import warn
|
|
15
|
+
|
|
16
|
+
if TYPE_CHECKING:
|
|
17
|
+
from ....models.github_com_rixlhq_api_internal_errors.error_response import ErrorResponse
|
|
18
|
+
from ....models.post import Post
|
|
19
|
+
|
|
20
|
+
class WithPostItemRequestBuilder(BaseRequestBuilder):
|
|
21
|
+
"""
|
|
22
|
+
Builds and executes requests for operations under /feeds/{feedId}/{postId}
|
|
23
|
+
"""
|
|
24
|
+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
|
|
25
|
+
"""
|
|
26
|
+
Instantiates a new WithPostItemRequestBuilder and sets the default values.
|
|
27
|
+
param path_parameters: The raw url or the url-template parameters for the request.
|
|
28
|
+
param request_adapter: The request adapter to use to execute the requests.
|
|
29
|
+
Returns: None
|
|
30
|
+
"""
|
|
31
|
+
super().__init__(request_adapter, "{+baseurl}/feeds/{feedId}/{postId}", path_parameters)
|
|
32
|
+
|
|
33
|
+
async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[Post]:
|
|
34
|
+
"""
|
|
35
|
+
Retrieve a post from feed by its ID
|
|
36
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
|
37
|
+
Returns: Optional[Post]
|
|
38
|
+
"""
|
|
39
|
+
request_info = self.to_get_request_information(
|
|
40
|
+
request_configuration
|
|
41
|
+
)
|
|
42
|
+
from ....models.github_com_rixlhq_api_internal_errors.error_response import ErrorResponse
|
|
43
|
+
|
|
44
|
+
error_mapping: dict[str, type[ParsableFactory]] = {
|
|
45
|
+
"400": ErrorResponse,
|
|
46
|
+
"404": ErrorResponse,
|
|
47
|
+
}
|
|
48
|
+
if not self.request_adapter:
|
|
49
|
+
raise Exception("Http core is null")
|
|
50
|
+
from ....models.post import Post
|
|
51
|
+
|
|
52
|
+
return await self.request_adapter.send_async(request_info, Post, error_mapping)
|
|
53
|
+
|
|
54
|
+
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
|
|
55
|
+
"""
|
|
56
|
+
Retrieve a post from feed by its ID
|
|
57
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
|
58
|
+
Returns: RequestInformation
|
|
59
|
+
"""
|
|
60
|
+
request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
|
|
61
|
+
request_info.configure(request_configuration)
|
|
62
|
+
request_info.headers.try_add("Accept", "application/json")
|
|
63
|
+
return request_info
|
|
64
|
+
|
|
65
|
+
def with_url(self,raw_url: str) -> WithPostItemRequestBuilder:
|
|
66
|
+
"""
|
|
67
|
+
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
|
68
|
+
param raw_url: The raw URL to use for the request builder.
|
|
69
|
+
Returns: WithPostItemRequestBuilder
|
|
70
|
+
"""
|
|
71
|
+
if raw_url is None:
|
|
72
|
+
raise TypeError("raw_url cannot be null.")
|
|
73
|
+
return WithPostItemRequestBuilder(self.request_adapter, raw_url)
|
|
74
|
+
|
|
75
|
+
@dataclass
|
|
76
|
+
class WithPostItemRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]):
|
|
77
|
+
"""
|
|
78
|
+
Configuration for the request such as headers, query parameters, and middleware options.
|
|
79
|
+
"""
|
|
80
|
+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
|
|
81
|
+
|
|
82
|
+
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from collections.abc import Callable
|
|
3
|
+
from dataclasses import dataclass, field
|
|
4
|
+
from kiota_abstractions.base_request_builder import BaseRequestBuilder
|
|
5
|
+
from kiota_abstractions.base_request_configuration import RequestConfiguration
|
|
6
|
+
from kiota_abstractions.default_query_parameters import QueryParameters
|
|
7
|
+
from kiota_abstractions.get_path_parameters import get_path_parameters
|
|
8
|
+
from kiota_abstractions.method import Method
|
|
9
|
+
from kiota_abstractions.request_adapter import RequestAdapter
|
|
10
|
+
from kiota_abstractions.request_information import RequestInformation
|
|
11
|
+
from kiota_abstractions.request_option import RequestOption
|
|
12
|
+
from kiota_abstractions.serialization import Parsable, ParsableFactory
|
|
13
|
+
from typing import Any, Optional, TYPE_CHECKING, Union
|
|
14
|
+
from warnings import warn
|
|
15
|
+
|
|
16
|
+
if TYPE_CHECKING:
|
|
17
|
+
from ...models.github_com_rixlhq_api_internal_errors.error_response import ErrorResponse
|
|
18
|
+
from ...models.pagination.paginated_response_post import PaginatedResponsePost
|
|
19
|
+
from .creators.creators_request_builder import CreatorsRequestBuilder
|
|
20
|
+
from .item.with_post_item_request_builder import WithPostItemRequestBuilder
|
|
21
|
+
|
|
22
|
+
class WithFeedItemRequestBuilder(BaseRequestBuilder):
|
|
23
|
+
"""
|
|
24
|
+
Builds and executes requests for operations under /feeds/{feedId}
|
|
25
|
+
"""
|
|
26
|
+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
|
|
27
|
+
"""
|
|
28
|
+
Instantiates a new WithFeedItemRequestBuilder and sets the default values.
|
|
29
|
+
param path_parameters: The raw url or the url-template parameters for the request.
|
|
30
|
+
param request_adapter: The request adapter to use to execute the requests.
|
|
31
|
+
Returns: None
|
|
32
|
+
"""
|
|
33
|
+
super().__init__(request_adapter, "{+baseurl}/feeds/{feedId}{?limit*,offset*}", path_parameters)
|
|
34
|
+
|
|
35
|
+
def by_post_id(self,post_id: str) -> WithPostItemRequestBuilder:
|
|
36
|
+
"""
|
|
37
|
+
Gets an item from the rixl_sdk.feeds.item.item collection
|
|
38
|
+
param post_id: Post ID
|
|
39
|
+
Returns: WithPostItemRequestBuilder
|
|
40
|
+
"""
|
|
41
|
+
if post_id is None:
|
|
42
|
+
raise TypeError("post_id cannot be null.")
|
|
43
|
+
from .item.with_post_item_request_builder import WithPostItemRequestBuilder
|
|
44
|
+
|
|
45
|
+
url_tpl_params = get_path_parameters(self.path_parameters)
|
|
46
|
+
url_tpl_params["postId"] = post_id
|
|
47
|
+
return WithPostItemRequestBuilder(self.request_adapter, url_tpl_params)
|
|
48
|
+
|
|
49
|
+
async def get(self,request_configuration: Optional[RequestConfiguration[WithFeedItemRequestBuilderGetQueryParameters]] = None) -> Optional[PaginatedResponsePost]:
|
|
50
|
+
"""
|
|
51
|
+
Retrieve posts in a feed, with pagination.
|
|
52
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
|
53
|
+
Returns: Optional[PaginatedResponsePost]
|
|
54
|
+
"""
|
|
55
|
+
request_info = self.to_get_request_information(
|
|
56
|
+
request_configuration
|
|
57
|
+
)
|
|
58
|
+
from ...models.github_com_rixlhq_api_internal_errors.error_response import ErrorResponse
|
|
59
|
+
|
|
60
|
+
error_mapping: dict[str, type[ParsableFactory]] = {
|
|
61
|
+
"400": ErrorResponse,
|
|
62
|
+
"500": ErrorResponse,
|
|
63
|
+
}
|
|
64
|
+
if not self.request_adapter:
|
|
65
|
+
raise Exception("Http core is null")
|
|
66
|
+
from ...models.pagination.paginated_response_post import PaginatedResponsePost
|
|
67
|
+
|
|
68
|
+
return await self.request_adapter.send_async(request_info, PaginatedResponsePost, error_mapping)
|
|
69
|
+
|
|
70
|
+
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WithFeedItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
|
|
71
|
+
"""
|
|
72
|
+
Retrieve posts in a feed, with pagination.
|
|
73
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
|
74
|
+
Returns: RequestInformation
|
|
75
|
+
"""
|
|
76
|
+
request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
|
|
77
|
+
request_info.configure(request_configuration)
|
|
78
|
+
request_info.headers.try_add("Accept", "application/json")
|
|
79
|
+
return request_info
|
|
80
|
+
|
|
81
|
+
def with_url(self,raw_url: str) -> WithFeedItemRequestBuilder:
|
|
82
|
+
"""
|
|
83
|
+
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
|
84
|
+
param raw_url: The raw URL to use for the request builder.
|
|
85
|
+
Returns: WithFeedItemRequestBuilder
|
|
86
|
+
"""
|
|
87
|
+
if raw_url is None:
|
|
88
|
+
raise TypeError("raw_url cannot be null.")
|
|
89
|
+
return WithFeedItemRequestBuilder(self.request_adapter, raw_url)
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
def creators(self) -> CreatorsRequestBuilder:
|
|
93
|
+
"""
|
|
94
|
+
The creators property
|
|
95
|
+
"""
|
|
96
|
+
from .creators.creators_request_builder import CreatorsRequestBuilder
|
|
97
|
+
|
|
98
|
+
return CreatorsRequestBuilder(self.request_adapter, self.path_parameters)
|
|
99
|
+
|
|
100
|
+
@dataclass
|
|
101
|
+
class WithFeedItemRequestBuilderGetQueryParameters():
|
|
102
|
+
"""
|
|
103
|
+
Retrieve posts in a feed, with pagination.
|
|
104
|
+
"""
|
|
105
|
+
# Maximum number of items to return in a single request. <br> **Default:** `25`
|
|
106
|
+
limit: Optional[int] = None
|
|
107
|
+
|
|
108
|
+
# Starting point of the result set. <br>To get page 2 with a limit of 25, set `offset` to `25`. <br> **Default:** `0`
|
|
109
|
+
offset: Optional[int] = None
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
@dataclass
|
|
113
|
+
class WithFeedItemRequestBuilderGetRequestConfiguration(RequestConfiguration[WithFeedItemRequestBuilderGetQueryParameters]):
|
|
114
|
+
"""
|
|
115
|
+
Configuration for the request such as headers, query parameters, and middleware options.
|
|
116
|
+
"""
|
|
117
|
+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
|
|
118
|
+
|
|
119
|
+
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from collections.abc import Callable
|
|
3
|
+
from dataclasses import dataclass, field
|
|
4
|
+
from kiota_abstractions.base_request_builder import BaseRequestBuilder
|
|
5
|
+
from kiota_abstractions.base_request_configuration import RequestConfiguration
|
|
6
|
+
from kiota_abstractions.default_query_parameters import QueryParameters
|
|
7
|
+
from kiota_abstractions.get_path_parameters import get_path_parameters
|
|
8
|
+
from kiota_abstractions.method import Method
|
|
9
|
+
from kiota_abstractions.request_adapter import RequestAdapter
|
|
10
|
+
from kiota_abstractions.request_information import RequestInformation
|
|
11
|
+
from kiota_abstractions.request_option import RequestOption
|
|
12
|
+
from kiota_abstractions.serialization import Parsable, ParsableFactory
|
|
13
|
+
from typing import Any, Optional, TYPE_CHECKING, Union
|
|
14
|
+
from warnings import warn
|
|
15
|
+
|
|
16
|
+
if TYPE_CHECKING:
|
|
17
|
+
from ..models.github_com_rixlhq_api_internal_errors.error_response import ErrorResponse
|
|
18
|
+
from ..models.pagination.paginated_response_image import PaginatedResponseImage
|
|
19
|
+
from .item.with_image_item_request_builder import WithImageItemRequestBuilder
|
|
20
|
+
from .upload.upload_request_builder import UploadRequestBuilder
|
|
21
|
+
|
|
22
|
+
class ImagesRequestBuilder(BaseRequestBuilder):
|
|
23
|
+
"""
|
|
24
|
+
Builds and executes requests for operations under /images
|
|
25
|
+
"""
|
|
26
|
+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
|
|
27
|
+
"""
|
|
28
|
+
Instantiates a new ImagesRequestBuilder and sets the default values.
|
|
29
|
+
param path_parameters: The raw url or the url-template parameters for the request.
|
|
30
|
+
param request_adapter: The request adapter to use to execute the requests.
|
|
31
|
+
Returns: None
|
|
32
|
+
"""
|
|
33
|
+
super().__init__(request_adapter, "{+baseurl}/images{?limit*,offset*,order*,sort*}", path_parameters)
|
|
34
|
+
|
|
35
|
+
def by_image_id(self,image_id: str) -> WithImageItemRequestBuilder:
|
|
36
|
+
"""
|
|
37
|
+
Gets an item from the rixl_sdk.images.item collection
|
|
38
|
+
param image_id: Image ID
|
|
39
|
+
Returns: WithImageItemRequestBuilder
|
|
40
|
+
"""
|
|
41
|
+
if image_id is None:
|
|
42
|
+
raise TypeError("image_id cannot be null.")
|
|
43
|
+
from .item.with_image_item_request_builder import WithImageItemRequestBuilder
|
|
44
|
+
|
|
45
|
+
url_tpl_params = get_path_parameters(self.path_parameters)
|
|
46
|
+
url_tpl_params["imageId"] = image_id
|
|
47
|
+
return WithImageItemRequestBuilder(self.request_adapter, url_tpl_params)
|
|
48
|
+
|
|
49
|
+
async def get(self,request_configuration: Optional[RequestConfiguration[ImagesRequestBuilderGetQueryParameters]] = None) -> Optional[PaginatedResponseImage]:
|
|
50
|
+
"""
|
|
51
|
+
Retrieve all images for a specific project, with pagination and sorting.
|
|
52
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
|
53
|
+
Returns: Optional[PaginatedResponseImage]
|
|
54
|
+
"""
|
|
55
|
+
request_info = self.to_get_request_information(
|
|
56
|
+
request_configuration
|
|
57
|
+
)
|
|
58
|
+
from ..models.github_com_rixlhq_api_internal_errors.error_response import ErrorResponse
|
|
59
|
+
|
|
60
|
+
error_mapping: dict[str, type[ParsableFactory]] = {
|
|
61
|
+
"400": ErrorResponse,
|
|
62
|
+
"401": ErrorResponse,
|
|
63
|
+
"403": ErrorResponse,
|
|
64
|
+
"500": ErrorResponse,
|
|
65
|
+
}
|
|
66
|
+
if not self.request_adapter:
|
|
67
|
+
raise Exception("Http core is null")
|
|
68
|
+
from ..models.pagination.paginated_response_image import PaginatedResponseImage
|
|
69
|
+
|
|
70
|
+
return await self.request_adapter.send_async(request_info, PaginatedResponseImage, error_mapping)
|
|
71
|
+
|
|
72
|
+
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ImagesRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
|
|
73
|
+
"""
|
|
74
|
+
Retrieve all images for a specific project, with pagination and sorting.
|
|
75
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
|
76
|
+
Returns: RequestInformation
|
|
77
|
+
"""
|
|
78
|
+
request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
|
|
79
|
+
request_info.configure(request_configuration)
|
|
80
|
+
request_info.headers.try_add("Accept", "application/json")
|
|
81
|
+
return request_info
|
|
82
|
+
|
|
83
|
+
def with_url(self,raw_url: str) -> ImagesRequestBuilder:
|
|
84
|
+
"""
|
|
85
|
+
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
|
86
|
+
param raw_url: The raw URL to use for the request builder.
|
|
87
|
+
Returns: ImagesRequestBuilder
|
|
88
|
+
"""
|
|
89
|
+
if raw_url is None:
|
|
90
|
+
raise TypeError("raw_url cannot be null.")
|
|
91
|
+
return ImagesRequestBuilder(self.request_adapter, raw_url)
|
|
92
|
+
|
|
93
|
+
@property
|
|
94
|
+
def upload(self) -> UploadRequestBuilder:
|
|
95
|
+
"""
|
|
96
|
+
The upload property
|
|
97
|
+
"""
|
|
98
|
+
from .upload.upload_request_builder import UploadRequestBuilder
|
|
99
|
+
|
|
100
|
+
return UploadRequestBuilder(self.request_adapter, self.path_parameters)
|
|
101
|
+
|
|
102
|
+
@dataclass
|
|
103
|
+
class ImagesRequestBuilderGetQueryParameters():
|
|
104
|
+
"""
|
|
105
|
+
Retrieve all images for a specific project, with pagination and sorting.
|
|
106
|
+
"""
|
|
107
|
+
# Maximum number of items to return in a single request. <br> **Default:** `25`
|
|
108
|
+
limit: Optional[int] = None
|
|
109
|
+
|
|
110
|
+
# Starting point of the result set. <br>To get page 2 with a limit of 25, set `offset` to `25`. <br> **Default:** `0`
|
|
111
|
+
offset: Optional[int] = None
|
|
112
|
+
|
|
113
|
+
# Sort order (asc, desc)
|
|
114
|
+
order: Optional[str] = None
|
|
115
|
+
|
|
116
|
+
# Field to sort by (created_at, name, size, updated_at)
|
|
117
|
+
sort: Optional[str] = None
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
@dataclass
|
|
121
|
+
class ImagesRequestBuilderGetRequestConfiguration(RequestConfiguration[ImagesRequestBuilderGetQueryParameters]):
|
|
122
|
+
"""
|
|
123
|
+
Configuration for the request such as headers, query parameters, and middleware options.
|
|
124
|
+
"""
|
|
125
|
+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
|
|
126
|
+
|
|
127
|
+
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from collections.abc import Callable
|
|
3
|
+
from dataclasses import dataclass, field
|
|
4
|
+
from kiota_abstractions.base_request_builder import BaseRequestBuilder
|
|
5
|
+
from kiota_abstractions.base_request_configuration import RequestConfiguration
|
|
6
|
+
from kiota_abstractions.default_query_parameters import QueryParameters
|
|
7
|
+
from kiota_abstractions.get_path_parameters import get_path_parameters
|
|
8
|
+
from kiota_abstractions.method import Method
|
|
9
|
+
from kiota_abstractions.request_adapter import RequestAdapter
|
|
10
|
+
from kiota_abstractions.request_information import RequestInformation
|
|
11
|
+
from kiota_abstractions.request_option import RequestOption
|
|
12
|
+
from kiota_abstractions.serialization import Parsable, ParsableFactory
|
|
13
|
+
from typing import Any, Optional, TYPE_CHECKING, Union
|
|
14
|
+
from warnings import warn
|
|
15
|
+
|
|
16
|
+
if TYPE_CHECKING:
|
|
17
|
+
from ...models.github_com_rixlhq_api_internal_errors.error_response import ErrorResponse
|
|
18
|
+
from ...models.image import Image
|
|
19
|
+
|
|
20
|
+
class WithImageItemRequestBuilder(BaseRequestBuilder):
|
|
21
|
+
"""
|
|
22
|
+
Builds and executes requests for operations under /images/{imageId}
|
|
23
|
+
"""
|
|
24
|
+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
|
|
25
|
+
"""
|
|
26
|
+
Instantiates a new WithImageItemRequestBuilder and sets the default values.
|
|
27
|
+
param path_parameters: The raw url or the url-template parameters for the request.
|
|
28
|
+
param request_adapter: The request adapter to use to execute the requests.
|
|
29
|
+
Returns: None
|
|
30
|
+
"""
|
|
31
|
+
super().__init__(request_adapter, "{+baseurl}/images/{imageId}", path_parameters)
|
|
32
|
+
|
|
33
|
+
async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None:
|
|
34
|
+
"""
|
|
35
|
+
delete an image by marking it as deleted
|
|
36
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
|
37
|
+
Returns: None
|
|
38
|
+
"""
|
|
39
|
+
request_info = self.to_delete_request_information(
|
|
40
|
+
request_configuration
|
|
41
|
+
)
|
|
42
|
+
from ...models.github_com_rixlhq_api_internal_errors.error_response import ErrorResponse
|
|
43
|
+
|
|
44
|
+
error_mapping: dict[str, type[ParsableFactory]] = {
|
|
45
|
+
"400": ErrorResponse,
|
|
46
|
+
"401": ErrorResponse,
|
|
47
|
+
"403": ErrorResponse,
|
|
48
|
+
"404": ErrorResponse,
|
|
49
|
+
"500": ErrorResponse,
|
|
50
|
+
}
|
|
51
|
+
if not self.request_adapter:
|
|
52
|
+
raise Exception("Http core is null")
|
|
53
|
+
return await self.request_adapter.send_no_response_content_async(request_info, error_mapping)
|
|
54
|
+
|
|
55
|
+
async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[Image]:
|
|
56
|
+
"""
|
|
57
|
+
Retrieve an image by its ID for a specific project.
|
|
58
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
|
59
|
+
Returns: Optional[Image]
|
|
60
|
+
"""
|
|
61
|
+
request_info = self.to_get_request_information(
|
|
62
|
+
request_configuration
|
|
63
|
+
)
|
|
64
|
+
from ...models.github_com_rixlhq_api_internal_errors.error_response import ErrorResponse
|
|
65
|
+
|
|
66
|
+
error_mapping: dict[str, type[ParsableFactory]] = {
|
|
67
|
+
"400": ErrorResponse,
|
|
68
|
+
"401": ErrorResponse,
|
|
69
|
+
"403": ErrorResponse,
|
|
70
|
+
"404": ErrorResponse,
|
|
71
|
+
"500": ErrorResponse,
|
|
72
|
+
}
|
|
73
|
+
if not self.request_adapter:
|
|
74
|
+
raise Exception("Http core is null")
|
|
75
|
+
from ...models.image import Image
|
|
76
|
+
|
|
77
|
+
return await self.request_adapter.send_async(request_info, Image, error_mapping)
|
|
78
|
+
|
|
79
|
+
def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
|
|
80
|
+
"""
|
|
81
|
+
delete an image by marking it as deleted
|
|
82
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
|
83
|
+
Returns: RequestInformation
|
|
84
|
+
"""
|
|
85
|
+
request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters)
|
|
86
|
+
request_info.configure(request_configuration)
|
|
87
|
+
request_info.headers.try_add("Accept", "application/json")
|
|
88
|
+
return request_info
|
|
89
|
+
|
|
90
|
+
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
|
|
91
|
+
"""
|
|
92
|
+
Retrieve an image by its ID for a specific project.
|
|
93
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
|
94
|
+
Returns: RequestInformation
|
|
95
|
+
"""
|
|
96
|
+
request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
|
|
97
|
+
request_info.configure(request_configuration)
|
|
98
|
+
request_info.headers.try_add("Accept", "application/json")
|
|
99
|
+
return request_info
|
|
100
|
+
|
|
101
|
+
def with_url(self,raw_url: str) -> WithImageItemRequestBuilder:
|
|
102
|
+
"""
|
|
103
|
+
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
|
104
|
+
param raw_url: The raw URL to use for the request builder.
|
|
105
|
+
Returns: WithImageItemRequestBuilder
|
|
106
|
+
"""
|
|
107
|
+
if raw_url is None:
|
|
108
|
+
raise TypeError("raw_url cannot be null.")
|
|
109
|
+
return WithImageItemRequestBuilder(self.request_adapter, raw_url)
|
|
110
|
+
|
|
111
|
+
@dataclass
|
|
112
|
+
class WithImageItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]):
|
|
113
|
+
"""
|
|
114
|
+
Configuration for the request such as headers, query parameters, and middleware options.
|
|
115
|
+
"""
|
|
116
|
+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
|
|
117
|
+
|
|
118
|
+
@dataclass
|
|
119
|
+
class WithImageItemRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]):
|
|
120
|
+
"""
|
|
121
|
+
Configuration for the request such as headers, query parameters, and middleware options.
|
|
122
|
+
"""
|
|
123
|
+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
|
|
124
|
+
|
|
125
|
+
|