Skip to content

Commit

Permalink
Add a note about naming convention
Browse files Browse the repository at this point in the history
Clarify use of snake vs camel case.
  • Loading branch information
sqrrrl authored Aug 31, 2016
1 parent 771a91d commit 7cd452d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 7cd452d

Please sign in to comment.