my_john_deere_api 2.3.5 → 2.3.6

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: d94f50a7c306efa861fb855b0c8a90d1b070c8ad230e05fc0ba298118b5d91c4
4
- data.tar.gz: f105e3d4c42cc755db700ce5ceeaecd2a9edf2292b8ddb4ff4e559913a68fd89
3
+ metadata.gz: 39a857dc82535c379db65a049ee87f0ae06fd23d03a1f32d53db8cebc3b12f2f
4
+ data.tar.gz: 906ca1fee4f646bbb37d4f2555cfeea624e574bb4f21b380be2bd585fb5f5caf
5
5
  SHA512:
6
- metadata.gz: d35cdcecd45fef14e1e78f454846a115c29b2c8e20543407540ca5ebd44f82e76a796e01b14fe4c02b70a725b9fad726d97d06f938dd6f00da5dcd5a779d5fe3
7
- data.tar.gz: 8b33a28e57f5e0d08bc71d975be12e7c0fc71fa596a1cceb4b2fe611c31d3a1422ac2d2b7e314a6f6bc692ef5c2a268dbb8c00158daa9eff37893cc4e24233a0
6
+ metadata.gz: 34e771d3e96bdbe9050778fef5df5868da414a907dd41ef421494fb11b7908ec1c1cdddaf3a2e923de63f90a9cea7ebab885250769973d7aaa3dd3251ee04fea
7
+ data.tar.gz: f1c103dd3399205dbfa7e0618d974df497fa495ba7beb6d9b05565b6bf584bdf786ce6323485003dda6d0511d67c72d11529c60cc5ff8eb65fd691f70ccaedfd
data/README.md CHANGED
@@ -600,13 +600,74 @@ field.archived?
600
600
  # => false
601
601
 
602
602
  field.links
603
- # => a hash of API urls related to this asset
603
+ # => a hash of API urls related to this field
604
604
 
605
605
  field.flags
606
606
  # => collection of flags belonging to this field
607
607
  ```
608
608
 
609
609
 
610
+ ### [Flags](https://developer.deere.com/#!documentation&doc=.%2Fmyjohndeere%2Fflags.htm)
611
+
612
+ Handles a field's flags. Flag collections support the following methods. Note, John Deere does not provide an endpoint to retrieve a specific flag by id:
613
+
614
+ * all
615
+ * count
616
+ * first
617
+
618
+ An individual flag supports the following methods and associations:
619
+
620
+ * id
621
+ * notes
622
+ * geometry
623
+ * archived?
624
+ * proximity\_alert\_enabled?
625
+ * links
626
+
627
+ The `count` method only requires loading the first page of results, so it's a relatively cheap call. On the other hand,
628
+ `all` forces the entire collection to be loaded from John Deere's API, so use with caution. Flags can be
629
+ created via the API, but there is no `create` method on this collection yet.
630
+
631
+ ```ruby
632
+ field.flags
633
+ # => collection of flags under this field
634
+
635
+ field.flags.count
636
+ # => 15
637
+
638
+ flag = field.flags.first
639
+ # => an individual flag object
640
+
641
+ flag.notes
642
+ # => 'A big rock on the left after entering the field'
643
+
644
+ flag.geometry
645
+ # => a GeoJSON formatted hash, for example:
646
+ # {
647
+ # "type"=>"Feature",
648
+ # "geometry"=>{
649
+ # "geometries"=>[
650
+ # {
651
+ # "coordinates"=>[-95.123456, 40.123456],
652
+ # "type"=>"Point"
653
+ # }
654
+ # ],
655
+ # "type"=>"GeometryCollection"
656
+ # }
657
+ # }
658
+
659
+
660
+ field.archived?
661
+ # => false
662
+
663
+ field.proximity_alert_enabled?
664
+ # => true
665
+
666
+ field.links
667
+ # => a hash of API urls related to this flag
668
+ ```
669
+
670
+
610
671
  ## Direct API Requests
611
672
 
612
673
  While the goal of the client is to eliminate the need to make/interpret calls to the John Deere API, it's important
@@ -1,3 +1,3 @@
1
1
  module MyJohnDeereApi
2
- VERSION='2.3.5'
2
+ VERSION='2.3.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: my_john_deere_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.5
4
+ version: 2.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaime Bellmyer