From 7d88b72c9be1363b53b3c5e0adeae46160ce76a1 Mon Sep 17 00:00:00 2001 From: Steve Calvert Date: Thu, 8 May 2025 19:17:56 -0700 Subject: [PATCH] fix: Fixing README.md and adding license --- LICENSE | 21 +++++++++++++++++++++ README.md | 20 ++++++++++++++++---- 2 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..2ff03716 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025, Glean Technologies Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 1d47a498..c8a4760f 100644 --- a/README.md +++ b/README.md @@ -13,12 +13,24 @@ Each namespace has its own authentication requirements and access patterns. Whil ```typescript // Example of accessing Client namespace -const glean = new Glean({ apiToken: "client-token" }); -await glean.client.search.query({ query: "search term" }); +const glean = new Glean({ + instance: 'instance-name', + apiToken: 'client-token' +}); + +await glean.client.search.query({ + query: 'search term' +}); // Example of accessing Indexing namespace -const glean = new Glean({ apiToken: "indexing-token" }); -await glean.indexing.documents.index({ /* document data */ }); +const glean = new Glean({ + instance: 'instance-name', + apiToken: 'indexing-token' +}); + +await glean.indexing.documents.index({ + /* document data */ +}); ``` Remember that each namespace requires its own authentication token type as described in the [Authentication Methods](#authentication-methods) section.