my_john_deere_api 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dbad97d98f7f86489ff758e97b1f8e596db52adef1a0948618e073cacd393f6d
4
- data.tar.gz: 268f2309b43dc543268d5ad97151b4a4f6fb4e84ba8a7a6504e4f35a78177616
3
+ metadata.gz: bcc137e1443b571fcbfa6cba0480a750e1b76bf648bf30a37e51818ba25005a1
4
+ data.tar.gz: 5eecb3dc93a0cbf0d8f0951dc4dc722531149ddd25c8bb9452a39459e9676ab5
5
5
  SHA512:
6
- metadata.gz: 02cdd40ea10657f8a4102c185fce3114da462fb68e52688dfb219ff4dbf36ab9a621f2e6be6bd1713312097a8ebeb7466dd3976a019a803b1300e51a5b1a7bfa
7
- data.tar.gz: 13c524f8779b12210e40fcf632ecb171e088a942b30215a1d049559bdacf7bd4e3211c26d0ea9fa29fecacca5f948cae4703dc423803e63d80e21198b19fc236
6
+ metadata.gz: fcc0a3d656159189be4c3e5c9e0a523320b26d11dc6257d88ea1748ab323be63c48a1d59625ae8d4da67764919101e8efc8e5786738f05e385f537ab33edc648
7
+ data.tar.gz: ec4831601dcfaeda5e13a25a4d658a0a6b77a8eba19c86e2330580470af830ca91dff4d957ab7f66e7c89166c1c25a50e75aba08c4575b23790e23e3d52a6810
@@ -41,6 +41,14 @@ class MyJohnDeereApi::Client
41
41
  JSON.parse(response.body)
42
42
  end
43
43
 
44
+ ##
45
+ # organizations associated with this access
46
+
47
+ def organizations
48
+ return @organizations if defined?(@organizations)
49
+ @organizations = MyJohnDeereApi::Request::Organizations.new(accessor).all
50
+ end
51
+
44
52
  private
45
53
 
46
54
  ##
@@ -0,0 +1,20 @@
1
+ class MyJohnDeereApi::Model::Organization
2
+ attr_reader :name, :type, :id, :links
3
+
4
+ def initialize(record)
5
+ @name = record['name']
6
+ @type = record['type']
7
+ @id = record['id']
8
+ @member = record['member']
9
+
10
+ @links = {}
11
+
12
+ record['links'].each do |association|
13
+ @links[association['rel']] = association['uri']
14
+ end
15
+ end
16
+
17
+ def member?
18
+ @member
19
+ end
20
+ end
@@ -0,0 +1,3 @@
1
+ module MyJohnDeereApi::Model
2
+ autoload :Organization, 'my_john_deere_api/model/organization'
3
+ end
@@ -0,0 +1,73 @@
1
+ class MyJohnDeereApi::Request::Collection
2
+ include Enumerable
3
+
4
+ attr_reader :accessor
5
+
6
+ ##
7
+ # accessor is an OAuth::AccessToken object which has the necessary
8
+ # credentials to make the desired requests.
9
+
10
+ def initialize(accessor)
11
+ @accessor = accessor
12
+ @items = []
13
+ end
14
+
15
+ ##
16
+ # Iterate lazily through all records in the collection, fetching
17
+ # additional pages as needed.
18
+
19
+ def each(&block)
20
+ count.times do |index|
21
+ fetch if @items.size <= index
22
+ block.call(@items[index])
23
+ end
24
+ end
25
+
26
+ ##
27
+ # Return all objects in the collection at once
28
+
29
+ def all
30
+ return @all if defined?(@all)
31
+ @all = map { |i| i }
32
+ end
33
+
34
+ ##
35
+ # Total count of records, even before pagination
36
+
37
+ def count
38
+ @count ||= first_page['total']
39
+ end
40
+
41
+ private
42
+
43
+ def first_page
44
+ return @first_page if defined?(@first_page)
45
+
46
+ @first_page = JSON.parse(@accessor.get(resource, headers).body)
47
+
48
+ @items = @first_page['values'].map{|record| model.new(record) }
49
+
50
+ if next_page = @first_page['links'].detect{|link| link['rel'] == 'nextPage'}
51
+ @next_page = next_page['uri'].gsub(@accessor.consumer.site, '')
52
+ end
53
+
54
+ @first_page
55
+ end
56
+
57
+ def fetch
58
+ return unless @next_page
59
+
60
+ page = JSON.parse(@accessor.get(@next_page, headers).body)
61
+ @items += page['values'].map{|record| model.new(record) }
62
+
63
+ if next_page = @first_page['links'].detect{|link| link['rel'] == 'nextPage'}
64
+ @next_page = next_page['uri'].gsub(@accessor.consumer.site, '')
65
+ else
66
+ @next_page = nil
67
+ end
68
+ end
69
+
70
+ def headers
71
+ @headers ||= {accept: 'application/vnd.deere.axiom.v3+json'}
72
+ end
73
+ end
@@ -0,0 +1,19 @@
1
+ require 'json'
2
+
3
+ module MyJohnDeereApi::Request
4
+ class Organizations < Collection
5
+ ##
6
+ # The resource path for the first page in the collection
7
+
8
+ def resource
9
+ '/organizations'
10
+ end
11
+
12
+ ##
13
+ # This is the class used to model the data
14
+
15
+ def model
16
+ MyJohnDeereApi::Model::Organization
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,4 @@
1
+ module MyJohnDeereApi::Request
2
+ autoload :Collection, 'my_john_deere_api/request/collection'
3
+ autoload :Organizations, 'my_john_deere_api/request/organizations'
4
+ end
@@ -1,3 +1,3 @@
1
1
  module MyJohnDeereApi
2
- VERSION='0.1.0'
2
+ VERSION='0.2.0'
3
3
  end
@@ -6,5 +6,7 @@ module MyJohnDeereApi
6
6
  autoload :VERSION, 'my_john_deere_api/version'
7
7
  autoload :Authorize, 'my_john_deere_api/authorize'
8
8
  autoload :Client, 'my_john_deere_api/client'
9
- autoload :Consumer, 'my_john_deere_api/consumer'
9
+ autoload :Consumer, 'my_john_deere_api/consumer'
10
+ autoload :Request, 'my_john_deere_api/request'
11
+ autoload :Model, 'my_john_deere_api/model'
10
12
  end
@@ -0,0 +1,53 @@
1
+ require 'support/helper'
2
+
3
+ describe 'MyJohnDeereApi::Model::Organization' do
4
+ let(:record) do
5
+ {
6
+ "@type"=>"Organization",
7
+ "name"=>"Century Farms",
8
+ "type"=>"customer",
9
+ "member"=>true,
10
+ "id"=>"123456",
11
+ "links"=>[
12
+ {"@type"=>"Link", "rel"=>"self", "uri"=>"https://sandboxapi.deere.com/platform/organizations/123456"},
13
+ {"@type"=>"Link", "rel"=>"machines", "uri"=>"https://sandboxapi.deere.com/platform/organizations/123456/machines"},
14
+ {"@type"=>"Link", "rel"=>"wdtCapableMachines", "uri"=>"https://sandboxapi.deere.com/platform/organizations/123456/machines?capability=wdt"},
15
+ {"@type"=>"Link", "rel"=>"files", "uri"=>"https://sandboxapi.deere.com/platform/organizations/123456/files"},
16
+ {"@type"=>"Link", "rel"=>"transferableFiles", "uri"=>"https://sandboxapi.deere.com/platform/organizations/123456/files?transferable=true"},
17
+ {"@type"=>"Link", "rel"=>"uploadFile", "uri"=>"https://sandboxapi.deere.com/platform/organizations/123456/files"},
18
+ {"@type"=>"Link", "rel"=>"sendFileToMachine", "uri"=>"https://sandboxapi.deere.com/platform/organizations/123456/fileTransfers"},
19
+ {"@type"=>"Link", "rel"=>"addMachine", "uri"=>"https://sandboxapi.deere.com/platform/organizations/123456/machines"},
20
+ {"@type"=>"Link", "rel"=>"addField", "uri"=>"https://sandboxapi.deere.com/platform/organizations/123456/fields"},
21
+ {"@type"=>"Link", "rel"=>"assets", "uri"=>"https://sandboxapi.deere.com/platform/organizations/123456/assets"},
22
+ {"@type"=>"Link", "rel"=>"fields", "uri"=>"https://sandboxapi.deere.com/platform/organizations/123456/fields"},
23
+ {"@type"=>"Link", "rel"=>"farms", "uri"=>"https://sandboxapi.deere.com/platform/organizations/123456/farms"},
24
+ {"@type"=>"Link", "rel"=>"boundaries", "uri"=>"https://sandboxapi.deere.com/platform/organizations/123456/boundaries"},
25
+ {"@type"=>"Link", "rel"=>"clients", "uri"=>"https://sandboxapi.deere.com/platform/organizations/123456/clients"},
26
+ {"@type"=>"Link", "rel"=>"controllers", "uri"=>"https://sandboxapi.deere.com/platform/organizations/123456/orgController"}
27
+ ]
28
+ }
29
+ end
30
+
31
+ describe '#initialize' do
32
+ def link_for label
33
+ record['links'].detect{|link| link['rel'] == label}['uri']
34
+ end
35
+
36
+ it 'sets the attributes from the given record' do
37
+ organization = JD::Model::Organization.new(record)
38
+
39
+ # basic attributes
40
+ assert_equal record['name'], organization.name
41
+ assert_equal record['type'], organization.type
42
+ assert_equal record['member'], organization.member?
43
+ assert_equal record['id'], organization.id
44
+
45
+ # links to other things
46
+ assert_kind_of Hash, organization.links
47
+
48
+ ['fields', 'machines', 'files', 'assets', 'farms', 'boundaries', 'clients', 'controllers'].each do |association|
49
+ assert_equal link_for(association), organization.links[association]
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,21 @@
1
+ require 'support/helper'
2
+
3
+ describe 'MyJohnDeereApi::Request::Collection' do
4
+ let(:client) { JD::Client.new(API_KEY, API_SECRET, environment: :sandbox, access: [ACCESS_TOKEN, ACCESS_SECRET]) }
5
+ let(:accessor) { VCR.use_cassette('catalog') { client.send(:accessor) } }
6
+
7
+ describe '#initialize(access_token)' do
8
+ it 'accepts an access token' do
9
+ collection = JD::Request::Collection.new(accessor)
10
+ assert_kind_of OAuth::AccessToken, collection.accessor
11
+ end
12
+ end
13
+
14
+ it 'uses the Enumerable module' do
15
+ collection = JD::Request::Collection.new(accessor)
16
+
17
+ [:each, :first, :map, :detect, :select].each do |method_name|
18
+ assert collection.respond_to?(method_name)
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,71 @@
1
+ require 'support/helper'
2
+ require 'yaml'
3
+ require 'json'
4
+
5
+ describe 'MyJohnDeereApi::Request::Organizations' do
6
+ let(:client) { JD::Client.new(API_KEY, API_SECRET, environment: :sandbox, access: [ACCESS_TOKEN, ACCESS_SECRET]) }
7
+ let(:accessor) { VCR.use_cassette('catalog') { client.send(:accessor) } }
8
+ let(:collection) { JD::Request::Organizations.new(accessor) }
9
+
10
+ describe '#initialize(access_token)' do
11
+ it 'accepts an access token' do
12
+ assert_kind_of OAuth::AccessToken, collection.accessor
13
+ end
14
+ end
15
+
16
+ describe '#resource' do
17
+ it 'returns /organization' do
18
+ assert_equal '/organizations', collection.resource
19
+ end
20
+ end
21
+
22
+ describe '#all' do
23
+ it 'returns all records' do
24
+ items = VCR.use_cassette('get_organizations', record: :new_episodes) { collection.map{|item| item} }
25
+
26
+ assert_kind_of Array, collection.all
27
+ assert_equal collection.count, collection.all.size
28
+
29
+ collection.all.each do |item|
30
+ assert_kind_of JD::Model::Organization, item
31
+ end
32
+ end
33
+ end
34
+
35
+ describe '#count' do
36
+ let(:server_response) do
37
+ contents = File.read('test/support/vcr/get_organizations.yml')
38
+ body = YAML.load(contents)['http_interactions'].first['response']['body']['string']
39
+ JSON.parse(body)
40
+ end
41
+
42
+ let(:server_count) { server_response['total'] }
43
+
44
+ it 'returns the total count of records in the collection' do
45
+ count = VCR.use_cassette('get_organizations') { collection.count }
46
+
47
+ assert_equal server_count, count
48
+ end
49
+ end
50
+
51
+ describe 'pagination' do
52
+ it 'returns all records as a single enumerator' do
53
+ expected_names = [
54
+ 'Century Farms', "JJ's Farm", 'Organization A', 'Organization B', 'Organization C',
55
+ 'Organization D', 'Organization E', 'Organization F', 'Organization G',
56
+ 'Organization H', 'Organization Eye', 'Organization Jay', 'Organization Kay',
57
+ 'Organization Elle'
58
+ ]
59
+
60
+ count = VCR.use_cassette('get_organizations') { collection.count }
61
+ names = VCR.use_cassette('get_organizations', record: :new_episodes) { collection.map{|item| item.name} }
62
+
63
+ assert_kind_of Array, names
64
+ assert_equal count, names.size
65
+
66
+ expected_names.each do |expected_name|
67
+ assert_includes names, expected_name
68
+ end
69
+ end
70
+ end
71
+ end
@@ -41,7 +41,7 @@ describe 'MyJohnDeereApi::Client' do
41
41
  response = VCR.use_cassette('get_organizations') { client.get('/organizations') }
42
42
 
43
43
  assert_kind_of Hash, response
44
- assert_equal 2, response['total']
44
+ assert_kind_of Integer, response['total']
45
45
  assert response['values'].all?{|value| value['@type'] == 'Organization'}
46
46
  assert response['values'].all?{|value| value.has_key?('links')}
47
47
  end
@@ -52,7 +52,7 @@ describe 'MyJohnDeereApi::Client' do
52
52
  response = VCR.use_cassette('get_organizations') { client.get('organizations') }
53
53
 
54
54
  assert_kind_of Hash, response
55
- assert_equal 2, response['total']
55
+ assert_kind_of Integer, response['total']
56
56
  assert response['values'].all?{|value| value['@type'] == 'Organization'}
57
57
  assert response['values'].all?{|value| value.has_key?('links')}
58
58
  end
@@ -63,12 +63,28 @@ describe 'MyJohnDeereApi::Client' do
63
63
  response = VCR.use_cassette('get_organizations') { client.get(:organizations) }
64
64
 
65
65
  assert_kind_of Hash, response
66
- assert_equal 2, response['total']
66
+ assert_kind_of Integer, response['total']
67
67
  assert response['values'].all?{|value| value['@type'] == 'Organization'}
68
68
  assert response['values'].all?{|value| value.has_key?('links')}
69
69
  end
70
70
  end
71
71
 
72
+ describe '#organizations' do
73
+ it 'returns a collection of organizations for this account' do
74
+ client = JD::Client.new(API_KEY, API_SECRET, environment: :sandbox, access: [ACCESS_TOKEN, ACCESS_SECRET])
75
+ VCR.use_cassette('catalog') { client.send(:accessor) }
76
+
77
+ # force full loading of organizations
78
+ VCR.use_cassette('get_organizations') { client.organizations }
79
+
80
+ assert_kind_of Array, client.organizations
81
+
82
+ client.organizations.each do |organization|
83
+ assert_kind_of JD::Model::Organization, organization
84
+ end
85
+ end
86
+ end
87
+
72
88
  describe '#consumer' do
73
89
  it 'receives the api key/secret and environment of the client' do
74
90
  environment = :sandbox
@@ -0,0 +1,9 @@
1
+ require 'support/helper'
2
+
3
+ describe 'MyJohnDeereApi::Model' do
4
+ describe 'loading dependencies' do
5
+ it 'loads Model::Organization' do
6
+ assert JD::Model::Organization
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,13 @@
1
+ require 'support/helper'
2
+
3
+ describe 'MyJohnDeereApi::Request' do
4
+ describe 'loading dependencies' do
5
+ it 'loads Request::Collection' do
6
+ assert JD::Request::Collection
7
+ end
8
+
9
+ it 'loads Request::Organizations' do
10
+ assert JD::Request::Organizations
11
+ end
12
+ end
13
+ end
@@ -15,8 +15,8 @@ http_interactions:
15
15
  - OAuth gem v0.5.4
16
16
  Authorization:
17
17
  - OAuth oauth_consumer_key="johndeere-wgmADngYCRmfpEbVgSyc709wnyRux5J7PAv8SE7B",
18
- oauth_nonce="kndkJ0Y5SmSiWKPLw7e1peNgotFj5t2hHkpX89mmQWk", oauth_signature="uSxP9P%2BZcpG7dZwZhOQM7noYcTI%3D",
19
- oauth_signature_method="HMAC-SHA1", oauth_timestamp="1578435671", oauth_token="47bbb9c9-41a8-4bec-8127-e3c5760af2f6",
18
+ oauth_nonce="kDuom9RPMRGcCYsxKjuNDZROkrj4Fwy36RFQKtH0", oauth_signature="%2FCv%2F9DA92Pa%2F%2BTM9y217PuBnjUM%3D",
19
+ oauth_signature_method="HMAC-SHA1", oauth_timestamp="1578437413", oauth_token="47bbb9c9-41a8-4bec-8127-e3c5760af2f6",
20
20
  oauth_version="1.0"
21
21
  response:
22
22
  status:
@@ -24,15 +24,15 @@ http_interactions:
24
24
  message: OK
25
25
  headers:
26
26
  Date:
27
- - Tue, 07 Jan 2020 22:21:12 GMT
27
+ - Tue, 07 Jan 2020 22:50:13 GMT
28
28
  Content-Type:
29
29
  - application/vnd.deere.axiom.v3+json;charset=UTF-8
30
30
  X-Deere-Handling-Server:
31
- - ip-10-214-44-238
31
+ - ip-10-214-45-203
32
32
  X-Frame-Options:
33
33
  - SAMEORIGIN
34
34
  X-Deere-Elapsed-Ms:
35
- - '115'
35
+ - '42'
36
36
  Cache-Control:
37
37
  - no-store
38
38
  Content-Language:
@@ -41,9 +41,66 @@ http_interactions:
41
41
  - chunked
42
42
  body:
43
43
  encoding: ASCII-8BIT
44
- string: '{"links":[{"rel":"self","uri":"https://sandboxapi.deere.com/platform/organizations"}],"total":2,"values":[{"@type":"Organization","name":"Century
44
+ string: '{"links":[{"rel":"self","uri":"https://sandboxapi.deere.com/platform/organizations"},{"rel":"nextPage","uri":"https://sandboxapi.deere.com/platform/organizations;start=10;count=10"}],"total":15,"values":[{"@type":"Organization","name":"Century
45
45
  Farms","type":"customer","member":true,"id":"444563","links":[{"@type":"Link","rel":"self","uri":"https://sandboxapi.deere.com/platform/organizations/444563"},{"@type":"Link","rel":"machines","uri":"https://sandboxapi.deere.com/platform/organizations/444563/machines"},{"@type":"Link","rel":"wdtCapableMachines","uri":"https://sandboxapi.deere.com/platform/organizations/444563/machines?capability=wdt"},{"@type":"Link","rel":"files","uri":"https://sandboxapi.deere.com/platform/organizations/444563/files"},{"@type":"Link","rel":"transferableFiles","uri":"https://sandboxapi.deere.com/platform/organizations/444563/files?transferable=true"},{"@type":"Link","rel":"uploadFile","uri":"https://sandboxapi.deere.com/platform/organizations/444563/files"},{"@type":"Link","rel":"sendFileToMachine","uri":"https://sandboxapi.deere.com/platform/organizations/444563/fileTransfers"},{"@type":"Link","rel":"addMachine","uri":"https://sandboxapi.deere.com/platform/organizations/444563/machines"},{"@type":"Link","rel":"addField","uri":"https://sandboxapi.deere.com/platform/organizations/444563/fields"},{"@type":"Link","rel":"assets","uri":"https://sandboxapi.deere.com/platform/organizations/444563/assets"},{"@type":"Link","rel":"fields","uri":"https://sandboxapi.deere.com/platform/organizations/444563/fields"},{"@type":"Link","rel":"farms","uri":"https://sandboxapi.deere.com/platform/organizations/444563/farms"},{"@type":"Link","rel":"boundaries","uri":"https://sandboxapi.deere.com/platform/organizations/444563/boundaries"},{"@type":"Link","rel":"clients","uri":"https://sandboxapi.deere.com/platform/organizations/444563/clients"},{"@type":"Link","rel":"controllers","uri":"https://sandboxapi.deere.com/platform/organizations/444563/orgController"}]},{"@type":"Organization","name":"JJ''s
46
- Farm","type":"customer","member":true,"id":"443911","links":[{"@type":"Link","rel":"self","uri":"https://sandboxapi.deere.com/platform/organizations/443911"},{"@type":"Link","rel":"machines","uri":"https://sandboxapi.deere.com/platform/organizations/443911/machines"},{"@type":"Link","rel":"wdtCapableMachines","uri":"https://sandboxapi.deere.com/platform/organizations/443911/machines?capability=wdt"},{"@type":"Link","rel":"files","uri":"https://sandboxapi.deere.com/platform/organizations/443911/files"},{"@type":"Link","rel":"transferableFiles","uri":"https://sandboxapi.deere.com/platform/organizations/443911/files?transferable=true"},{"@type":"Link","rel":"uploadFile","uri":"https://sandboxapi.deere.com/platform/organizations/443911/files"},{"@type":"Link","rel":"sendFileToMachine","uri":"https://sandboxapi.deere.com/platform/organizations/443911/fileTransfers"},{"@type":"Link","rel":"addMachine","uri":"https://sandboxapi.deere.com/platform/organizations/443911/machines"},{"@type":"Link","rel":"addField","uri":"https://sandboxapi.deere.com/platform/organizations/443911/fields"},{"@type":"Link","rel":"assets","uri":"https://sandboxapi.deere.com/platform/organizations/443911/assets"},{"@type":"Link","rel":"fields","uri":"https://sandboxapi.deere.com/platform/organizations/443911/fields"},{"@type":"Link","rel":"farms","uri":"https://sandboxapi.deere.com/platform/organizations/443911/farms"},{"@type":"Link","rel":"boundaries","uri":"https://sandboxapi.deere.com/platform/organizations/443911/boundaries"},{"@type":"Link","rel":"clients","uri":"https://sandboxapi.deere.com/platform/organizations/443911/clients"},{"@type":"Link","rel":"controllers","uri":"https://sandboxapi.deere.com/platform/organizations/443911/orgController"}]}]}'
46
+ Farm","type":"customer","member":true,"id":"443911","links":[{"@type":"Link","rel":"self","uri":"https://sandboxapi.deere.com/platform/organizations/443911"},{"@type":"Link","rel":"machines","uri":"https://sandboxapi.deere.com/platform/organizations/443911/machines"},{"@type":"Link","rel":"wdtCapableMachines","uri":"https://sandboxapi.deere.com/platform/organizations/443911/machines?capability=wdt"},{"@type":"Link","rel":"files","uri":"https://sandboxapi.deere.com/platform/organizations/443911/files"},{"@type":"Link","rel":"transferableFiles","uri":"https://sandboxapi.deere.com/platform/organizations/443911/files?transferable=true"},{"@type":"Link","rel":"uploadFile","uri":"https://sandboxapi.deere.com/platform/organizations/443911/files"},{"@type":"Link","rel":"sendFileToMachine","uri":"https://sandboxapi.deere.com/platform/organizations/443911/fileTransfers"},{"@type":"Link","rel":"addMachine","uri":"https://sandboxapi.deere.com/platform/organizations/443911/machines"},{"@type":"Link","rel":"addField","uri":"https://sandboxapi.deere.com/platform/organizations/443911/fields"},{"@type":"Link","rel":"assets","uri":"https://sandboxapi.deere.com/platform/organizations/443911/assets"},{"@type":"Link","rel":"fields","uri":"https://sandboxapi.deere.com/platform/organizations/443911/fields"},{"@type":"Link","rel":"farms","uri":"https://sandboxapi.deere.com/platform/organizations/443911/farms"},{"@type":"Link","rel":"boundaries","uri":"https://sandboxapi.deere.com/platform/organizations/443911/boundaries"},{"@type":"Link","rel":"clients","uri":"https://sandboxapi.deere.com/platform/organizations/443911/clients"},{"@type":"Link","rel":"controllers","uri":"https://sandboxapi.deere.com/platform/organizations/443911/orgController"}]},{"@type":"Organization","name":"Organization
47
+ A","type":"customer","member":true,"id":"456650","links":[{"@type":"Link","rel":"self","uri":"https://sandboxapi.deere.com/platform/organizations/456650"},{"@type":"Link","rel":"machines","uri":"https://sandboxapi.deere.com/platform/organizations/456650/machines"},{"@type":"Link","rel":"wdtCapableMachines","uri":"https://sandboxapi.deere.com/platform/organizations/456650/machines?capability=wdt"},{"@type":"Link","rel":"files","uri":"https://sandboxapi.deere.com/platform/organizations/456650/files"},{"@type":"Link","rel":"transferableFiles","uri":"https://sandboxapi.deere.com/platform/organizations/456650/files?transferable=true"},{"@type":"Link","rel":"uploadFile","uri":"https://sandboxapi.deere.com/platform/organizations/456650/files"},{"@type":"Link","rel":"sendFileToMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456650/fileTransfers"},{"@type":"Link","rel":"addMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456650/machines"},{"@type":"Link","rel":"addField","uri":"https://sandboxapi.deere.com/platform/organizations/456650/fields"},{"@type":"Link","rel":"assets","uri":"https://sandboxapi.deere.com/platform/organizations/456650/assets"},{"@type":"Link","rel":"fields","uri":"https://sandboxapi.deere.com/platform/organizations/456650/fields"},{"@type":"Link","rel":"farms","uri":"https://sandboxapi.deere.com/platform/organizations/456650/farms"},{"@type":"Link","rel":"boundaries","uri":"https://sandboxapi.deere.com/platform/organizations/456650/boundaries"},{"@type":"Link","rel":"clients","uri":"https://sandboxapi.deere.com/platform/organizations/456650/clients"},{"@type":"Link","rel":"controllers","uri":"https://sandboxapi.deere.com/platform/organizations/456650/orgController"}]},{"@type":"Organization","name":"Organization
48
+ B","type":"customer","member":true,"id":"456651","links":[{"@type":"Link","rel":"self","uri":"https://sandboxapi.deere.com/platform/organizations/456651"},{"@type":"Link","rel":"machines","uri":"https://sandboxapi.deere.com/platform/organizations/456651/machines"},{"@type":"Link","rel":"wdtCapableMachines","uri":"https://sandboxapi.deere.com/platform/organizations/456651/machines?capability=wdt"},{"@type":"Link","rel":"files","uri":"https://sandboxapi.deere.com/platform/organizations/456651/files"},{"@type":"Link","rel":"transferableFiles","uri":"https://sandboxapi.deere.com/platform/organizations/456651/files?transferable=true"},{"@type":"Link","rel":"uploadFile","uri":"https://sandboxapi.deere.com/platform/organizations/456651/files"},{"@type":"Link","rel":"sendFileToMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456651/fileTransfers"},{"@type":"Link","rel":"addMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456651/machines"},{"@type":"Link","rel":"addField","uri":"https://sandboxapi.deere.com/platform/organizations/456651/fields"},{"@type":"Link","rel":"assets","uri":"https://sandboxapi.deere.com/platform/organizations/456651/assets"},{"@type":"Link","rel":"fields","uri":"https://sandboxapi.deere.com/platform/organizations/456651/fields"},{"@type":"Link","rel":"farms","uri":"https://sandboxapi.deere.com/platform/organizations/456651/farms"},{"@type":"Link","rel":"boundaries","uri":"https://sandboxapi.deere.com/platform/organizations/456651/boundaries"},{"@type":"Link","rel":"clients","uri":"https://sandboxapi.deere.com/platform/organizations/456651/clients"},{"@type":"Link","rel":"controllers","uri":"https://sandboxapi.deere.com/platform/organizations/456651/orgController"}]},{"@type":"Organization","name":"Organization
49
+ C","type":"customer","member":true,"id":"456652","links":[{"@type":"Link","rel":"self","uri":"https://sandboxapi.deere.com/platform/organizations/456652"},{"@type":"Link","rel":"machines","uri":"https://sandboxapi.deere.com/platform/organizations/456652/machines"},{"@type":"Link","rel":"wdtCapableMachines","uri":"https://sandboxapi.deere.com/platform/organizations/456652/machines?capability=wdt"},{"@type":"Link","rel":"files","uri":"https://sandboxapi.deere.com/platform/organizations/456652/files"},{"@type":"Link","rel":"transferableFiles","uri":"https://sandboxapi.deere.com/platform/organizations/456652/files?transferable=true"},{"@type":"Link","rel":"uploadFile","uri":"https://sandboxapi.deere.com/platform/organizations/456652/files"},{"@type":"Link","rel":"sendFileToMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456652/fileTransfers"},{"@type":"Link","rel":"addMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456652/machines"},{"@type":"Link","rel":"addField","uri":"https://sandboxapi.deere.com/platform/organizations/456652/fields"},{"@type":"Link","rel":"assets","uri":"https://sandboxapi.deere.com/platform/organizations/456652/assets"},{"@type":"Link","rel":"fields","uri":"https://sandboxapi.deere.com/platform/organizations/456652/fields"},{"@type":"Link","rel":"farms","uri":"https://sandboxapi.deere.com/platform/organizations/456652/farms"},{"@type":"Link","rel":"boundaries","uri":"https://sandboxapi.deere.com/platform/organizations/456652/boundaries"},{"@type":"Link","rel":"clients","uri":"https://sandboxapi.deere.com/platform/organizations/456652/clients"},{"@type":"Link","rel":"controllers","uri":"https://sandboxapi.deere.com/platform/organizations/456652/orgController"}]},{"@type":"Organization","name":"Organization
50
+ D","type":"customer","member":true,"id":"456653","links":[{"@type":"Link","rel":"self","uri":"https://sandboxapi.deere.com/platform/organizations/456653"},{"@type":"Link","rel":"machines","uri":"https://sandboxapi.deere.com/platform/organizations/456653/machines"},{"@type":"Link","rel":"wdtCapableMachines","uri":"https://sandboxapi.deere.com/platform/organizations/456653/machines?capability=wdt"},{"@type":"Link","rel":"files","uri":"https://sandboxapi.deere.com/platform/organizations/456653/files"},{"@type":"Link","rel":"transferableFiles","uri":"https://sandboxapi.deere.com/platform/organizations/456653/files?transferable=true"},{"@type":"Link","rel":"uploadFile","uri":"https://sandboxapi.deere.com/platform/organizations/456653/files"},{"@type":"Link","rel":"sendFileToMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456653/fileTransfers"},{"@type":"Link","rel":"addMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456653/machines"},{"@type":"Link","rel":"addField","uri":"https://sandboxapi.deere.com/platform/organizations/456653/fields"},{"@type":"Link","rel":"assets","uri":"https://sandboxapi.deere.com/platform/organizations/456653/assets"},{"@type":"Link","rel":"fields","uri":"https://sandboxapi.deere.com/platform/organizations/456653/fields"},{"@type":"Link","rel":"farms","uri":"https://sandboxapi.deere.com/platform/organizations/456653/farms"},{"@type":"Link","rel":"boundaries","uri":"https://sandboxapi.deere.com/platform/organizations/456653/boundaries"},{"@type":"Link","rel":"clients","uri":"https://sandboxapi.deere.com/platform/organizations/456653/clients"},{"@type":"Link","rel":"controllers","uri":"https://sandboxapi.deere.com/platform/organizations/456653/orgController"}]},{"@type":"Organization","name":"Organization
51
+ E","type":"customer","member":true,"id":"456654","links":[{"@type":"Link","rel":"self","uri":"https://sandboxapi.deere.com/platform/organizations/456654"},{"@type":"Link","rel":"machines","uri":"https://sandboxapi.deere.com/platform/organizations/456654/machines"},{"@type":"Link","rel":"wdtCapableMachines","uri":"https://sandboxapi.deere.com/platform/organizations/456654/machines?capability=wdt"},{"@type":"Link","rel":"files","uri":"https://sandboxapi.deere.com/platform/organizations/456654/files"},{"@type":"Link","rel":"transferableFiles","uri":"https://sandboxapi.deere.com/platform/organizations/456654/files?transferable=true"},{"@type":"Link","rel":"uploadFile","uri":"https://sandboxapi.deere.com/platform/organizations/456654/files"},{"@type":"Link","rel":"sendFileToMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456654/fileTransfers"},{"@type":"Link","rel":"addMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456654/machines"},{"@type":"Link","rel":"addField","uri":"https://sandboxapi.deere.com/platform/organizations/456654/fields"},{"@type":"Link","rel":"assets","uri":"https://sandboxapi.deere.com/platform/organizations/456654/assets"},{"@type":"Link","rel":"fields","uri":"https://sandboxapi.deere.com/platform/organizations/456654/fields"},{"@type":"Link","rel":"farms","uri":"https://sandboxapi.deere.com/platform/organizations/456654/farms"},{"@type":"Link","rel":"boundaries","uri":"https://sandboxapi.deere.com/platform/organizations/456654/boundaries"},{"@type":"Link","rel":"clients","uri":"https://sandboxapi.deere.com/platform/organizations/456654/clients"},{"@type":"Link","rel":"controllers","uri":"https://sandboxapi.deere.com/platform/organizations/456654/orgController"}]},{"@type":"Organization","name":"Organization
52
+ Elle","type":"customer","member":true,"id":"456663","links":[{"@type":"Link","rel":"self","uri":"https://sandboxapi.deere.com/platform/organizations/456663"},{"@type":"Link","rel":"machines","uri":"https://sandboxapi.deere.com/platform/organizations/456663/machines"},{"@type":"Link","rel":"wdtCapableMachines","uri":"https://sandboxapi.deere.com/platform/organizations/456663/machines?capability=wdt"},{"@type":"Link","rel":"files","uri":"https://sandboxapi.deere.com/platform/organizations/456663/files"},{"@type":"Link","rel":"transferableFiles","uri":"https://sandboxapi.deere.com/platform/organizations/456663/files?transferable=true"},{"@type":"Link","rel":"uploadFile","uri":"https://sandboxapi.deere.com/platform/organizations/456663/files"},{"@type":"Link","rel":"sendFileToMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456663/fileTransfers"},{"@type":"Link","rel":"addMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456663/machines"},{"@type":"Link","rel":"addField","uri":"https://sandboxapi.deere.com/platform/organizations/456663/fields"},{"@type":"Link","rel":"assets","uri":"https://sandboxapi.deere.com/platform/organizations/456663/assets"},{"@type":"Link","rel":"fields","uri":"https://sandboxapi.deere.com/platform/organizations/456663/fields"},{"@type":"Link","rel":"farms","uri":"https://sandboxapi.deere.com/platform/organizations/456663/farms"},{"@type":"Link","rel":"boundaries","uri":"https://sandboxapi.deere.com/platform/organizations/456663/boundaries"},{"@type":"Link","rel":"clients","uri":"https://sandboxapi.deere.com/platform/organizations/456663/clients"},{"@type":"Link","rel":"controllers","uri":"https://sandboxapi.deere.com/platform/organizations/456663/orgController"}]},{"@type":"Organization","name":"Organization
53
+ Eye","type":"customer","member":true,"id":"456659","links":[{"@type":"Link","rel":"self","uri":"https://sandboxapi.deere.com/platform/organizations/456659"},{"@type":"Link","rel":"machines","uri":"https://sandboxapi.deere.com/platform/organizations/456659/machines"},{"@type":"Link","rel":"wdtCapableMachines","uri":"https://sandboxapi.deere.com/platform/organizations/456659/machines?capability=wdt"},{"@type":"Link","rel":"files","uri":"https://sandboxapi.deere.com/platform/organizations/456659/files"},{"@type":"Link","rel":"transferableFiles","uri":"https://sandboxapi.deere.com/platform/organizations/456659/files?transferable=true"},{"@type":"Link","rel":"uploadFile","uri":"https://sandboxapi.deere.com/platform/organizations/456659/files"},{"@type":"Link","rel":"sendFileToMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456659/fileTransfers"},{"@type":"Link","rel":"addMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456659/machines"},{"@type":"Link","rel":"addField","uri":"https://sandboxapi.deere.com/platform/organizations/456659/fields"},{"@type":"Link","rel":"assets","uri":"https://sandboxapi.deere.com/platform/organizations/456659/assets"},{"@type":"Link","rel":"fields","uri":"https://sandboxapi.deere.com/platform/organizations/456659/fields"},{"@type":"Link","rel":"farms","uri":"https://sandboxapi.deere.com/platform/organizations/456659/farms"},{"@type":"Link","rel":"boundaries","uri":"https://sandboxapi.deere.com/platform/organizations/456659/boundaries"},{"@type":"Link","rel":"clients","uri":"https://sandboxapi.deere.com/platform/organizations/456659/clients"},{"@type":"Link","rel":"controllers","uri":"https://sandboxapi.deere.com/platform/organizations/456659/orgController"}]},{"@type":"Organization","name":"Organization
54
+ F","type":"customer","member":true,"id":"456655","links":[{"@type":"Link","rel":"self","uri":"https://sandboxapi.deere.com/platform/organizations/456655"},{"@type":"Link","rel":"machines","uri":"https://sandboxapi.deere.com/platform/organizations/456655/machines"},{"@type":"Link","rel":"wdtCapableMachines","uri":"https://sandboxapi.deere.com/platform/organizations/456655/machines?capability=wdt"},{"@type":"Link","rel":"files","uri":"https://sandboxapi.deere.com/platform/organizations/456655/files"},{"@type":"Link","rel":"transferableFiles","uri":"https://sandboxapi.deere.com/platform/organizations/456655/files?transferable=true"},{"@type":"Link","rel":"uploadFile","uri":"https://sandboxapi.deere.com/platform/organizations/456655/files"},{"@type":"Link","rel":"sendFileToMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456655/fileTransfers"},{"@type":"Link","rel":"addMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456655/machines"},{"@type":"Link","rel":"addField","uri":"https://sandboxapi.deere.com/platform/organizations/456655/fields"},{"@type":"Link","rel":"assets","uri":"https://sandboxapi.deere.com/platform/organizations/456655/assets"},{"@type":"Link","rel":"fields","uri":"https://sandboxapi.deere.com/platform/organizations/456655/fields"},{"@type":"Link","rel":"farms","uri":"https://sandboxapi.deere.com/platform/organizations/456655/farms"},{"@type":"Link","rel":"boundaries","uri":"https://sandboxapi.deere.com/platform/organizations/456655/boundaries"},{"@type":"Link","rel":"clients","uri":"https://sandboxapi.deere.com/platform/organizations/456655/clients"},{"@type":"Link","rel":"controllers","uri":"https://sandboxapi.deere.com/platform/organizations/456655/orgController"}]}]}'
47
55
  http_version:
48
- recorded_at: Tue, 07 Jan 2020 22:21:13 GMT
56
+ recorded_at: Tue, 07 Jan 2020 22:50:14 GMT
57
+ - request:
58
+ method: get
59
+ uri: https://sandboxapi.deere.com/platform/organizations;start=10;count=10
60
+ body:
61
+ encoding: US-ASCII
62
+ string: ''
63
+ headers:
64
+ Accept:
65
+ - application/vnd.deere.axiom.v3+json
66
+ Accept-Encoding:
67
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
68
+ User-Agent:
69
+ - OAuth gem v0.5.4
70
+ Authorization:
71
+ - OAuth oauth_consumer_key="johndeere-wgmADngYCRmfpEbVgSyc709wnyRux5J7PAv8SE7B",
72
+ oauth_nonce="07q8Up9McjBLbB60CPMkNSxxG9zMWA6yqKvsZBKA", oauth_signature="t7EKClwiUA8c9pYK6WTEZ1av4qw%3D",
73
+ oauth_signature_method="HMAC-SHA1", oauth_timestamp="1578505769", oauth_token="47bbb9c9-41a8-4bec-8127-e3c5760af2f6",
74
+ oauth_version="1.0"
75
+ response:
76
+ status:
77
+ code: 200
78
+ message: OK
79
+ headers:
80
+ Date:
81
+ - Wed, 08 Jan 2020 17:49:29 GMT
82
+ Content-Type:
83
+ - application/vnd.deere.axiom.v3+json;charset=UTF-8
84
+ X-Deere-Handling-Server:
85
+ - ip-10-214-45-173
86
+ X-Frame-Options:
87
+ - SAMEORIGIN
88
+ X-Deere-Elapsed-Ms:
89
+ - '247'
90
+ Cache-Control:
91
+ - no-store
92
+ Content-Language:
93
+ - en-US
94
+ Transfer-Encoding:
95
+ - chunked
96
+ body:
97
+ encoding: ASCII-8BIT
98
+ string: '{"links":[{"rel":"self","uri":"https://sandboxapi.deere.com/platform/organizations;start=10;count=10"},{"rel":"previousPage","uri":"https://sandboxapi.deere.com/platform/organizations;start=0;count=10"}],"total":15,"values":[{"@type":"Organization","name":"Organization
99
+ F","type":"customer","member":true,"id":"456656","links":[{"@type":"Link","rel":"self","uri":"https://sandboxapi.deere.com/platform/organizations/456656"},{"@type":"Link","rel":"machines","uri":"https://sandboxapi.deere.com/platform/organizations/456656/machines"},{"@type":"Link","rel":"wdtCapableMachines","uri":"https://sandboxapi.deere.com/platform/organizations/456656/machines?capability=wdt"},{"@type":"Link","rel":"files","uri":"https://sandboxapi.deere.com/platform/organizations/456656/files"},{"@type":"Link","rel":"transferableFiles","uri":"https://sandboxapi.deere.com/platform/organizations/456656/files?transferable=true"},{"@type":"Link","rel":"uploadFile","uri":"https://sandboxapi.deere.com/platform/organizations/456656/files"},{"@type":"Link","rel":"sendFileToMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456656/fileTransfers"},{"@type":"Link","rel":"addMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456656/machines"},{"@type":"Link","rel":"addField","uri":"https://sandboxapi.deere.com/platform/organizations/456656/fields"},{"@type":"Link","rel":"assets","uri":"https://sandboxapi.deere.com/platform/organizations/456656/assets"},{"@type":"Link","rel":"fields","uri":"https://sandboxapi.deere.com/platform/organizations/456656/fields"},{"@type":"Link","rel":"farms","uri":"https://sandboxapi.deere.com/platform/organizations/456656/farms"},{"@type":"Link","rel":"boundaries","uri":"https://sandboxapi.deere.com/platform/organizations/456656/boundaries"},{"@type":"Link","rel":"clients","uri":"https://sandboxapi.deere.com/platform/organizations/456656/clients"},{"@type":"Link","rel":"controllers","uri":"https://sandboxapi.deere.com/platform/organizations/456656/orgController"}]},{"@type":"Organization","name":"Organization
100
+ G","type":"customer","member":true,"id":"456657","links":[{"@type":"Link","rel":"self","uri":"https://sandboxapi.deere.com/platform/organizations/456657"},{"@type":"Link","rel":"machines","uri":"https://sandboxapi.deere.com/platform/organizations/456657/machines"},{"@type":"Link","rel":"wdtCapableMachines","uri":"https://sandboxapi.deere.com/platform/organizations/456657/machines?capability=wdt"},{"@type":"Link","rel":"files","uri":"https://sandboxapi.deere.com/platform/organizations/456657/files"},{"@type":"Link","rel":"transferableFiles","uri":"https://sandboxapi.deere.com/platform/organizations/456657/files?transferable=true"},{"@type":"Link","rel":"uploadFile","uri":"https://sandboxapi.deere.com/platform/organizations/456657/files"},{"@type":"Link","rel":"sendFileToMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456657/fileTransfers"},{"@type":"Link","rel":"addMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456657/machines"},{"@type":"Link","rel":"addField","uri":"https://sandboxapi.deere.com/platform/organizations/456657/fields"},{"@type":"Link","rel":"assets","uri":"https://sandboxapi.deere.com/platform/organizations/456657/assets"},{"@type":"Link","rel":"fields","uri":"https://sandboxapi.deere.com/platform/organizations/456657/fields"},{"@type":"Link","rel":"farms","uri":"https://sandboxapi.deere.com/platform/organizations/456657/farms"},{"@type":"Link","rel":"boundaries","uri":"https://sandboxapi.deere.com/platform/organizations/456657/boundaries"},{"@type":"Link","rel":"clients","uri":"https://sandboxapi.deere.com/platform/organizations/456657/clients"},{"@type":"Link","rel":"controllers","uri":"https://sandboxapi.deere.com/platform/organizations/456657/orgController"}]},{"@type":"Organization","name":"Organization
101
+ H","type":"customer","member":true,"id":"456658","links":[{"@type":"Link","rel":"self","uri":"https://sandboxapi.deere.com/platform/organizations/456658"},{"@type":"Link","rel":"machines","uri":"https://sandboxapi.deere.com/platform/organizations/456658/machines"},{"@type":"Link","rel":"wdtCapableMachines","uri":"https://sandboxapi.deere.com/platform/organizations/456658/machines?capability=wdt"},{"@type":"Link","rel":"files","uri":"https://sandboxapi.deere.com/platform/organizations/456658/files"},{"@type":"Link","rel":"transferableFiles","uri":"https://sandboxapi.deere.com/platform/organizations/456658/files?transferable=true"},{"@type":"Link","rel":"uploadFile","uri":"https://sandboxapi.deere.com/platform/organizations/456658/files"},{"@type":"Link","rel":"sendFileToMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456658/fileTransfers"},{"@type":"Link","rel":"addMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456658/machines"},{"@type":"Link","rel":"addField","uri":"https://sandboxapi.deere.com/platform/organizations/456658/fields"},{"@type":"Link","rel":"assets","uri":"https://sandboxapi.deere.com/platform/organizations/456658/assets"},{"@type":"Link","rel":"fields","uri":"https://sandboxapi.deere.com/platform/organizations/456658/fields"},{"@type":"Link","rel":"farms","uri":"https://sandboxapi.deere.com/platform/organizations/456658/farms"},{"@type":"Link","rel":"boundaries","uri":"https://sandboxapi.deere.com/platform/organizations/456658/boundaries"},{"@type":"Link","rel":"clients","uri":"https://sandboxapi.deere.com/platform/organizations/456658/clients"},{"@type":"Link","rel":"controllers","uri":"https://sandboxapi.deere.com/platform/organizations/456658/orgController"}]},{"@type":"Organization","name":"Organization
102
+ Jay","type":"customer","member":true,"id":"456661","links":[{"@type":"Link","rel":"self","uri":"https://sandboxapi.deere.com/platform/organizations/456661"},{"@type":"Link","rel":"machines","uri":"https://sandboxapi.deere.com/platform/organizations/456661/machines"},{"@type":"Link","rel":"wdtCapableMachines","uri":"https://sandboxapi.deere.com/platform/organizations/456661/machines?capability=wdt"},{"@type":"Link","rel":"files","uri":"https://sandboxapi.deere.com/platform/organizations/456661/files"},{"@type":"Link","rel":"transferableFiles","uri":"https://sandboxapi.deere.com/platform/organizations/456661/files?transferable=true"},{"@type":"Link","rel":"uploadFile","uri":"https://sandboxapi.deere.com/platform/organizations/456661/files"},{"@type":"Link","rel":"sendFileToMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456661/fileTransfers"},{"@type":"Link","rel":"addMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456661/machines"},{"@type":"Link","rel":"addField","uri":"https://sandboxapi.deere.com/platform/organizations/456661/fields"},{"@type":"Link","rel":"assets","uri":"https://sandboxapi.deere.com/platform/organizations/456661/assets"},{"@type":"Link","rel":"fields","uri":"https://sandboxapi.deere.com/platform/organizations/456661/fields"},{"@type":"Link","rel":"farms","uri":"https://sandboxapi.deere.com/platform/organizations/456661/farms"},{"@type":"Link","rel":"boundaries","uri":"https://sandboxapi.deere.com/platform/organizations/456661/boundaries"},{"@type":"Link","rel":"clients","uri":"https://sandboxapi.deere.com/platform/organizations/456661/clients"},{"@type":"Link","rel":"controllers","uri":"https://sandboxapi.deere.com/platform/organizations/456661/orgController"}]},{"@type":"Organization","name":"Organization
103
+ Kay","type":"customer","member":true,"id":"456662","links":[{"@type":"Link","rel":"self","uri":"https://sandboxapi.deere.com/platform/organizations/456662"},{"@type":"Link","rel":"machines","uri":"https://sandboxapi.deere.com/platform/organizations/456662/machines"},{"@type":"Link","rel":"wdtCapableMachines","uri":"https://sandboxapi.deere.com/platform/organizations/456662/machines?capability=wdt"},{"@type":"Link","rel":"files","uri":"https://sandboxapi.deere.com/platform/organizations/456662/files"},{"@type":"Link","rel":"transferableFiles","uri":"https://sandboxapi.deere.com/platform/organizations/456662/files?transferable=true"},{"@type":"Link","rel":"uploadFile","uri":"https://sandboxapi.deere.com/platform/organizations/456662/files"},{"@type":"Link","rel":"sendFileToMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456662/fileTransfers"},{"@type":"Link","rel":"addMachine","uri":"https://sandboxapi.deere.com/platform/organizations/456662/machines"},{"@type":"Link","rel":"addField","uri":"https://sandboxapi.deere.com/platform/organizations/456662/fields"},{"@type":"Link","rel":"assets","uri":"https://sandboxapi.deere.com/platform/organizations/456662/assets"},{"@type":"Link","rel":"fields","uri":"https://sandboxapi.deere.com/platform/organizations/456662/fields"},{"@type":"Link","rel":"farms","uri":"https://sandboxapi.deere.com/platform/organizations/456662/farms"},{"@type":"Link","rel":"boundaries","uri":"https://sandboxapi.deere.com/platform/organizations/456662/boundaries"},{"@type":"Link","rel":"clients","uri":"https://sandboxapi.deere.com/platform/organizations/456662/clients"},{"@type":"Link","rel":"controllers","uri":"https://sandboxapi.deere.com/platform/organizations/456662/orgController"}]}]}'
104
+ http_version:
105
+ recorded_at: Wed, 08 Jan 2020 17:49:30 GMT
49
106
  recorded_with: VCR 5.0.0
@@ -17,5 +17,13 @@ class MyJohnDeereApiTest < MiniTest::Test
17
17
  it 'loads Consumer' do
18
18
  assert JD::Consumer
19
19
  end
20
+
21
+ it 'loads Request' do
22
+ assert JD::Request
23
+ end
24
+
25
+ it 'loads Model' do
26
+ assert JD::Model
27
+ end
20
28
  end
21
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: my_john_deere_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaime. Bellmyer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-07 00:00:00.000000000 Z
11
+ date: 2020-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: vcr
@@ -99,11 +99,21 @@ files:
99
99
  - lib/my_john_deere_api/authorize.rb
100
100
  - lib/my_john_deere_api/client.rb
101
101
  - lib/my_john_deere_api/consumer.rb
102
+ - lib/my_john_deere_api/model.rb
103
+ - lib/my_john_deere_api/model/organization.rb
104
+ - lib/my_john_deere_api/request.rb
105
+ - lib/my_john_deere_api/request/collection.rb
106
+ - lib/my_john_deere_api/request/organizations.rb
102
107
  - lib/my_john_deere_api/version.rb
103
- - test/lib/test_authorize.rb
104
- - test/lib/test_client.rb
105
- - test/lib/test_consumer.rb
106
- - test/lib/test_version.rb
108
+ - test/lib/my_john_deere_api/model/test_organization.rb
109
+ - test/lib/my_john_deere_api/request/test_collection.rb
110
+ - test/lib/my_john_deere_api/request/test_organizations.rb
111
+ - test/lib/my_john_deere_api/test_authorize.rb
112
+ - test/lib/my_john_deere_api/test_client.rb
113
+ - test/lib/my_john_deere_api/test_consumer.rb
114
+ - test/lib/my_john_deere_api/test_model.rb
115
+ - test/lib/my_john_deere_api/test_request.rb
116
+ - test/lib/my_john_deere_api/test_version.rb
107
117
  - test/support/helper.rb
108
118
  - test/support/vcr/app_consumer.yml
109
119
  - test/support/vcr/catalog.yml