From 7cd452d94ddd38bea1852e89dde4c638bc257ebf Mon Sep 17 00:00:00 2001 From: Steve Bazyl Date: Wed, 31 Aug 2016 10:53:34 -0700 Subject: [PATCH] Add a note about naming convention Clarify use of snake vs camel case. --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 1da9ea32b..7f96eac91 100644 --- a/README.md +++ b/README.md @@ -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