Merge branch 'master' of https://github.com/google/google-api-ruby-client
This commit is contained in:
commit
3d4ec29fef
11
README.md
11
README.md
|
@ -139,7 +139,7 @@ to replace. For example:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
file = {id: '123', title: 'My document', labels: { starred: true }}
|
file = {id: '123', title: 'My document', labels: { starred: true }}
|
||||||
file = drive.insert_file(file) # Returns a Drive::File instance
|
file = drive.create_file(file, {}) # Returns a Drive::File instance
|
||||||
```
|
```
|
||||||
|
|
||||||
is equivalent to:
|
is equivalent to:
|
||||||
|
@ -150,6 +150,15 @@ file.labels = Drive::File::Labels.new(starred: true)
|
||||||
file = drive.update_file(file) # Returns a Drive::File instance
|
file = drive.update_file(file) # Returns a Drive::File instance
|
||||||
```
|
```
|
||||||
|
|
||||||
|
IMPORTANT: Be careful when supplying hashes for request objects. If it is the last argument to a method, ruby will interpret the hash as keyword arguments. To prevent this, appending an empty hash as an extra parameter will avoid misinterpretation.
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
file = {id: '123', title: 'My document', labels: { starred: true }}
|
||||||
|
file = drive.create_file(file) # Raises ArgumentError: unknown keywords: id, title, labels
|
||||||
|
file = drive.create_file(file, {}) # Returns a Drive::File instance
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Authorization
|
## Authorization
|
||||||
|
|
||||||
[OAuth 2](https://developers.google.com/accounts/docs/OAuth2) is used to authorize applications. This library uses
|
[OAuth 2](https://developers.google.com/accounts/docs/OAuth2) is used to authorize applications. This library uses
|
||||||
|
|
Loading…
Reference in New Issue