api.rst 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. :github_url: https://github.com/gopro/OpenGoPro/tree/main/demos/python/sdk_wireless_camera_control
  2. API Reference
  3. *************
  4. This section is a reference for the Open GoPro Python Package API. The BLE / Wifi API's that
  5. this package implements can be found in the Open GoPro documentation linked from :ref:`package summary<Summary>`
  6. .. note::
  7. Not everything is exposed here. This section should only consist of the interface
  8. information that a user (not a developer) of the Open GoPro module should care about.
  9. For a higher-level summary / usage, see the :ref:`usage<Usage>` section
  10. .. warning::
  11. This documentation is not a substitute for the Open GoPro BLE and WiFi
  12. `specifications <https://gopro.github.io/OpenGoPro/>`_. That is, this interface shows how to use the various
  13. commands but is not an exhaustive source of information for what each command does. The Open GoPro specs
  14. should be used simultaneously with this document for development.
  15. GoPro Client
  16. ============
  17. There are two top-level GoPro client interfaces - Wireless and Wired:
  18. Wireless
  19. --------
  20. .. code-block:: python
  21. from open_gopro import WirelessGoPro
  22. .. inheritance-diagram:: open_gopro.gopro_wireless.WirelessGoPro
  23. :parts: 1
  24. .. autoclass:: open_gopro.gopro_wireless.WirelessGoPro
  25. :inherited-members:
  26. Wired
  27. -----
  28. .. code-block:: python
  29. from open_gopro import WiredGoPro
  30. .. inheritance-diagram:: open_gopro.gopro_wired.WiredGoPro
  31. :parts: 1
  32. .. autoclass:: open_gopro.gopro_wired.WiredGoPro
  33. :inherited-members:
  34. Open GoPro API
  35. ==============
  36. These are both the base types that are used to implement the API (BLE Setting, Ble Status, etc.) and the
  37. version-specific API's themselves.
  38. These should not be imported directly and instead should be accessed using the relevant properties (`ble_command`,
  39. `wifi_setting`, etc.) of a GoPro(:class:`open_gopro.gopro_base.GoProBase`) instance.
  40. .. autoclass:: open_gopro.api.ble_commands.BleCommands
  41. :show-inheritance:
  42. .. autoclass:: open_gopro.api.ble_settings.BleSettings
  43. :show-inheritance:
  44. .. autoclass:: open_gopro.api.ble_statuses.BleStatuses
  45. :show-inheritance:
  46. .. autoclass:: open_gopro.api.http_commands.HttpCommands
  47. :show-inheritance:
  48. .. autoclass:: open_gopro.api.http_settings.HttpSettings
  49. :show-inheritance:
  50. Abstracted Features
  51. -------------------
  52. .. autoclass:: open_gopro.features.CohnFeature
  53. .. autoclass:: open_gopro.features.AccessPointFeature
  54. .. autoclass:: open_gopro.features.StreamFeature
  55. Base Types
  56. ----------
  57. .. automodule:: open_gopro.models.types
  58. :undoc-members:
  59. GoPro Enum
  60. ^^^^^^^^^^
  61. .. autoclass:: open_gopro.domain.enum.GoProEnum
  62. .. autoclass:: open_gopro.domain.enum.GoProIntEnum
  63. BLE Setting
  64. ^^^^^^^^^^^
  65. .. inheritance-diagram:: open_gopro.api.builders.BleSettingFacade
  66. :parts: 1
  67. .. autoclass:: open_gopro.api.builders.BleSettingFacade
  68. :exclude-members: get_name, get_capabilities_names
  69. BLE Status
  70. ^^^^^^^^^^
  71. .. inheritance-diagram:: open_gopro.api.builders.BleStatusFacade
  72. :parts: 1
  73. .. autoclass:: open_gopro.api.builders.BleStatusFacade
  74. HTTP Setting
  75. ^^^^^^^^^^^^
  76. .. inheritance-diagram:: open_gopro.api.builders.HttpSetting
  77. :parts: 1
  78. .. autoclass:: open_gopro.api.builders.HttpSetting
  79. Method Protocols
  80. ^^^^^^^^^^^^^^^^
  81. .. autoclass:: open_gopro.api.builders.BuilderProtocol
  82. Message Bases
  83. ^^^^^^^^^^^^^
  84. These are the base types that are used to implement version-specific API's. These are published for reference
  85. but the end user should never need to use these directly.
  86. .. autoclass:: open_gopro.domain.communicator_interface.Message
  87. :show-inheritance:
  88. .. autoclass:: open_gopro.domain.communicator_interface.HttpMessage
  89. :show-inheritance:
  90. .. autoclass:: open_gopro.domain.communicator_interface.BleMessage
  91. :show-inheritance:
  92. .. autoclass:: open_gopro.domain.communicator_interface.Messages
  93. :show-inheritance:
  94. .. autoclass:: open_gopro.domain.communicator_interface.BleMessages
  95. :show-inheritance:
  96. .. autoclass:: open_gopro.domain.communicator_interface.HttpMessages
  97. :show-inheritance:
  98. .. autoclass:: open_gopro.domain.communicator_interface.MessageRules
  99. Observables
  100. ^^^^^^^^^^^
  101. .. automodule:: open_gopro.domain.observable
  102. :show-inheritance:
  103. .. autoclass:: open_gopro.domain.gopro_observable.GoproObserverDistinctInitial
  104. :show-inheritance:
  105. .. autoclass:: open_gopro.domain.gopro_observable.GoProObservable
  106. :show-inheritance:
  107. :inherited-members:
  108. Responses
  109. =========
  110. Generic common response container:
  111. This can be imported via:
  112. .. code-block:: python
  113. from open_gopro import GoProResp
  114. .. autoclass:: open_gopro.models.response.GoProResp
  115. Data Models
  116. -----------
  117. These are the various models that are returned in responses, used in commands, etc. They can be imported with:
  118. .. code-block:: python
  119. from open_gopro import models
  120. .. automodule:: open_gopro.models.media_list
  121. :undoc-members:
  122. .. automodule:: open_gopro.models.streaming
  123. :undoc-members:
  124. .. automodule:: open_gopro.models.general
  125. :undoc-members:
  126. Constants
  127. =========
  128. These can be imported as:
  129. .. code-block:: python
  130. from open_gopro import constants
  131. .. automodule:: open_gopro.models.constants
  132. :undoc-members:
  133. :exclude-members: CmdType, GoProEnumMeta, GoProFlagEnum, ProducerType, ResponseType, enum_factory
  134. .. automodule:: open_gopro.models.constants.constants
  135. :undoc-members:
  136. .. automodule:: open_gopro.models.constants.settings
  137. :undoc-members:
  138. .. automodule:: open_gopro.models.constants.statuses
  139. :undoc-members:
  140. Exceptions
  141. ==========
  142. .. automodule:: open_gopro.domain.exceptions
  143. :undoc-members:
  144. Common Interface
  145. ================
  146. .. automodule:: open_gopro.domain.parser_interface
  147. .. autoclass:: open_gopro.gopro_base.GoProBase
  148. .. autoclass:: open_gopro.domain.communicator_interface.GoProBle
  149. .. autoclass:: open_gopro.domain.communicator_interface.GoProHttp
  150. .. autoclass:: open_gopro.domain.communicator_interface.GoProWifi
  151. .. autoclass:: open_gopro.domain.communicator_interface.GoProWiredInterface
  152. .. autoclass:: open_gopro.domain.communicator_interface.GoProWirelessInterface
  153. .. autoclass:: open_gopro.domain.communicator_interface.BaseGoProCommunicator
  154. BLE Interface
  155. =============
  156. .. automodule:: open_gopro.network.ble.controller
  157. .. automodule:: open_gopro.network.ble.client
  158. BLEServices
  159. -----------
  160. .. automodule:: open_gopro.network.ble.services
  161. WiFi Interface
  162. ==============
  163. .. automodule:: open_gopro.network.wifi.controller
  164. .. automodule:: open_gopro.network.wifi.client