Skip to content

Commit

Permalink
Fix mistakes in register examples
Browse files Browse the repository at this point in the history
  • Loading branch information
danielballan committed Mar 6, 2024
1 parent acfa2a2 commit 885ae15
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions docs/source/how-to/register.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ Use the Python client, as in this example.

```py
from tiled.client import from_uri
from tiled.client.data_source import Asset, DataSource
from tiled.structures.core import StructureFamily
from tiled.structures.data_source import Asset, DataSource

# You can pass the api_key in explicitly as shown here, but for security, it
# is best to set the API key in the environment variable TILED_API_KEY, which
Expand All @@ -87,11 +87,17 @@ client = from_uri("http://localhost:8000", api_key="...")
# POST /api/v1/register/{path}
client.new(
structure_family=StructureFamily.array,
data_sources=DataSource(
assets=[Asset(data_uri="file:///...", num=1), Asset(data_uri="file:///...", num=2)],
mimetype="multipart/related;type=image/tiff",
structure_family=StructureFamily.array,
),
data_sources=[
DataSource(
assets=[
Asset(data_uri="file:///...", num=1),
Asset(data_uri="file:///...", num=2)
],
mimetype="multipart/related;type=image/tiff",
structure_family=StructureFamily.array,
management="external",
),
],
metadata={},
specs=[],
)
Expand Down

0 comments on commit 885ae15

Please sign in to comment.