Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@maxim_mazurok/gapi.client.translate-v3

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@maxim_mazurok/gapi.client.translate-v3 - npm Package Compare versions

Comparing version 0.0.20231013 to 0.0.20231201

12

package.json
{
"name": "@maxim_mazurok/gapi.client.translate-v3",
"version": "0.0.20231013",
"version": "0.0.20231201",
"description": "TypeScript typings for Cloud Translation API v3",
"repository": {
"type": "git",
"url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
},
"license": "MIT",
"author": {
"name": "Maxim Mazurok",
"email": "maxim@mazurok.com",
"name": "Maxim Mazurok",
"url": "https://maxim.mazurok.com"
},
"repository": {
"type": "git",
"url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
},
"types": "index.d.ts",

@@ -16,0 +16,0 @@ "dependencies": {

@@ -28,6 +28,9 @@ # TypeScript typings for Cloud Translation API v3

```typescript
gapi.client.load('https://translation.googleapis.com/$discovery/rest?version=v3', () => {
// now we can use:
// gapi.client.translate
});
gapi.client.load(
'https://translation.googleapis.com/$discovery/rest?version=v3',
() => {
// now we can use:
// gapi.client.translate
}
);
```

@@ -49,20 +52,21 @@

scope = [
// See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
'https://www.googleapis.com/auth/cloud-platform',
// See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
'https://www.googleapis.com/auth/cloud-platform',
// Translate text from one language to another using Google Translate
'https://www.googleapis.com/auth/cloud-translation',
],
immediate = true;
// Translate text from one language to another using Google Translate
'https://www.googleapis.com/auth/cloud-translation',
],
immediate = true;
// ...
gapi.auth.authorize(
{ client_id: client_id, scope: scope, immediate: immediate },
{client_id: client_id, scope: scope, immediate: immediate},
authResult => {
if (authResult && !authResult.error) {
/* handle successful authorization */
/* handle successful authorization */
} else {
/* handle authorization error */
/* handle authorization error */
}
});
}
);
```

@@ -73,7 +77,6 @@

```typescript
/*
Detects the language of text within a request.
*/
await gapi.client.translate.projects.detectLanguage({ parent: "parent", });
await gapi.client.translate.projects.detectLanguage({parent: 'parent'});

@@ -83,3 +86,3 @@ /*

*/
await gapi.client.translate.projects.getSupportedLanguages({ parent: "parent", });
await gapi.client.translate.projects.getSupportedLanguages({parent: 'parent'});

@@ -89,3 +92,3 @@ /*

*/
await gapi.client.translate.projects.romanizeText({ parent: "parent", });
await gapi.client.translate.projects.romanizeText({parent: 'parent'});

@@ -95,3 +98,3 @@ /*

*/
await gapi.client.translate.projects.translateText({ parent: "parent", });
await gapi.client.translate.projects.translateText({parent: 'parent'});
```

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc