Builder, aby utworzyć odpowiedź setCredentials() dla projektu skryptu.
constcommunityConnector=DataStudioApp.createCommunityConnector();functionsetCredentials(request){constisValid=validateCredentials(request);if(isValid){// store the credentials somewhere.}returncommunityConnector.newSetCredentialsResponse().setIsValid(isValid).build();}functionvalidateCredentials(request){// ...}
Wypisuje reprezentację obiektu w formacie JSON. Jest to tylko funkcja debugowania.
Powrót
String
setIsValid(isValid)
Określa prawidłowy stan tego elementu SetCredentialsResponse. Ustaw na true, jeśli podane w żądaniu dane logowania są prawidłowe, lub na false w przeciwnym razie.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2024-12-22 UTC."],[[["`SetCredentialsResponse` helps you create a response for your script project's `setCredentials()` function, indicating whether the provided credentials are valid."],["You can use the `setIsValid()` method to set the validation status (true/false) and `build()` to finalize and return the response object in the required format for Data Studio."],["For debugging, `printJson()` prints the JSON representation of the `SetCredentialsResponse` object."]]],[]]