Skip to content

Commit

Permalink
Added docs-ref links
Browse files Browse the repository at this point in the history
  • Loading branch information
Laky-64 committed Sep 24, 2023
1 parent 9af4a22 commit 6894de3
Show file tree
Hide file tree
Showing 19 changed files with 54 additions and 43 deletions.
2 changes: 1 addition & 1 deletion NTgCalls/Advanced Methods/Get State.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<separator/>
<h2>Details</h2>
<category-title noref="true">
<ref><sb>get_state</sb></ref>() <shi>-></shi> <docs-ref link="">ntgcalls.MediaState</docs-ref>
<ref><sb>get_state</sb></ref>() <shi>-></shi> <docs-ref link="/NTgCalls/Available Types/MediaState">ntgcalls.MediaState</docs-ref>
</category-title>
<subtext>
<config id="GET_STATE_DESC2"/>
Expand Down
2 changes: 1 addition & 1 deletion NTgCalls/Advanced Methods/ntg_calls.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<subtext>
<config id="ARG_C_UID"/>

<category-title><docs-ref link="">ntg_group_call_struct</docs-ref><shi language="c">*</shi> <ref>buffer</ref></category-title>
<category-title><docs-ref link="/NTgCalls/Available Structs/ntg_group_call_struct">ntg_group_call_struct</docs-ref><shi language="c">*</shi> <ref>buffer</ref></category-title>
<subtext><text>The buffer that will hold the retrieved group call information.</text></subtext>

<config id="ARG_BUF_SIZE"/>
Expand Down
2 changes: 1 addition & 1 deletion NTgCalls/Advanced Methods/ntg_get_state.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<config id="ARG_C_UID"/>
<config id="ARG_C_CHAT_ID"/>

<category-title><docs-ref link="">ntg_media_state_struct</docs-ref><shi language="c">*</shi> <ref>mediaState</ref></category-title>
<category-title><docs-ref link="/NTgCalls/Available Structs/ntg_media_state_struct">ntg_media_state_struct</docs-ref><shi language="c">*</shi> <ref>mediaState</ref></category-title>
<subtext><config id="MEDIA_STATE_DESC"/></subtext>
</subtext>
</category>
Expand Down
4 changes: 2 additions & 2 deletions NTgCalls/Available Structs/ntg_media_description_struct.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<br/>
<pg-title>PARAMETERS</pg-title>
<subtext>
<category-title><docs-ref link="">ntg_audio_description_struct</docs-ref><shi language="c">*</shi> <ref>audio</ref></category-title>
<category-title><docs-ref link="/NTgCalls/Available Structs/ntg_audio_description_struct">ntg_audio_description_struct</docs-ref><shi language="c">*</shi> <ref>audio</ref></category-title>
<config id="AUDIO_DESC"/>

<category-title><docs-ref link="">ntg_video_description_struct</docs-ref><shi language="c">*</shi> <ref>video</ref></category-title>
<category-title><docs-ref link="/NTgCalls/Available Structs/ntg_video_description_struct">ntg_video_description_struct</docs-ref><shi language="c">*</shi> <ref>video</ref></category-title>
<config id="VIDEO_DESC"/>
</subtext>
</subtext>
Expand Down
2 changes: 1 addition & 1 deletion NTgCalls/Basic Methods/ntg_get_params.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<subtext>
<config id="ARG_C_UID"/>
<config id="ARG_C_CHAT_ID"/>
<category-title><docs-ref link="">ntg_media_description_struct</docs-ref> <ref>desc</ref></category-title>
<category-title><docs-ref link="/NTgCalls/Available Structs/ntg_media_description_struct">ntg_media_description_struct</docs-ref> <ref>desc</ref></category-title>
<config id="ARG_MEDIA_DESC"/>

<category-title><shi language="c">char*</shi> <ref>buffer</ref></category-title>
Expand Down
2 changes: 1 addition & 1 deletion NTgCalls/Client.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<category>
<pg-title>STATIC METHODS</pg-title>
<subtext>
<category-title><ref><sb>calls</sb></ref>() <shi>-> dict</shi>[<shi>int</shi>, <docs-ref link="">ntgcalls.StreamStatus</docs-ref>]</category-title>
<category-title><ref><sb>calls</sb></ref>() <shi>-> dict</shi>[<shi>int</shi>, <docs-ref link="/NTgCalls/Available Enums/StreamStatus">ntgcalls.StreamStatus</docs-ref>]</category-title>
<config id="LIST_CALLS_DESC"/>

<category-title><ref><sb>ping</sb></ref>() <shi>-></shi> <shi>str</shi></category-title>
Expand Down
2 changes: 1 addition & 1 deletion PyTgCalls/Advanced Methods/Get Active Call.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<separator/>
<h2>Details</h2>
<category-title noref="true">
<ref>PyTgCalls.<sb>get_active_call</sb></ref>() <shi>-></shi> <docs-ref link="PyTgCalls/Advanced Types/GroupCall.xml">GroupCall</docs-ref>
<ref>PyTgCalls.<sb>get_active_call</sb></ref>() <shi>-></shi> <docs-ref link="/PyTgCalls/Advanced Types/GroupCall">GroupCall</docs-ref>
</category-title>
<subtext>
<text>Check/Get an active call</text>
Expand Down
2 changes: 1 addition & 1 deletion PyTgCalls/Advanced Methods/Get Call.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<separator/>
<h2>Details</h2>
<category-title noref="true">
<ref>PyTgCalls.<sb>get_call</sb></ref>() <shi>-></shi> <docs-ref link="PyTgCalls/Advanced Types/GroupCall.xml">GroupCall</docs-ref>
<ref>PyTgCalls.<sb>get_call</sb></ref>() <shi>-></shi> <docs-ref link="/PyTgCalls/Advanced Types/GroupCall">GroupCall</docs-ref>
</category-title>
<subtext>
<text>Check/Get an active call</text>
Expand Down
2 changes: 1 addition & 1 deletion PyTgCalls/Advanced Methods/Get Participants.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<separator/>
<h2>Details</h2>
<category-title noref="true">
<ref>PyTgCalls.<sb>get_participants</sb></ref>() <shi>-> list</shi>[<docs-ref link="PyTgCalls/Advanced Types/GroupCall.xml">GroupCall</docs-ref>]
<ref>PyTgCalls.<sb>get_participants</sb></ref>() <shi>-> list</shi>[<docs-ref link="/PyTgCalls/Advanced Types/GroupCall">GroupCall</docs-ref>]
</category-title>
<subtext>
<text>Get a list of participants from a group call</text>
Expand Down
4 changes: 2 additions & 2 deletions PyTgCalls/Advanced Types/GroupCall.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<shi>class</shi> <ref>pytgcalls.types.<sb>GroupCall</sb></ref>
</category-title>
<subtext>
<text>Info about a group call</text>
<config id="GROUP_CALL_DESC"/>
<br/>
<pg-title>PROPERTIES</pg-title>
<subtext>
Expand All @@ -15,7 +15,7 @@
<subtext><text>Check if any sort of stream exists.</text></subtext>

<category-title><ref><sb>status</sb></ref> <shi>-> str</shi></category-title>
<subtext><text>Stream’s Status.</text></subtext>
<config id="STREAM_STATUS_DESC2"/>
</subtext>
</subtext>
</page>
2 changes: 1 addition & 1 deletion PyTgCalls/Base Stream/AudioStream.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<category-title><ref>path</ref>: <shi>str</shi></category-title>
<subtext><text>The audio file path or shell command (PCM16L format only).</text></subtext>

<category-title><ref>parameters</ref>: <docs-ref link="">pytgcalls.AudioParameters</docs-ref></category-title>
<category-title><ref>parameters</ref>: <docs-ref link="/PyTgCalls/Base Stream/AudioParameters">pytgcalls.AudioParameters</docs-ref></category-title>
<config id="ARG_AUDIO_PARAMS_DESC"/>
</subtext>
</subtext>
Expand Down
4 changes: 2 additions & 2 deletions PyTgCalls/Base Stream/Stream.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
<br/>
<pg-title>PARAMETERS</pg-title>
<subtext>
<category-title><ref>stream_audio</ref>: <docs-ref link="">pytgcalls.AudioStream</docs-ref></category-title>
<category-title><ref>stream_audio</ref>: <docs-ref link="/PyTgCalls/Base Stream/AudioStream">pytgcalls.AudioStream</docs-ref></category-title>
<subtext><text>Audio Stream Descriptor.</text></subtext>

<category-title><ref>stream_video</ref>: <docs-ref link="">pytgcalls.VideoStream</docs-ref></category-title>
<category-title><ref>stream_video</ref>: <docs-ref link="/PyTgCalls/Base Stream/AudioStream">pytgcalls.VideoStream</docs-ref></category-title>
<subtext><text>Video Stream Descriptor.</text></subtext>
</subtext>
</subtext>
Expand Down
2 changes: 1 addition & 1 deletion PyTgCalls/Base Stream/VideoStream.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<category-title><ref>path</ref>: <shi>str</shi></category-title>
<subtext><text>The video file path or shell command (YUV420P format only).</text></subtext>

<category-title><ref>parameters </ref>: <docs-ref link="">pytgcalls.VideoParameters</docs-ref></category-title>
<category-title><ref>parameters </ref>: <docs-ref link="/PyTgCalls/Base Stream/VideoParameters">pytgcalls.VideoParameters</docs-ref></category-title>
<config id="ARG_VIDEO_PARAMS_DESC"/>
</subtext>
</subtext>
Expand Down
11 changes: 5 additions & 6 deletions PyTgCalls/Basic Methods/Run.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
<page>
<h1>Run</h1>
<text>
This is a convenience method that calls <docs-ref link="">start()</docs-ref>, <docs-ref link="">idle()</docs-ref> in sequence.
This is a convenience method that calls <docs-ref link="/PyTgCalls/Basic Methods/Start">start()</docs-ref>, <docs-ref link="/PyTgCalls/Basic Methods/Idle">idle()</docs-ref> in sequence.
It makes running a client less verbose, but it is not suitable in case you want to run more than one client in a single script,
since the <docs-ref link="">idle()</docs-ref> part will block all the subsequent code after starting the client.
since the <docs-ref link="/PyTgCalls/Basic Methods/Idle">idle()</docs-ref> part will block all the subsequent code after starting the client.
</text>
<h3>Example</h3>
<syntax-highlight mark="5">
<syntax-highlight mark="8">
from pytgcalls import Client
from pytgcalls import idle
...
app = Client(client)
app.start()

... # Call API methods
... # Call API decorators / MtProto decorators

idle()
app.run()
</syntax-highlight>
<separator/>
<h2>Details</h2>
Expand Down
2 changes: 1 addition & 1 deletion PyTgCalls/Calling Methods.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<page>
<h1>Calling Methods</h1>
<text>
At this point, we have successfully <docs-ref link="">installed PyTgCalls</docs-ref> and installed an MTProto client;
At this point, we have successfully <docs-ref link="/PyTgCalls/Install Guide">installed PyTgCalls</docs-ref> and installed an MTProto client;
we are now aiming towards the core of the library. It’s time to start playing with the API!
</text>
<h2>Basic Usage</h2>
Expand Down
4 changes: 2 additions & 2 deletions PyTgCalls/Client.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
<category>
<pg-title>STATIC METHODS</pg-title>
<subtext>
<category-title><ref><sb>active_calls</sb></ref>() <shi>-> list</shi>[<docs-ref link="PyTgCalls/Advanced Types/GroupCall.xml">GroupCall</docs-ref>]</category-title>
<category-title><ref><sb>active_calls</sb></ref>() <shi>-> list</shi>[<docs-ref link="/PyTgCalls/Advanced Types/GroupCall">GroupCall</docs-ref>]</category-title>
<subtext><text>Get a list of active (Playing / Paused) group calls</text></subtext>

<category-title><ref><sb>calls</sb></ref>() <shi>-> list</shi>[<docs-ref link="PyTgCalls/Advanced Types/GroupCall.xml">GroupCall</docs-ref>]</category-title>
<category-title><ref><sb>calls</sb></ref>() <shi>-> list</shi>[<docs-ref link="/PyTgCalls/Advanced Types/GroupCall">GroupCall</docs-ref>]</category-title>
<config id="LIST_CALLS_DESC"/>

<category-title><ref><sb>cache_peer</sb></ref>() <shi>-></shi> Union[<a href="https://docs.pyrogram.org/telegram/base/input-peer">pyrogram.InputPeer</a>, <a href="https://tl.telethon.dev/types/input_peer.html">telethon.InputPeer</a>]</category-title>
Expand Down
2 changes: 1 addition & 1 deletion PyTgCalls/Decorators.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<page>
<h1>Decorators</h1>
<text>
While still being methods bound to the <docs-ref link="">PyTgCalls</docs-ref> class,
While still being methods bound to the <docs-ref link="/PyTgCalls/Client">PyTgCalls</docs-ref> class,
decorators hold a special significance that justifies a dedicated page.

Decorators allow you to register callback functions for handling updates in a much easier and cleaner way.
Expand Down
2 changes: 1 addition & 1 deletion PyTgCalls/Handling Updates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
First of all, let's define what these updates are. As hinted earlier, updates are events that happen in PyTgCalls, such as
joining a group call, changes in the participant list, stream ended etc. They are meant to notify you about a new
specific state change. These updates are handled by registering one or more callback functions in your app
using <docs-ref link="">Decorators</docs-ref>.
using <docs-ref link="/PyTgCalls/Decorators">Decorators</docs-ref>.

Each handler deals with a specific event. When a matching update arrives from Telegram or NTgCalls, the registered callback
function will be called back by the framework, and its body will execute.
Expand Down
44 changes: 28 additions & 16 deletions config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
<subtext><text>This method can only be called with a valid MTProto client set.</text></subtext>

<category-title>exception <ref>pytgcalls.exceptions.<sb>ClientNotStarted</sb></ref></category-title>
<subtext><text>Ensure you have started the process with <docs-ref link="">start()</docs-ref> before calling this method.</text></subtext>
<subtext>
<text>
Ensure you have started the process with <docs-ref link="/PyTgCalls/Basic Methods/Start">start()</docs-ref> before calling this method.
</text>
</subtext>

<category-title>exception <ref>pytgcalls.exceptions.<sb>NotInGroupCallError</sb></ref></category-title>
<subtext><text>This error occurs when attempting to leave a group call that you have not joined.</text></subtext>
Expand Down Expand Up @@ -172,19 +176,19 @@
<option id="ARG_AUDIO_PARAMS_DESC">
<subtext>
<text>
Stream’s audio parameters. You can also use <docs-ref link="">pytgcalls.VeryHighQualityAudio()</docs-ref>,
<docs-ref link="">pytgcalls.HighQualityAudio()</docs-ref>, <docs-ref link="">pytgcalls.MediumQualityAudio()</docs-ref> or
<docs-ref link="">pytgcalls.LowQualityAudio()</docs-ref>.
Stream’s audio parameters. You can also use <code>pytgcalls.VeryHighQualityAudio()</code>,
<code>pytgcalls.HighQualityAudio()</code>, <code>pytgcalls.MediumQualityAudio()</code> or
<code>pytgcalls.LowQualityAudio()</code>.
</text>
</subtext>
</option>

<option id="ARG_VIDEO_PARAMS_DESC">
<subtext>
<text>
Video parameters of the stream. You can also use <docs-ref link="">pytgcalls.VeryHighQualityVideo()</docs-ref>,
<docs-ref link="">pytgcalls.HighQualityVideo()</docs-ref>, <docs-ref link="">pytgcalls.MediumQualityVideo()</docs-ref> or
<docs-ref link="">pytgcalls.LowQualityVideo()</docs-ref>.
Video parameters of the stream. You can also use <code>pytgcalls.VeryHighQualityVideo()</code>,
<code>pytgcalls.HighQualityVideo()</code>, <code>pytgcalls.MediumQualityVideo()</code> or
<code>pytgcalls.LowQualityVideo()</code>.
</text>
</subtext>
</option>
Expand Down Expand Up @@ -376,6 +380,14 @@
Retrieve GroupCall MTProto Configurations.
</text>
</option>

<option id="GROUP_CALL_DESC">
<text>Info about a group call</text>
</option>

<option id="STREAM_STATUS_DESC2">
<subtext><text>Stream’s Status.</text></subtext>
</option>
<!--end descriptions-->

<!--parameters-->
Expand All @@ -385,7 +397,7 @@
</option>

<option id="ARG_INPUT_STREAM">
<category-title><ref>stream</ref>: <docs-ref link="">pytgcalls.Stream</docs-ref></category-title>
<category-title><ref>stream</ref>: <docs-ref link="/PyTgCalls/Base Stream/Stream">pytgcalls.Stream</docs-ref></category-title>
<subtext><text>Input Streams base descriptor</text></subtext>
</option>

Expand All @@ -410,17 +422,17 @@
</option>

<option id="ARG_PARTICIPANT">
<category-title><ref><sb>participant</sb></ref> <shi>-></shi> <docs-ref link="PyTgCalls/Advanced Types/GroupCallParticipant.xml">pytgcalls.GroupCallParticipant</docs-ref></category-title>
<category-title><ref><sb>participant</sb></ref> <shi>-></shi> <docs-ref link="/PyTgCalls/Advanced Types/GroupCallParticipant">pytgcalls.GroupCallParticipant</docs-ref></category-title>
<subtext><text>Info about a group call participant.</text></subtext>
</option>

<option id="ARG_AUDIO_PARAMS">
<category-title><ref>audio_parameters</ref>: Optional[<docs-ref link="">pytgcalls.AudioParameters</docs-ref>]</category-title>
<category-title><ref>audio_parameters</ref>: Optional[<docs-ref link="/PyTgCalls/Base Stream/AudioParameters">pytgcalls.AudioParameters</docs-ref>]</category-title>
<config id="ARG_AUDIO_PARAMS_DESC"/>
</option>

<option id="ARG_VIDEO_PARAMS">
<category-title><ref>video_parameters</ref>: Optional[<docs-ref link="">pytgcalls.VideoParameters</docs-ref>]</category-title>
<category-title><ref>video_parameters</ref>: Optional[<docs-ref link="/PyTgCalls/Base Stream/VideoParameters">pytgcalls.VideoParameters</docs-ref>]</category-title>
<config id="ARG_VIDEO_PARAMS_DESC"/>
</option>

Expand Down Expand Up @@ -448,17 +460,17 @@
</option>

<option id="ARG_INPUT_MODE">
<category-title><ref>input_mode</ref>: <docs-ref link="">ntgcalls.InputMode</docs-ref></category-title>
<category-title><ref>input_mode</ref>: <docs-ref link="/NTgCalls/Available Enums/InputMode">ntgcalls.InputMode</docs-ref></category-title>
<config id="INPUT_MODE_DESC"/>
</option>

<option id="ARG_C_INPUT_MODE">
<category-title><docs-ref link="">ntg_input_mode_enum</docs-ref> <ref>inputMode</ref></category-title>
<category-title><docs-ref link="/NTgCalls/Available Enums/ntg_input_mode_enum">ntg_input_mode_enum</docs-ref> <ref>inputMode</ref></category-title>
<config id="INPUT_MODE_DESC"/>
</option>

<option id="ARG_MEDIA">
<category-title><docs-ref link="">ntg_media_description_struct</docs-ref> <ref><sb>desc</sb></ref></category-title>
<category-title><docs-ref link="/NTgCalls/Available Structs/ntg_media_description_struct">ntg_media_description_struct</docs-ref> <ref><sb>desc</sb></ref></category-title>
<config id="ARG_MEDIA_DESC"/>
</option>

Expand All @@ -483,12 +495,12 @@
</option>

<option id="ARG_AUDIO_DEVICE">
<category-title><ref>audio_info</ref>: <docs-ref link="">pytgcalls.DeviceInfo</docs-ref></category-title>
<category-title><ref>audio_info</ref>: <code>pytgcalls.DeviceInfo</code></category-title>
<subtext><text>The audio media device.</text></subtext>
</option>

<option id="ARG_SCREEN_DEVICE">
<category-title><ref>screen_info</ref>: <docs-ref link="">pytgcalls.ScreenInfo</docs-ref></category-title>
<category-title><ref>screen_info</ref>: <code>pytgcalls.ScreenInfo</code></category-title>
<subtext><text>The video media device.</text></subtext>
</option>
<!--end parameters-->
Expand Down

0 comments on commit 6894de3

Please sign in to comment.