Merge branch 'master' of https://github.com/google/google-api-ruby-client
This commit is contained in:
		
						commit
						e3d2a16a19
					
				
							
								
								
									
										12
									
								
								README.md
								
								
								
								
							
							
						
						
									
										12
									
								
								README.md
								
								
								
								
							| 
						 | 
				
			
			@ -240,6 +240,18 @@ result = translate.list_translations('Hello world!', 'es', source: 'en')
 | 
			
		|||
puts result.translations.first.translated_text
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Authorization using environment variables
 | 
			
		||||
 | 
			
		||||
The [GoogleAuth Library for Ruby](https://github.com/google/google-auth-library-ruby) also supports authorization via
 | 
			
		||||
environment variables if you do not want to check in developer credentials
 | 
			
		||||
or private keys. Simply set the following variables for your application:
 | 
			
		||||
 | 
			
		||||
```sh
 | 
			
		||||
GOOGLE_ACCOUNT_TYPE="YOUR ACCOUNT TYPE" # ie. 'service'
 | 
			
		||||
GOOGLE_CLIENT_EMAIL="YOUR GOOGLE DEVELOPER EMAIL"
 | 
			
		||||
GOOGLE_PRIVATE_KEY="YOUR GOOGLE DEVELOPER API KEY"
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Samples
 | 
			
		||||
 | 
			
		||||
Samples for versions 0.9 and onward can be found in the `samples` directory.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue