Add a note about naming convention

Clarify use of snake vs camel case.
This commit is contained in:
Steve Bazyl 2016-08-31 10:53:34 -07:00 committed by GitHub
parent 771a91d951
commit 7cd452d94d
1 changed files with 6 additions and 0 deletions

View File

@ -53,6 +53,12 @@ metadata = drive.insert_file(metadata, upload_source: 'test.txt', content_type:
# Download a file
drive.get_file(metadata.id, download_dest: '/tmp/myfile.txt')
```
### Naming conventions vs JSON representation
Object properties in the ruby client use the standard ruby convention for naming -- snake_case. This differs from the underlying JSON representation which typically uses camelCase for properties. There are a few notable exceptions to this rule:
* For properties that are defined as hashes with user-defined keys, no translation is performed on the key.
* For embedded field masks in requests (for example, the Sheets API), specify the camelCase form when referencing fields.
### Media