From 935db71df539a358f2e6da43f60be3b3d1686ce3 Mon Sep 17 00:00:00 2001 From: Angela Li Date: Wed, 26 Jul 2017 16:26:35 -0700 Subject: [PATCH 1/3] Fix docs --- docs/index.rst | 3 ++- docs/trace/apis.rst | 4 ++-- docs/trace/starting.rst | 25 ++++++++++++++++++++----- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index ee47a2ac378f..a88bea834e49 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -17,6 +17,7 @@ monitoring/usage logging/usage storage/client + trace/index translate/usage vision/index @@ -73,4 +74,4 @@ Resources * `GitHub `__ * `Issues `__ * `Stack Overflow `__ -* `PyPI `__ +* `PyPI `__ \ No newline at end of file diff --git a/docs/trace/apis.rst b/docs/trace/apis.rst index 80a8d50c0c60..045d031b8e62 100644 --- a/docs/trace/apis.rst +++ b/docs/trace/apis.rst @@ -5,7 +5,7 @@ APIs ---- .. autosummary:: - :toctree: +.. :toctree:: google.cloud.gapic.trace.v1.trace_service_client @@ -14,6 +14,6 @@ API types ~~~~~~~~~ .. autosummary:: - :toctree: +.. :toctree:: google.cloud.gapic.trace.v1.enums diff --git a/docs/trace/starting.rst b/docs/trace/starting.rst index 245fcfd68a87..cda514034842 100644 --- a/docs/trace/starting.rst +++ b/docs/trace/starting.rst @@ -1,7 +1,7 @@ Getting started =============== -gapic-google-cloud-trace-v1 will allow you to connect to the `Stackdriver Trace API`_ and access all its methods. In order to achieve this, you need to set up authentication as well as install the library locally. +google-cloud-trace will allow you to connect to the `Stackdriver Trace API`_ and access all its methods. In order to achieve this, you need to set up authentication as well as install the library locally. .. _`Stackdriver Trace API`: https://developers.google.com/apis-explorer/?hl=en_US#p/cloudtrace/v1/ @@ -29,7 +29,7 @@ Mac/Linux pip install virtualenv virtualenv source /bin/activate - /bin/pip install gapic-google-cloud-trace-v1 + /bin/pip install google-cloud-trace Windows ~~~~~~~ @@ -39,7 +39,7 @@ Windows pip install virtualenv virtualenv \Scripts\activate - \Scripts\pip.exe install gapic-google-cloud-trace-v1 + \Scripts\pip.exe install google-cloud-trace Using the API @@ -74,5 +74,20 @@ At this point you are all set to continue. Examples ~~~~~~~~ -To see example usage, please read through the :doc:`API reference `. The -documentation for each API method includes simple examples. +.. code-block:: python + + from google.cloud.trace import client + + client = client.Client(project_id='your_project_id') + + # Patch traces, traces should be a dict + client.patch_traces(traces=traces) + + # Get trace + client.get_trace(trace_id='your_trace_id') + + # List traces + traces = client.list_traces() + + for trace in traces: + print trace From 6561b0e6b9147b61cb83b5c1456670df228b172d Mon Sep 17 00:00:00 2001 From: Angela Li Date: Wed, 26 Jul 2017 16:28:37 -0700 Subject: [PATCH 2/3] Fix docs --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index a88bea834e49..b9fdb6bc20a2 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -74,4 +74,4 @@ Resources * `GitHub `__ * `Issues `__ * `Stack Overflow `__ -* `PyPI `__ \ No newline at end of file +* `PyPI `__ From d96a991c056379f6ac81f731753c5089b9ea275f Mon Sep 17 00:00:00 2001 From: Angela Li Date: Wed, 26 Jul 2017 16:47:59 -0700 Subject: [PATCH 3/3] Fix docs --- docs/trace/apis.rst | 1 + docs/trace/starting.rst | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/trace/apis.rst b/docs/trace/apis.rst index 045d031b8e62..03c170783e06 100644 --- a/docs/trace/apis.rst +++ b/docs/trace/apis.rst @@ -5,6 +5,7 @@ APIs ---- .. autosummary:: + .. :toctree:: google.cloud.gapic.trace.v1.trace_service_client diff --git a/docs/trace/starting.rst b/docs/trace/starting.rst index cda514034842..0fbd7c108048 100644 --- a/docs/trace/starting.rst +++ b/docs/trace/starting.rst @@ -90,4 +90,4 @@ Examples traces = client.list_traces() for trace in traces: - print trace + print(trace)