Module: MyJohnDeere
- Defined in:
- lib/myjohndeere.rb,
lib/myjohndeere/util.rb,
lib/myjohndeere/field.rb,
lib/myjohndeere/errors.rb,
lib/myjohndeere/version.rb,
lib/myjohndeere/boundary.rb,
lib/myjohndeere/response.rb,
lib/myjohndeere/map_layer.rb,
lib/myjohndeere/hash_utils.rb,
lib/myjohndeere/list_object.rb,
lib/myjohndeere/requestable.rb,
lib/myjohndeere/access_token.rb,
lib/myjohndeere/organization.rb,
lib/myjohndeere/rest_methods.rb,
lib/myjohndeere/file_resource.rb,
lib/myjohndeere/metadata_item.rb,
lib/myjohndeere/json_attributes.rb,
lib/myjohndeere/map_legend_item.rb,
lib/myjohndeere/single_resource.rb,
lib/myjohndeere/api_support_item.rb,
lib/myjohndeere/map_layer_summary.rb,
lib/myjohndeere/organization_owned_resource.rb
Defined Under Namespace
Modules: JSONAttributes, RESTMethods
Classes: APISupportItem, AccessToken, AuthenticationError, Boundary, Configuration, ConfigurationError, Field, FileResource, HashUtils, InternalServerError, InvalidRequestError, ListObject, MapLayer, MapLayerSummary, MapLegendItem, MetadataItem, MyJohnDeereError, Organization, OrganizationOwnedResource, PermissionError, RateLimitError, Requestable, Response, ServerBusyError, SingleResource, Util
Constant Summary
collapse
'application/vnd.deere.axiom.v3+json'
- ENDPOINTS =
{
sandbox: "https://sandboxapi.deere.com/platform",
production: "https://api.soa-proxy.deere.com/platform"
}.freeze
- AUTHORIZE_URL =
"https://my.deere.com/consentToUseOfData"
{ 'accept'=> JSON_CONTENT_HEADER_VALUE }.freeze
{
'accept'=> JSON_CONTENT_HEADER_VALUE,
"Content-Type"=> JSON_CONTENT_HEADER_VALUE
}.freeze
"X-Deere-Signature"
- REQUEST_METHODS_TO_PUT_PARAMS_IN_URL =
[:get, :delete, :head]
- SPECIAL_BODY_PARAMETERS =
[:start, :count]
- VERSION =
'0.0.5'
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.configuration ⇒ Object
Returns the value of attribute configuration.
44
45
46
|
# File 'lib/myjohndeere.rb', line 44
def configuration
@configuration
end
|
Class Method Details
73
74
75
76
77
|
# File 'lib/myjohndeere.rb', line 73
def self.configure
self.configuration ||= Configuration.new
yield(configuration)
set_logger()
end
|
.logger ⇒ Object
50
51
52
53
54
55
|
# File 'lib/myjohndeere.rb', line 50
def logger
if @logger.nil? then
set_logger()
end
@logger
end
|
.set_logger ⇒ Object
45
46
47
48
|
# File 'lib/myjohndeere.rb', line 45
def set_logger()
@logger ||= Logger.new(STDOUT)
@logger.level = Logger.const_get(self.configuration.log_level.to_s.upcase)
end
|