Skip to content

Commit b48b953

Browse files
feat: generate SDKs for Looker 26.6.1 (#1676)
Release-As: 26.6.1
1 parent 58aaf86 commit b48b953

File tree

12 files changed

+34
-18
lines changed

12 files changed

+34
-18
lines changed

csharp/sdk/4.0/methods.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ public async Task<SdkResponse<AccessToken, Exception>> login(
323323
string? client_secret = null,
324324
ITransportSettings? options = null)
325325
{
326-
return await AuthRequest<AccessToken, Exception>(HttpMethod.Post, "/login", null,new Values {
326+
return await AuthRequest<AccessToken, Exception>(HttpMethod.Post, "/login", null,new FormValues {
327327
{ "client_id", client_id },
328328
{ "client_secret", client_secret }},options);
329329
}

go/sdk/v4/methods.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ func (l *LookerSDK) ReadAlertNotification(
275275
func (l *LookerSDK) Login(request RequestLogin,
276276
options *rtl.ApiSettings) (AccessToken, error) {
277277
var result AccessToken
278-
err := l.AuthSession.Do(&result, "POST", "/4.0", "/login", nil, map[string]interface{}{"client_id": request.ClientId, "client_secret": request.ClientSecret}, options)
278+
err := l.AuthSession.Do(&result, "POST", "/4.0", "/login", nil, rtl.Values{"client_id": request.ClientId, "client_secret": request.ClientSecret}, options)
279279
return result, err
280280

281281
}

kotlin/src/main/com/looker/sdk/4.0/methods.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,9 +326,11 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) {
326326
return this.post<AccessToken>(
327327
"/login",
328328
mapOf(),
329-
mapOf(
330-
"client_id" to client_id,
331-
"client_secret" to client_secret,
329+
encodeValues(
330+
mapOf(
331+
"client_id" to client_id,
332+
"client_secret" to client_secret,
333+
),
332334
),
333335
)
334336
}

kotlin/src/main/com/looker/sdk/4.0/streams.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,11 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) {
324324
return this.post<ByteArray>(
325325
"/login",
326326
mapOf(),
327-
mapOf(
328-
"client_id" to client_id,
329-
"client_secret" to client_secret,
327+
encodeValues(
328+
mapOf(
329+
"client_id" to client_id,
330+
"client_secret" to client_secret,
331+
),
330332
),
331333
)
332334
}

packages/sdk/src/4.0/funcs.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,10 @@ export const login = async (
725725
return sdk.post<IAccessToken, IError>(
726726
'/login',
727727
null,
728-
{ client_id: request.client_id, client_secret: request.client_secret },
728+
new URLSearchParams({
729+
client_id: request.client_id,
730+
client_secret: request.client_secret,
731+
} as unknown as Record<string, string>),
729732
options
730733
);
731734
};

packages/sdk/src/4.0/methods.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,10 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK {
707707
return this.post<IAccessToken, IError>(
708708
'/login',
709709
null,
710-
{ client_id: request.client_id, client_secret: request.client_secret },
710+
new URLSearchParams({
711+
client_id: request.client_id,
712+
client_secret: request.client_secret,
713+
} as unknown as Record<string, string>),
711714
options
712715
);
713716
}

packages/sdk/src/4.0/streams.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,10 @@ export class Looker40SDKStream extends APIMethods {
759759
'POST',
760760
'/login',
761761
null,
762-
{ client_id: request.client_id, client_secret: request.client_secret },
762+
new URLSearchParams({
763+
client_id: request.client_id,
764+
client_secret: request.client_secret,
765+
} as unknown as Record<string, string>),
763766
options
764767
);
765768
}

python/looker_sdk/sdk/api40/methods.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
from . import models as mdls
3333
from looker_sdk.rtl import api_methods
34+
from looker_sdk.rtl import model
3435
from looker_sdk.rtl import transport
3536

3637

@@ -394,7 +395,9 @@ def login(
394395
self.post(
395396
path="/login",
396397
structure=mdls.AccessToken,
397-
body={"client_id": client_id, "client_secret": client_secret},
398+
body=model.URLSearchParams(
399+
{"client_id": client_id, "client_secret": client_secret}
400+
),
398401
transport_options=transport_options,
399402
),
400403
)

spec/Looker.4.0.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"swagger": "2.0",
33
"info": {
44
"version": "4.0.26.6",
5-
"x-looker-release-version": "26.6.2",
5+
"x-looker-release-version": "26.6.4",
66
"title": "Looker API 4.0 Reference",
77
"description": "\nAPI 4.0 is the current release of the Looker API. API 3.x has been removed.\n\n### Authorization\n\nThe classic method of API authorization uses Looker **API** credentials for authorization and access control.\nLooker admins can create API credentials on Looker's **Admin/Users** page.\n\nAPI 4.0 adds additional ways to authenticate API requests, including OAuth and CORS requests.\n\nFor details, see [Looker API Authorization](https://docs.cloud.google.com/looker/docs/r/api/authorization).\n\n\n### API Explorer\n\nThe API Explorer is a Looker-provided utility with many new and unique features for learning and using the Looker API and SDKs.\n\nFor details, see the [API Explorer documentation](https://docs.cloud.google.com/looker/docs/r/api/explorer).\n\n\n### Looker Language SDKs\n\nThe Looker API is a RESTful system that should be usable by any programming language capable of making\nHTTPS requests. SDKs for a variety of programming languages are also provided to streamline using the API. Looker\nhas an OpenSource [sdk-codegen project](https://github.com/looker-open-source/sdk-codegen) that provides several\nlanguage SDKs. Language SDKs generated by `sdk-codegen` have an Authentication manager that can automatically\nauthenticate API requests when needed.\n\nFor details on available Looker SDKs, see [Looker API Client SDKs](https://docs.cloud.google.com/looker/docs/r/api/client_sdks).\n\n\n### API Versioning\n\nFuture releases of Looker expand the latest API version release-by-release to securely expose more and more of the core\npower of the Looker platform to API client applications. API endpoints marked as \"beta\" may receive breaking changes without\nwarning (but we will try to avoid doing that). Stable (non-beta) API endpoints should not receive breaking\nchanges in future releases.\n\nFor details, see [Looker API Versioning](https://docs.cloud.google.com/looker/docs/r/api/versioning).\n\n\n### In This Release\n\nAPI 4.0 is the only supported API version for Looker starting with release 23.18. API 3.0 and 3.1 have been removed.\n\nAPI 4.0 has better support for strongly typed languages like TypeScript, Kotlin, Swift, Go, C#, and more.\n\nSee the [API 4.0 GA announcement](https://developers.looker.com/api/advanced-usage/version-4-ga) for more information\nabout API 4.0.\n\nThe API Explorer can be used to [interactively compare](https://docs.cloud.google.com/looker/docs/r/api/explorer#comparing_api_versions) the differences between API 3.1 and 4.0.\n\n\n### API and SDK Support Policies\n\nLooker API versions and language SDKs have varying support levels. Please read the API and SDK\n[support policies](https://docs.cloud.google.com/looker/docs/r/api/support-policy) for more information.\n\n\n",
88
"contact": {

spec/Looker.4.0.oas.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"openapi": "3.0.0",
33
"info": {
44
"version": "4.0.26.6",
5-
"x-looker-release-version": "26.6.2",
5+
"x-looker-release-version": "26.6.4",
66
"title": "Looker API 4.0 Reference",
77
"description": "\nAPI 4.0 is the current release of the Looker API. API 3.x has been removed.\n\n### Authorization\n\nThe classic method of API authorization uses Looker **API** credentials for authorization and access control.\nLooker admins can create API credentials on Looker's **Admin/Users** page.\n\nAPI 4.0 adds additional ways to authenticate API requests, including OAuth and CORS requests.\n\nFor details, see [Looker API Authorization](https://docs.cloud.google.com/looker/docs/r/api/authorization).\n\n\n### API Explorer\n\nThe API Explorer is a Looker-provided utility with many new and unique features for learning and using the Looker API and SDKs.\n\nFor details, see the [API Explorer documentation](https://docs.cloud.google.com/looker/docs/r/api/explorer).\n\n\n### Looker Language SDKs\n\nThe Looker API is a RESTful system that should be usable by any programming language capable of making\nHTTPS requests. SDKs for a variety of programming languages are also provided to streamline using the API. Looker\nhas an OpenSource [sdk-codegen project](https://github.com/looker-open-source/sdk-codegen) that provides several\nlanguage SDKs. Language SDKs generated by `sdk-codegen` have an Authentication manager that can automatically\nauthenticate API requests when needed.\n\nFor details on available Looker SDKs, see [Looker API Client SDKs](https://docs.cloud.google.com/looker/docs/r/api/client_sdks).\n\n\n### API Versioning\n\nFuture releases of Looker expand the latest API version release-by-release to securely expose more and more of the core\npower of the Looker platform to API client applications. API endpoints marked as \"beta\" may receive breaking changes without\nwarning (but we will try to avoid doing that). Stable (non-beta) API endpoints should not receive breaking\nchanges in future releases.\n\nFor details, see [Looker API Versioning](https://docs.cloud.google.com/looker/docs/r/api/versioning).\n\n\n### In This Release\n\nAPI 4.0 is the only supported API version for Looker starting with release 23.18. API 3.0 and 3.1 have been removed.\n\nAPI 4.0 has better support for strongly typed languages like TypeScript, Kotlin, Swift, Go, C#, and more.\n\nSee the [API 4.0 GA announcement](https://developers.looker.com/api/advanced-usage/version-4-ga) for more information\nabout API 4.0.\n\nThe API Explorer can be used to [interactively compare](https://docs.cloud.google.com/looker/docs/r/api/explorer#comparing_api_versions) the differences between API 3.1 and 4.0.\n\n\n### API and SDK Support Policies\n\nLooker API versions and language SDKs have varying support levels. Please read the API and SDK\n[support policies](https://docs.cloud.google.com/looker/docs/r/api/support-policy) for more information.\n\n\n",
88
"contact": {

0 commit comments

Comments
 (0)