Skip to content

DOCS-4129: Remove "Establish a connection" sections from API pages #4422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions docs/dev/reference/apis/components/arm.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,48 +19,6 @@ The arm component supports the following methods:

{{< readfile "/static/include/components/apis/generated/arm-table.md" >}}

## Establish a connection

To get started using Viam's SDKs to connect to and control your arm and the rest of your machine, go to your machine's page.
Navigate to the **CONNECT** tab's **Code sample** page, select your preferred programming language, and copy the sample code.

{{% snippet "show-secret.md" %}}

When executed, this sample code creates a connection to your machine as a client.

The following examples assume you have an arm called `"my_arm"` configured as a component of your machine.
If your arm has a different name, change the `name` in the code.

Import the arm package for the SDK you are using:

{{< tabs >}}
{{% tab name="Python" %}}

```python
from viam.components.arm import Arm
# To use move_to_position:
from viam.proto.common import Pose
# To use move_to_joint_positions:
from viam.proto.component.arm import JointPositions
```

{{% /tab %}}
{{% tab name="Go" %}}

```go
import (
"go.viam.com/rdk/components/arm"
// To use MoveToPosition:
"go.viam.com/rdk/referenceframe"
"go.viam.com/rdk/spatialmath"
// To use MoveToJointPositions ("armapi" name optional, but necessary if importing other packages called "v1"):
armapi "go.viam.com/api/component/arm/v1"
)
```

{{% /tab %}}
{{< /tabs >}}

## API

{{< readfile "/static/include/components/apis/generated/arm.md" >}}
32 changes: 0 additions & 32 deletions docs/dev/reference/apis/components/base.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,6 @@ The base component supports the following methods:

{{< readfile "/static/include/components/apis/generated/base-table.md" >}}

## Establish a connection

To get started using Viam's SDKs to connect to and control your base and the rest of your machine, go to your machine's page, navigate to the **CONNECT** tab's **Code sample** page, select your preferred programming language, and copy the sample code.

{{% snippet "show-secret.md" %}}

When executed, this sample code creates a connection to your machine as a client.

The following examples assume you have a wheeled base called `"my_base"` configured as a component of your machine.
If your base has a different name, change the `name` in the code.

Import the base package for the SDK you are using:

{{< tabs >}}
{{% tab name="Python" %}}

```python
from viam.components.base import Base
```

{{% /tab %}}
{{% tab name="Go" %}}

```go
import (
"go.viam.com/rdk/components/base"
)
```

{{% /tab %}}
{{< /tabs >}}

## API

{{< readfile "/static/include/components/apis/generated/base.md" >}}
34 changes: 0 additions & 34 deletions docs/dev/reference/apis/components/board.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,40 +18,6 @@ The board component supports the following methods:

{{< readfile "/static/include/components/apis/generated/board-table.md" >}}

## Establish a connection

To get started using Viam's SDKs to connect to and control your board and the rest of your machine, go to your machine's page.
Navigate to the **CONNECT** tab's **Code sample** page, select your preferred programming language, and copy the sample code.

{{% snippet "show-secret.md" %}}

When executed, this sample code will create a connection to your machine as a client.
Then control your machine programmatically by getting your `board` component from the machine with `FromRobot` and adding API method calls, as shown in the following examples.

The following examples assume you have a board called `"my_board"` configured as a component of your machine.
If your board has a different name, change the `name` in the code.

Import the board package for the SDK you are using:

{{< tabs >}}
{{% tab name="Python" %}}

```python
from viam.components.board import Board
```

{{% /tab %}}
{{% tab name="Go" %}}

```go
import (
"go.viam.com/rdk/components/board"
)
```

{{% /tab %}}
{{< /tabs >}}

## API

{{< readfile "/static/include/components/apis/generated/board.md" >}}
32 changes: 0 additions & 32 deletions docs/dev/reference/apis/components/button.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,6 @@ The button component supports the following methods:

{{< readfile "/static/include/components/apis/generated/button-table.md" >}}

## Establish a connection

To get started using Viam's SDKs to connect to and control your button and the rest of your machine, go to your machine's page, navigate to the **CONNECT** tab's **Code sample** page, select your preferred programming language, and copy the sample code.

{{% snippet "show-secret.md" %}}

When executed, this sample code creates a connection to your machine as a client.

The following examples assume you have an button called `"my_button"` configured as a component of your machine.
If your button has a different name, change the `name` in the code.

Import the button package for the SDK you are using:

{{< tabs >}}
{{% tab name="Python" %}}

```python
from viam.components.button import Button
```

{{% /tab %}}
{{% tab name="Go" %}}

```go
import (
"go.viam.com/rdk/components/button"
)
```

{{% /tab %}}
{{< /tabs >}}

## API

{{< readfile "/static/include/components/apis/generated/button.md" >}}
32 changes: 0 additions & 32 deletions docs/dev/reference/apis/components/camera.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,38 +24,6 @@ The camera component supports the following methods:

{{< readfile "/static/include/components/apis/generated/camera-table.md" >}}

## Establish a connection

To get started using Viam's SDKs to connect to and control your camera and the rest of your machine, go to your machine's page, navigate to the **CONNECT** tab's **Code sample** page, select your preferred programming language, and copy the sample code.

{{% snippet "show-secret.md" %}}

When executed, this sample code creates a connection to your machine as a client.

The following examples assume you have a camera called `"my_camera"` configured as a component of your machine.
If your camera has a different name, change the `name` in the code.

Import the camera package for the SDK you are using:

{{< tabs >}}
{{% tab name="Python" %}}

```python
from viam.components.camera import Camera
```

{{% /tab %}}
{{% tab name="Go" %}}

```go
import (
"go.viam.com/rdk/components/camera"
)
```

{{% /tab %}}
{{< /tabs >}}

## API

{{< readfile "/static/include/components/apis/generated/camera.md" >}}
32 changes: 0 additions & 32 deletions docs/dev/reference/apis/components/encoder.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,6 @@ The encoder component supports the following methods:

{{< readfile "/static/include/components/apis/generated/encoder-table.md" >}}

## Establish a connection

To get started using Viam's SDKs to connect to and control your encoder and the rest of your machine, go to your machine's page, navigate to the **CONNECT** tab's **Code sample** page, select your preferred programming language, and copy the sample code.

{{% snippet "show-secret.md" %}}

When executed, this sample code creates a connection to your machine as a client.

The following examples assume you have an encoder called `"my_encoder"` configured as a component of your machine.
If your encoder has a different name, change the `name` in the code.

Import the encoder package for the SDK you are using:

{{< tabs >}}
{{% tab name="Python" %}}

```python
from viam.components.encoder import Encoder
```

{{% /tab %}}
{{% tab name="Go" %}}

```go
import (
"go.viam.com/rdk/components/encoder"
)
```

{{% /tab %}}
{{< /tabs >}}

## API

{{< readfile "/static/include/components/apis/generated/encoder.md" >}}
32 changes: 0 additions & 32 deletions docs/dev/reference/apis/components/gantry.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,6 @@ The gantry component supports the following methods:

{{< readfile "/static/include/components/apis/generated/gantry-table.md" >}}

## Establish a connection

To get started using Viam's SDKs to connect to and control your gantry and the rest of your machine, go to your machine's page, navigate to the **CONNECT** tab's **Code sample** page, select your preferred programming language, and copy the sample code.

{{% snippet "show-secret.md" %}}

When executed, this sample code creates a connection to your machine as a client.

The following examples assume you have a gantry called `"my_gantry"` configured as a component of your machine.
If your gantry has a different name, change the `name` in the code.

Import the gantry package for the SDK you are using:

{{< tabs >}}
{{% tab name="Python" %}}

```python
from viam.components.gantry import Gantry
```

{{% /tab %}}
{{% tab name="Go" %}}

```go
import (
"go.viam.com/rdk/components/gantry"
)
```

{{% /tab %}}
{{< /tabs >}}

## API

{{< readfile "/static/include/components/apis/generated/gantry.md" >}}
40 changes: 0 additions & 40 deletions docs/dev/reference/apis/components/generic.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,46 +24,6 @@ The generic component supports the following method:

{{< readfile "/static/include/components/apis/generated/generic_component-table.md" >}}

## Establish a connection

To get started using Viam's SDKs to connect to and control your generic component and the rest of your machine, go to your machine's page, navigate to the **CONNECT** tab's **Code sample** page, select your preferred programming language, and copy the sample code.

{{% snippet "show-secret.md" %}}

When executed, this sample code will create a connection to your machine as a client.
Then control your machine programmatically by getting your `generic` component from the machine with `FromRobot` and adding API method calls, as shown in the following examples.

The following examples assume you have a board called "my_board" configured as a component of your machine.
If your board has a different name, change the `name` in the code.

Import the generic component package for the SDK you are using:

{{< tabs >}}
{{% tab name="Python" %}}

```python
from viam.components.generic import Generic
```

{{% /tab %}}
{{% tab name="Go" %}}

```go
import (
"go.viam.com/rdk/components/generic"
)
```

{{% /tab %}}
{{% tab name="C++" %}}

```cpp
#include <viam/sdk/components/generic/generic.hpp>
```

{{% /tab %}}
{{< /tabs >}}

## API

{{< readfile "/static/include/components/apis/generated/generic_component.md" >}}
32 changes: 0 additions & 32 deletions docs/dev/reference/apis/components/gripper.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,6 @@ The gripper component supports the following methods:

{{< readfile "/static/include/components/apis/generated/gripper-table.md" >}}

## Establish a connection

To get started using Viam's SDKs to connect to and control your gripper and the rest of your machine, go to your machine's page, navigate to the **CONNECT** tab's **Code sample** page, select your preferred programming language, and copy the sample code.

{{% snippet "show-secret.md" %}}

When executed, this sample code creates a connection to your machine as a client.

The following examples assume you have a gripper called `"my_gripper"` configured as a component of your machine.
If your gripper has a different name, change the `name` in the code.

Import the gripper package for the SDK you are using:

{{< tabs >}}
{{% tab name="Python" %}}

```python
from viam.components.gripper import Gripper
```

{{% /tab %}}
{{% tab name="Go" %}}

```go
import (
"go.viam.com/rdk/components/gripper"
)
```

{{% /tab %}}
{{< /tabs >}}

## API

{{< readfile "/static/include/components/apis/generated/gripper.md" >}}
Loading
Loading