google-api-client 0.9.pre2 → 0.9.pre3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -0
  3. data/README.md +1 -1
  4. data/api_names_out.yaml +68 -5
  5. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +3 -3
  6. data/generated/google/apis/adexchangeseller_v2_0.rb +1 -1
  7. data/generated/google/apis/adexchangeseller_v2_0/service.rb +5 -5
  8. data/generated/google/apis/admin_directory_v1.rb +1 -1
  9. data/generated/google/apis/admin_directory_v1/classes.rb +34 -0
  10. data/generated/google/apis/admin_directory_v1/representations.rb +5 -0
  11. data/generated/google/apis/adsense_v1_4.rb +1 -1
  12. data/generated/google/apis/adsense_v1_4/service.rb +10 -10
  13. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  14. data/generated/google/apis/adsensehost_v4_1/service.rb +19 -19
  15. data/generated/google/apis/analytics_v3/service.rb +35 -35
  16. data/generated/google/apis/androidenterprise_v1/service.rb +6 -6
  17. data/generated/google/apis/appstate_v1.rb +1 -1
  18. data/generated/google/apis/bigquery_v2.rb +1 -1
  19. data/generated/google/apis/bigquery_v2/classes.rb +16 -6
  20. data/generated/google/apis/bigquery_v2/representations.rb +2 -0
  21. data/generated/google/apis/bigquery_v2/service.rb +4 -4
  22. data/generated/google/apis/blogger_v3/service.rb +7 -7
  23. data/generated/google/apis/books_v1/service.rb +47 -47
  24. data/generated/google/apis/calendar_v3.rb +1 -1
  25. data/generated/google/apis/calendar_v3/classes.rb +43 -27
  26. data/generated/google/apis/calendar_v3/service.rb +20 -10
  27. data/generated/google/apis/civicinfo_v2/service.rb +1 -1
  28. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  29. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +8 -8
  30. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  31. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +372 -0
  32. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +155 -0
  33. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +109 -0
  34. data/generated/google/apis/compute_v1.rb +1 -1
  35. data/generated/google/apis/compute_v1/classes.rb +21 -18
  36. data/generated/google/apis/compute_v1/representations.rb +0 -1
  37. data/generated/google/apis/compute_v1/service.rb +459 -819
  38. data/generated/google/apis/content_v2.rb +1 -1
  39. data/generated/google/apis/content_v2/classes.rb +25 -15
  40. data/generated/google/apis/content_v2/representations.rb +2 -0
  41. data/generated/google/apis/content_v2/service.rb +2 -1
  42. data/generated/google/apis/coordinate_v1/service.rb +11 -11
  43. data/generated/google/apis/customsearch_v1/service.rb +3 -3
  44. data/generated/google/apis/deploymentmanager_v2beta2.rb +1 -1
  45. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +1 -1
  46. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +50 -90
  47. data/generated/google/apis/dfareporting_v2_1.rb +1 -1
  48. data/generated/google/apis/dfareporting_v2_1/classes.rb +4 -4
  49. data/generated/google/apis/dfareporting_v2_1/service.rb +65 -62
  50. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  51. data/generated/google/apis/doubleclicksearch_v2/service.rb +11 -11
  52. data/generated/google/apis/drive_v2.rb +4 -1
  53. data/generated/google/apis/drive_v2/classes.rb +2 -2
  54. data/generated/google/apis/drive_v2/service.rb +15 -9
  55. data/generated/google/apis/fitness_v1.rb +1 -1
  56. data/generated/google/apis/fitness_v1/classes.rb +44 -31
  57. data/generated/google/apis/fitness_v1/representations.rb +0 -2
  58. data/generated/google/apis/fitness_v1/service.rb +5 -1
  59. data/generated/google/apis/fusiontables_v2/service.rb +9 -9
  60. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  61. data/generated/google/apis/games_v1.rb +1 -1
  62. data/generated/google/apis/games_v1/service.rb +18 -18
  63. data/generated/google/apis/genomics_v1.rb +1 -1
  64. data/generated/google/apis/genomics_v1/classes.rb +56 -53
  65. data/generated/google/apis/genomics_v1/service.rb +1 -1
  66. data/generated/google/apis/licensing_v1/service.rb +2 -2
  67. data/generated/google/apis/mapsengine_v1/service.rb +8 -8
  68. data/generated/google/apis/mirror_v1.rb +1 -1
  69. data/generated/google/apis/pagespeedonline_v2/service.rb +3 -3
  70. data/generated/google/apis/plus_domains_v1.rb +1 -1
  71. data/generated/google/apis/plus_v1.rb +1 -1
  72. data/generated/google/apis/plus_v1/service.rb +6 -6
  73. data/generated/google/apis/pubsub_v1beta2.rb +1 -1
  74. data/generated/google/apis/pubsub_v1beta2/classes.rb +21 -20
  75. data/generated/google/apis/pubsub_v1beta2/service.rb +13 -13
  76. data/generated/google/apis/replicapool_v1beta2/service.rb +3 -3
  77. data/generated/google/apis/replicapoolupdater_v1beta1.rb +1 -1
  78. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +8 -1
  79. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +1 -0
  80. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +1 -5
  81. data/generated/google/apis/reseller_v1/service.rb +1 -1
  82. data/generated/google/apis/site_verification_v1/service.rb +2 -2
  83. data/generated/google/apis/sqladmin_v1beta4/service.rb +4 -4
  84. data/generated/google/apis/storage_v1/service.rb +6 -6
  85. data/generated/google/apis/taskqueue_v1beta2/service.rb +9 -9
  86. data/generated/google/apis/translate_v2/service.rb +6 -6
  87. data/generated/google/apis/urlshortener_v1/service.rb +3 -3
  88. data/generated/google/apis/webmasters_v3.rb +1 -1
  89. data/generated/google/apis/webmasters_v3/classes.rb +11 -11
  90. data/generated/google/apis/webmasters_v3/service.rb +3 -3
  91. data/generated/google/apis/youtube_analytics_v1/service.rb +25 -25
  92. data/generated/google/apis/youtube_v3/service.rb +305 -305
  93. data/lib/google/apis/generator/model.rb +10 -0
  94. data/lib/google/apis/generator/templates/_method.tmpl +3 -3
  95. data/lib/google/apis/version.rb +1 -1
  96. metadata +2 -2
@@ -75,6 +75,16 @@ module Google
75
75
  return [] if parameters.nil?
76
76
  parameters.values.select { |param| param.location == 'query' }
77
77
  end
78
+
79
+ def required_parameters
80
+ return [] if parameter_order.nil? || parameters.nil?
81
+ parameter_order.map { |name| parameters[name] }.select { |param| param.location == 'path' || param.required }
82
+ end
83
+
84
+ def optional_query_parameters
85
+ query_parameters.select { |param| param.required != true }
86
+ end
87
+
78
88
  end
79
89
 
80
90
  class RestResource
@@ -1,6 +1,6 @@
1
1
 
2
2
  # <%= block_comment(api_method.description, 0, 1) %>
3
- <% for param in api_method.path_parameters -%>
3
+ <% for param in api_method.required_parameters -%>
4
4
  # @param [<% if param.repeated? %>Array<<%= param.generated_type %>>, <% end %><%= param.generated_type %>] <%= param.generated_name %>
5
5
  <% if param.description -%>
6
6
  # <%= block_comment(param.description, 0, 3) %>
@@ -9,7 +9,7 @@
9
9
  <% if api_method.request -%>
10
10
  # @param [<%= api.schemas[api_method.request._ref].generated_type %>] <%= api.schemas[api_method.request._ref].generated_name %>_object
11
11
  <% end -%>
12
- <% for param in api_method.query_parameters -%>
12
+ <% for param in api_method.optional_query_parameters -%>
13
13
  # @param [<% if param.repeated? %>Array<<%= param.generated_type %>>, <% end %><%= param.generated_type %>] <%= param.generated_name %>
14
14
  <% if param.description -%>
15
15
  # <%= block_comment(param.description, 0, 3) %>
@@ -49,7 +49,7 @@
49
49
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
50
50
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
51
51
  # @raise [Google::Apis::AuthorizationError] Authorization is required
52
- def <%= api_method.generated_name %>(<% for param in api_method.path_parameters %><%= param.generated_name %>, <% end %><% if api_method.request %><%= api.schemas[api_method.request._ref].generated_name %>_object = nil, <% end %><% for param in api_method.query_parameters %><%= param.generated_name %>: nil, <% end %><% for param in api.parameters.values.reject {|p| p.name == 'key'} %><%= param.generated_name %>: nil, <% end %><% if api_method.supports_media_upload? %>upload_source: nil, content_type: nil, <% elsif api_method.supports_media_download? %>download_dest: nil, <% end %>options: nil, &block)
52
+ def <%= api_method.generated_name %>(<% for param in api_method.required_parameters %><%= param.generated_name %>, <% end %><% if api_method.request %><%= api.schemas[api_method.request._ref].generated_name %>_object = nil, <% end %><% for param in api_method.optional_query_parameters %><%= param.generated_name %>: nil, <% end %><% for param in api.parameters.values.reject {|p| p.name == 'key'} %><%= param.generated_name %>: nil, <% end %><% if api_method.supports_media_upload? %>upload_source: nil, content_type: nil, <% elsif api_method.supports_media_download? %>download_dest: nil, <% end %>options: nil, &block)
53
53
  path = '<%= api_method.path %>'
54
54
  <% if api_method.supports_media_upload? -%>
55
55
  if upload_source.nil?
@@ -15,7 +15,7 @@
15
15
  module Google
16
16
  module Apis
17
17
  # Client library version
18
- VERSION = '0.9.pre2'
18
+ VERSION = '0.9.pre3'
19
19
 
20
20
  # Current operating system
21
21
  # @private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.pre2
4
+ version: 0.9.pre3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Bazyl
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2015-07-25 00:00:00.000000000 Z
14
+ date: 2015-07-31 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: representable