Skip to content

Commit

Permalink
Adds documentation (#38)
Browse files Browse the repository at this point in the history
* Adds documentation

* Added project links

* people -> projects

* add note about loacl api usage

* double

* "warning" about docs
  • Loading branch information
ludeeus authored and eliseomartelli committed Dec 24, 2018
1 parent afe936d commit c2d79bb
Show file tree
Hide file tree
Showing 48 changed files with 2,056 additions and 83 deletions.
86 changes: 3 additions & 83 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,97 +5,17 @@

_Get information from, and control various Google devices._

This Python package is based of the works of [rithvikvibhu/GHLocalApi][GHLocalApi]

## Install

```bash
pip install googledevices
```

Look at the files in the ['commands'][commands] directory for usage examples.

This package also comes with a CLI.

```bash
Usage: googledevices [OPTIONS] COMMAND [ARGS]...

Options:
--help Show this message and exit.

Commands:
alarm-volume Get or set alarm volume.
debug Get debug information.
device-info Get information about a Google device on your...
get-all-devices Get information about all devices on your network.
get-bluetooth-devices Get bluetooth devices from a unit.
googlewifi-clients Get devices from google wifi.
googlewifi-info Get information about google wifi.
info Get information about this package.
reboot Reboot a Google device.
scan-network Scan the entire subnet for Google devices.
```

Sample usage of the CLI:

```bash
username@hostname:~$ googledevices scan-network
[
{
"assistant": false,
"bluetooth": false,
"host": "192.168.2.136",
"model": "Chromecast Ultra",
"name": "ChromeCast ULTRA"
},
{
"assistant": false,
"bluetooth": false,
"host": "192.168.2.188",
"model": "Chromecast",
"name": "Chrome Cast"
},
{
"assistant": true,
"bluetooth": true,
"host": "192.168.2.234",
"model": "Google Home Mini",
"name": "Living Room"
}
]
```

### Maintainers

- [ludeeus][ludeeus]
- [eliseomartelli][eliseomartelli]

#### Notice

_This is not affiliated, associated, authorized, endorsed by, or in any way officially connected with [Alphabet][alphabet], or any of its subsidiaries or its affiliates. The name "Google" as well as related names, marks, emblems and images are registered trademarks of [Alphabet][alphabet]._


## Contributing

1. [Check for open features/bugs][issues]
or [initiate a discussion on one][issues-new].
2. [Fork the repository][fork].
3. Install the dev environment: `make init`.
4. Enter the virtual environment: `pipenv shell`
5. Code your new feature or bug fix.
6. Run `make lint` and make sure the score still is `10.00/10`
7. Submit a [pull request][pull-request]!
For documentation please visit the [documentation website][docs].
The documentation _might_ not be "good" but it's there.

[alphabet]: https://abc.xyz/
[commands]: https://github.com/ludeeus/googledevices/tree/master/googledevices/cli/commands
[eliseomartelli]: https://github.com/eliseomartelli
[fork]: https://github.com/ludeeus/googledevices/fork
[GHLocalApi]: https://github.com/rithvikvibhu/GHLocalApi
[issues]: https://github.com/ludeeus/googledevices/issues
[issues-new]: https://github.com/ludeeus/googledevices/issues/new
[ludeeus]: https://github.com/ludeeus
[docs]: https://ludeeus.github.io/googledevices/
[travis]: https://travis-ci.com/ludeeus/googledevices
[travis_status]: https://travis-ci.com/ludeeus/googledevices.svg?branch=master
[pull-request]: https://github.com/ludeeus/googledevices/compare
[pypi]:https://pypi.org/project/googledevices/
[pypi_badge]: https://badge.fury.io/py/googledevices.svg
36 changes: 36 additions & 0 deletions docs/classes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[![Build Status][travis_status]][travis] [![PyPI version][pypi_badge]][pypi] _Get information from, and control various Google devices._

***

[HOME][home] | [PLATFORMS][platforms] | [**CLASSES**][classes] | [METHODS][methods] | [FUNCTIONS][functions] | [CLI][cli]

***

## Classes for the `Cast` platform.

_This uses a local API for the communication._

- [Assistant](https://ludeeus.github.io/googledevices/classes/cast/assistant)
- [Bluetooth](https://ludeeus.github.io/googledevices/classes/cast/bluetooth)
- [Info](https://ludeeus.github.io/googledevices/classes/cast/info)
- [Settings](https://ludeeus.github.io/googledevices/classes/cast/settings)
- [Wifi](https://ludeeus.github.io/googledevices/classes/cast/wifi)

## Classes for the `WiFi` platform.

_This uses a local API for the communication._

- [Clients](https://ludeeus.github.io/googledevices/classes/wifi/clients)
- [Info](https://ludeeus.github.io/googledevices/classes/wifi/info)

<!-- menu -->
[travis]: https://travis-ci.com/ludeeus/googledevices
[travis_status]: https://travis-ci.com/ludeeus/googledevices.svg?branch=master
[pypi]:https://pypi.org/project/googledevices/
[pypi_badge]: https://badge.fury.io/py/googledevices.svg
[home]: https://ludeeus.github.io/googledevices
[platforms]: https://ludeeus.github.io/googledevices/platforms
[classes]: https://ludeeus.github.io/googledevices/classes
[methods]: https://ludeeus.github.io/googledevices/methods
[functions]: https://ludeeus.github.io/googledevices/functions
[cli]: https://ludeeus.github.io/googledevices/cli
37 changes: 37 additions & 0 deletions docs/classes/cast/assistant.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[![Build Status][travis_status]][travis] [![PyPI version][pypi_badge]][pypi] _Get information from, and control various Google devices._

***

[HOME][home] | [PLATFORMS][platforms] | [**CLASSES**][classes] | [METHODS][methods] | [FUNCTIONS][functions] | [CLI][cli]

***

This class handles methods that are nested under the `assistant` endpoint.

## Methods for the `Assistant` class.

- [set_night_mode_params](https://ludeeus.github.io/googledevices/methods/cast/assistant/set_night_mode_params)
- [notifications_enabled](https://ludeeus.github.io/googledevices/methods/cast/assistant/notifications_enabled)
- [set_accessibility](https://ludeeus.github.io/googledevices/methods/cast/assistant/set_accessibility)
- [delete_alarms](https://ludeeus.github.io/googledevices/methods/cast/assistant/delete_alarms)
- [set_equalizer](https://ludeeus.github.io/googledevices/methods/cast/assistant/set_equalizer)
- [get_alarms](https://ludeeus.github.io/googledevices/methods/cast/assistant/get_alarms)
- [get_alarm_volume](https://ludeeus.github.io/googledevices/methods/cast/assistant/get_alarm_volume)
- [set_alarm_volume](https://ludeeus.github.io/googledevices/methods/cast/assistant/set_alarm_volume)

## Properties for the `Assistant` class.

- `alarms` Returns active alarms and timers. _You need to run the [get_alarms](https://ludeeus.github.io/googledevices/methods/cast/assistant/get_alarms) method before this get populated._
- `alarm_volume` Returns the current alarm volume. _You need to run the [get_alarm_volume](https://ludeeus.github.io/googledevices/methods/cast/assistant/get_alarm_volume) method before this get populated._

<!-- menu -->
[travis]: https://travis-ci.com/ludeeus/googledevices
[travis_status]: https://travis-ci.com/ludeeus/googledevices.svg?branch=master
[pypi]:https://pypi.org/project/googledevices/
[pypi_badge]: https://badge.fury.io/py/googledevices.svg
[home]: https://ludeeus.github.io/googledevices
[platforms]: https://ludeeus.github.io/googledevices/platforms
[classes]: https://ludeeus.github.io/googledevices/classes
[methods]: https://ludeeus.github.io/googledevices/methods
[functions]: https://ludeeus.github.io/googledevices/functions
[cli]: https://ludeeus.github.io/googledevices/cli
37 changes: 37 additions & 0 deletions docs/classes/cast/bluetooth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[![Build Status][travis_status]][travis] [![PyPI version][pypi_badge]][pypi] _Get information from, and control various Google devices._

***

[HOME][home] | [PLATFORMS][platforms] | [**CLASSES**][classes] | [METHODS][methods] | [FUNCTIONS][functions] | [CLI][cli]

***

This class handles methods that are nested under the `bluetooth` endpoint.

## Methods for the `Bluetooth` class.

- [forget_paired_device](https://ludeeus.github.io/googledevices/methods/cast/bluetooth/forget_paired_device)
- [get_bluetooth_status](https://ludeeus.github.io/googledevices/methods/cast/bluetooth/get_bluetooth_status)
- [get_paired_devices](https://ludeeus.github.io/googledevices/methods/cast/bluetooth/get_paired_devices)
- [get_scan_result](https://ludeeus.github.io/googledevices/methods/cast/bluetooth/get_scan_result)
- [pair_with_mac](https://ludeeus.github.io/googledevices/methods/cast/bluetooth/pair_with_mac)
- [scan_for_devices](https://ludeeus.github.io/googledevices/methods/cast/bluetooth/scan_for_devices)
- [set_discovery_enabled](https://ludeeus.github.io/googledevices/methods/cast/bluetooth/set_discovery_enabled)

## Properties for the `Bluetooth` class.

- `status` Return the the bluetooth status of the device. _You need to run the [get_bluetooth_status](https://ludeeus.github.io/googledevices/methods/cast/bluetooth/get_bluetooth_status) method before this get populated._
- `devices` Return the devices if any. _You need to run the [get_scan_result](https://ludeeus.github.io/googledevices/methods/cast/bluetooth/get_scan_result) method before this get populated._
- `paired_devices` Return paired devices if any. _You need to run the [get_paired_devices](https://ludeeus.github.io/googledevices/methods/cast/bluetooth/get_paired_devices) method before this get populated._

<!-- menu -->
[travis]: https://travis-ci.com/ludeeus/googledevices
[travis_status]: https://travis-ci.com/ludeeus/googledevices.svg?branch=master
[pypi]:https://pypi.org/project/googledevices/
[pypi_badge]: https://badge.fury.io/py/googledevices.svg
[home]: https://ludeeus.github.io/googledevices
[platforms]: https://ludeeus.github.io/googledevices/platforms
[classes]: https://ludeeus.github.io/googledevices/classes
[methods]: https://ludeeus.github.io/googledevices/methods
[functions]: https://ludeeus.github.io/googledevices/functions
[cli]: https://ludeeus.github.io/googledevices/cli
39 changes: 39 additions & 0 deletions docs/classes/cast/info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[![Build Status][travis_status]][travis] [![PyPI version][pypi_badge]][pypi] _Get information from, and control various Google devices._

***

[HOME][home] | [PLATFORMS][platforms] | [**CLASSES**][classes] | [METHODS][methods] | [FUNCTIONS][functions] | [CLI][cli]

***

This class handles methods that are nested under the `info` endpoint.

## Methods for the `Info` class.

- [get_app_device_id](https://ludeeus.github.io/googledevices/methods/cast/info/get_app_device_id)
- [get_device_info](https://ludeeus.github.io/googledevices/methods/cast/info/get_device_info)
- [get_locales](https://ludeeus.github.io/googledevices/methods/cast/info/get_locales)
- [get_offer](https://ludeeus.github.io/googledevices/methods/cast/info/get_offer)
- [get_timezones](https://ludeeus.github.io/googledevices/methods/cast/info/get_timezones)
- [speedtest](https://ludeeus.github.io/googledevices/methods/cast/info/speedtest)

## Properties for the `Info` class.

- `offer` Return the offer token. _You need to run the [get_offer](https://ludeeus.github.io/googledevices/methods/cast/info/get_offer) method before this get populated._
- `timezones` Return supported timezones. _You need to run the [get_timezones](https://ludeeus.github.io/googledevices/methods/cast/info/get_timezones) method before this get populated._
- `locales` Return supported locales. _You need to run the [get_locales](https://ludeeus.github.io/googledevices/methods/cast/info/get_locales) method before this get populated._
- `app_device_id` Return app_device_id. _You need to run the [get_app_device_id](https://ludeeus.github.io/googledevices/methods/cast/info/get_app_device_id) method before this get populated._
- `device_info` Return the device info if any. _You need to run the [get_device_info](https://ludeeus.github.io/googledevices/methods/cast/info/get_device_info) method before this get populated._
- `name` Return the device name. _You need to run the [get_device_info](https://ludeeus.github.io/googledevices/methods/cast/info/get_device_info) method before this get populated._

<!-- menu -->
[travis]: https://travis-ci.com/ludeeus/googledevices
[travis_status]: https://travis-ci.com/ludeeus/googledevices.svg?branch=master
[pypi]:https://pypi.org/project/googledevices/
[pypi_badge]: https://badge.fury.io/py/googledevices.svg
[home]: https://ludeeus.github.io/googledevices
[platforms]: https://ludeeus.github.io/googledevices/platforms
[classes]: https://ludeeus.github.io/googledevices/classes
[methods]: https://ludeeus.github.io/googledevices/methods
[functions]: https://ludeeus.github.io/googledevices/functions
[cli]: https://ludeeus.github.io/googledevices/cli
27 changes: 27 additions & 0 deletions docs/classes/cast/settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[![Build Status][travis_status]][travis] [![PyPI version][pypi_badge]][pypi] _Get information from, and control various Google devices._

***

[HOME][home] | [PLATFORMS][platforms] | [**CLASSES**][classes] | [METHODS][methods] | [FUNCTIONS][functions] | [CLI][cli]

***

This class handles methods that are nested under the `settings` endpoint.

## Methods for the `Settings` class.

- [control_notifications](https://ludeeus.github.io/googledevices/methods/cast/settings/control_notifications)
- [reboot](https://ludeeus.github.io/googledevices/methods/cast/settings/reboot)
- [set_eureka_info](https://ludeeus.github.io/googledevices/methods/cast/settings/set_eureka_info)

<!-- menu -->
[travis]: https://travis-ci.com/ludeeus/googledevices
[travis_status]: https://travis-ci.com/ludeeus/googledevices.svg?branch=master
[pypi]:https://pypi.org/project/googledevices/
[pypi_badge]: https://badge.fury.io/py/googledevices.svg
[home]: https://ludeeus.github.io/googledevices
[platforms]: https://ludeeus.github.io/googledevices/platforms
[classes]: https://ludeeus.github.io/googledevices/classes
[methods]: https://ludeeus.github.io/googledevices/methods
[functions]: https://ludeeus.github.io/googledevices/functions
[cli]: https://ludeeus.github.io/googledevices/cli
33 changes: 33 additions & 0 deletions docs/classes/cast/wifi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[![Build Status][travis_status]][travis] [![PyPI version][pypi_badge]][pypi] _Get information from, and control various Google devices._

***

[HOME][home] | [PLATFORMS][platforms] | [**CLASSES**][classes] | [METHODS][methods] | [FUNCTIONS][functions] | [CLI][cli]

***

This class handles methods that are nested under the `wifi` endpoint.

## Methods for the `Wifi` class.

- [forget_network](https://ludeeus.github.io/googledevices/methods/cast/wifi/forget_network)
- [get_configured_networks](https://ludeeus.github.io/googledevices/methods/cast/wifi/get_configured_networks)
- [get_wifi_scan_result](https://ludeeus.github.io/googledevices/methods/cast/wifi/get_wifi_scan_result)
- [scan_for_wifi](https://ludeeus.github.io/googledevices/methods/cast/wifi/scan_for_wifi)

## Properties for the `Wifi` class.

- `configured_networks` Return the configured networks of the device. _You need to run the [get_configured_networks](https://ludeeus.github.io/googledevices/methods/cast/wifi/get_configured_networks) method before this get populated._
- `nearby_networks` Return the nearby networks of the device. _You need to run the [get_wifi_scan_result](https://ludeeus.github.io/googledevices/methods/cast/wifi/get_wifi_scan_result) method before this get populated._

<!-- menu -->
[travis]: https://travis-ci.com/ludeeus/googledevices
[travis_status]: https://travis-ci.com/ludeeus/googledevices.svg?branch=master
[pypi]:https://pypi.org/project/googledevices/
[pypi_badge]: https://badge.fury.io/py/googledevices.svg
[home]: https://ludeeus.github.io/googledevices
[platforms]: https://ludeeus.github.io/googledevices/platforms
[classes]: https://ludeeus.github.io/googledevices/classes
[methods]: https://ludeeus.github.io/googledevices/methods
[functions]: https://ludeeus.github.io/googledevices/functions
[cli]: https://ludeeus.github.io/googledevices/cli
30 changes: 30 additions & 0 deletions docs/classes/wifi/clients.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[![Build Status][travis_status]][travis] [![PyPI version][pypi_badge]][pypi] _Get information from, and control various Google devices._

***

[HOME][home] | [PLATFORMS][platforms] | [**CLASSES**][classes] | [METHODS][methods] | [FUNCTIONS][functions] | [CLI][cli]

***

This class handles methods that are nested under the `clients` endpoint.

## Methods for the `Clients` class.

- [get_clients](https://ludeeus.github.io/googledevices/methods/wifi/clients/get_clients)

## Properties for the `Clients` class.

- `clients` Return devices form the network. _You need to run the [get_clients](https://ludeeus.github.io/googledevices/methods/wifi/clients/get_clients) method before this get populated._


<!-- menu -->
[travis]: https://travis-ci.com/ludeeus/googledevices
[travis_status]: https://travis-ci.com/ludeeus/googledevices.svg?branch=master
[pypi]:https://pypi.org/project/googledevices/
[pypi_badge]: https://badge.fury.io/py/googledevices.svg
[home]: https://ludeeus.github.io/googledevices
[platforms]: https://ludeeus.github.io/googledevices/platforms
[classes]: https://ludeeus.github.io/googledevices/classes
[methods]: https://ludeeus.github.io/googledevices/methods
[functions]: https://ludeeus.github.io/googledevices/functions
[cli]: https://ludeeus.github.io/googledevices/cli
32 changes: 32 additions & 0 deletions docs/classes/wifi/info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[![Build Status][travis_status]][travis] [![PyPI version][pypi_badge]][pypi] _Get information from, and control various Google devices._

***

[HOME][home] | [PLATFORMS][platforms] | [**CLASSES**][classes] | [METHODS][methods] | [FUNCTIONS][functions] | [CLI][cli]

***

This class handles methods that are nested under the `info` endpoint.

## Methods for the `Info` class.

- [get_host](https://ludeeus.github.io/googledevices/methods/wifi/info/get_host)
- [get_wifi_info](https://ludeeus.github.io/googledevices/methods/wifi/info/get_wifi_info)

## Properties for the `Info` class.

- `wifi_host` Return the hostname or IP of the device. _You need to run the [get_host](https://ludeeus.github.io/googledevices/methods/wifi/info/get_host) method before this get populated._
- `wifi_info` Return the device info if any.. _You need to run the [get_host](https://ludeeus.github.io/googledevices/methods/wifi/info/get_host) method before this get populated._


<!-- menu -->
[travis]: https://travis-ci.com/ludeeus/googledevices
[travis_status]: https://travis-ci.com/ludeeus/googledevices.svg?branch=master
[pypi]:https://pypi.org/project/googledevices/
[pypi_badge]: https://badge.fury.io/py/googledevices.svg
[home]: https://ludeeus.github.io/googledevices
[platforms]: https://ludeeus.github.io/googledevices/platforms
[classes]: https://ludeeus.github.io/googledevices/classes
[methods]: https://ludeeus.github.io/googledevices/methods
[functions]: https://ludeeus.github.io/googledevices/functions
[cli]: https://ludeeus.github.io/googledevices/cli
Loading

0 comments on commit c2d79bb

Please sign in to comment.