Expose discovery doc in prep for future doc changes
This commit is contained in:
		
							parent
							
								
									5941c0d877
								
							
						
					
					
						commit
						94100bb3d1
					
				|  | @ -53,6 +53,9 @@ module Google | |||
|           end | ||||
|         end | ||||
|       end | ||||
|        | ||||
|       # @return [String] unparsed discovery document for the API | ||||
|       attr_reader :discovery_document | ||||
| 
 | ||||
|       ## | ||||
|       # Returns the id of the service. | ||||
|  |  | |||
|  | @ -45,6 +45,9 @@ module Google | |||
|         @discovery_document = discovery_document | ||||
|       end | ||||
| 
 | ||||
|       # @return [String] unparsed discovery document for the method | ||||
|       attr_reader :discovery_document | ||||
| 
 | ||||
|       ## | ||||
|       # Returns the API this method belongs to. | ||||
|       # | ||||
|  | @ -57,13 +60,6 @@ module Google | |||
|       # @return [String] The method identifier. | ||||
|       attr_reader :name | ||||
| 
 | ||||
|       ## | ||||
|       # Returns the parsed section of the discovery document that applies to | ||||
|       # this method. | ||||
|       # | ||||
|       # @return [Hash] The method description. | ||||
|       attr_reader :description | ||||
| 
 | ||||
|       ## | ||||
|       # Returns the base URI for the method. | ||||
|       # | ||||
|  | @ -81,6 +77,14 @@ module Google | |||
|         @uri_template = nil | ||||
|       end | ||||
| 
 | ||||
|       ## | ||||
|       # Returns a human-readable description of the method. | ||||
|       # | ||||
|       # @return [Hash] The API description. | ||||
|       def description | ||||
|         return @discovery_document['description'] | ||||
|       end | ||||
|        | ||||
|       ## | ||||
|       # Returns the method ID. | ||||
|       # | ||||
|  |  | |||
|  | @ -58,25 +58,29 @@ module Google | |||
|         end | ||||
|       end | ||||
| 
 | ||||
|       # @return [String] unparsed discovery document for the resource | ||||
|       attr_reader :discovery_document | ||||
| 
 | ||||
|       ## | ||||
|       # Returns the identifier for the resource. | ||||
|       # | ||||
|       # @return [String] The resource identifier. | ||||
|       attr_reader :name | ||||
| 
 | ||||
|       ## | ||||
|       # Returns the parsed section of the discovery document that applies to | ||||
|       # this resource. | ||||
|       # | ||||
|       # @return [Hash] The resource description. | ||||
|       attr_reader :description | ||||
| 
 | ||||
|       ## | ||||
|       # Returns the base URI for this resource. | ||||
|       # | ||||
|       # @return [Addressable::URI] The base URI that methods are joined to. | ||||
|       attr_reader :method_base | ||||
| 
 | ||||
|       ## | ||||
|       # Returns a human-readable description of the resource. | ||||
|       # | ||||
|       # @return [Hash] The API description. | ||||
|       def description | ||||
|         return @discovery_document['description'] | ||||
|       end | ||||
| 
 | ||||
|       ## | ||||
|       # Updates the hierarchy of resources and methods with the new base. | ||||
|       # | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue