Skip to content

Commit 20d320f

Browse files
Update code samples
1 parent 57faa96 commit 20d320f

File tree

7 files changed

+1297
-744
lines changed

7 files changed

+1297
-744
lines changed

.speakeasy/workflow.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ sources:
2424
- 0.9.0
2525
glean-client-merged-code-samples-spec:
2626
sourceNamespace: glean-client-merged-code-samples-spec
27-
sourceRevisionDigest: sha256:08007adf23d4d6f7acd3d037662d400d6c0304376d828234aefebbffe5914cfc
28-
sourceBlobDigest: sha256:c5b8ee2c92119958ae802296a47dbb5085c2190744c874f92883a98d65863616
27+
sourceRevisionDigest: sha256:1420ed690d295a415b66f5f5c0c823251e35c43c5c32f2e5709ebbaf0b410eb9
28+
sourceBlobDigest: sha256:07783bb16e23520f5662c31c52e60ecd1042e0539b80d0fe1c420e4a68a47bcd
2929
tags:
3030
- latest
3131
- main
@@ -39,8 +39,8 @@ sources:
3939
- 0.9.0
4040
glean-index-merged-code-samples-spec:
4141
sourceNamespace: glean-index-merged-code-samples-spec
42-
sourceRevisionDigest: sha256:0ab8e6348ec03fb842c981eb48084bc7044e669db5804397dc14bb9bfad71eef
43-
sourceBlobDigest: sha256:a3b31aa69d6e7c0e6bfea4f12a2251f9f1aadf2f17034be6a74f5f1dc3b0d9ab
42+
sourceRevisionDigest: sha256:390a008f5b2414a141656c92723d96bd5c0e35dd0e71ae325a683139a6bbaaca
43+
sourceBlobDigest: sha256:eaec2d89f7dc007f43789b7e09da68594b5923cc73b2ae433e17b86e44d88ee8
4444
tags:
4545
- latest
4646
- main

final_specs/client_rest.yaml

Lines changed: 250 additions & 68 deletions
Large diffs are not rendered by default.

final_specs/indexing.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2479,7 +2479,7 @@ paths:
24792479
}
24802480
- lang: go
24812481
label: Go (API Client)
2482-
source: "package main\n\nimport(\n\t\"context\"\n\t\"os\"\n\tapiclientgo \"github.com/gleanwork/api-client-go\"\n\t\"github.com/gleanwork/api-client-go/models/components\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n\n s := apiclientgo.New(\n apiclientgo.WithSecurity(os.Getenv(\"GLEAN_API_TOKEN\")),\n apiclientgo.WithInstance(os.Getenv(\"GLEAN_INSTANCE\")),\n )\n\n res, err := s.Indexing.Datasources.Add(ctx, components.CustomDatasourceConfig{\n Name: \"<value>\",\n URLRegex: apiclientgo.String(\"https://example-company.datasource.com/.*\"),\n Quicklinks: []components.Quicklink{\n components.Quicklink{\n IconConfig: &components.IconConfig{\n Color: apiclientgo.String(\"#343CED\"),\n Key: apiclientgo.String(\"person_icon\"),\n IconType: components.IconTypeGlyph.ToPointer(),\n Name: apiclientgo.String(\"user\"),\n },\n },\n },\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
2482+
source: "package main\n\nimport(\n\t\"context\"\n\t\"os\"\n\tapiclientgo \"github.com/gleanwork/api-client-go\"\n\t\"github.com/gleanwork/api-client-go/models/components\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n\n s := apiclientgo.New(\n apiclientgo.WithSecurity(os.Getenv(\"GLEAN_API_TOKEN\")),\n apiclientgo.WithInstance(os.Getenv(\"GLEAN_INSTANCE\")),\n )\n\n res, err := s.Indexing.Datasources.Add(ctx, components.CustomDatasourceConfig{\n Name: \"<value>\",\n URLRegex: apiclientgo.Pointer(\"https://example-company.datasource.com/.*\"),\n Quicklinks: []components.Quicklink{\n components.Quicklink{\n IconConfig: &components.IconConfig{\n Color: apiclientgo.Pointer(\"#343CED\"),\n Key: apiclientgo.Pointer(\"person_icon\"),\n IconType: components.IconTypeGlyph.ToPointer(),\n Name: apiclientgo.Pointer(\"user\"),\n },\n },\n },\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
24832483
/api/index/v1/getdatasourceconfig:
24842484
post:
24852485
summary: Get datasource config
@@ -5220,6 +5220,7 @@ components:
52205220
- EXTERNAL_SHORTCUT
52215221
- ENTITY
52225222
- CALENDAR
5223+
- AGENTS
52235224
description: The document category of this object type.
52245225
propertyDefinitions:
52255226
type: array
@@ -5355,6 +5356,7 @@ components:
53555356
- EXTERNAL_SHORTCUT
53565357
- ENTITY
53575358
- CALENDAR
5359+
- AGENTS
53585360
default: UNCATEGORIZED
53595361
description: The type of this datasource. It is an important signal for relevance and must be specified and cannot be UNCATEGORIZED. Please refer to [this](https://developers.glean.com/docs/indexing_api_datasource_category/) for more details.
53605362
urlRegex:

0 commit comments

Comments
 (0)