work_surfer 0.0.2.2 → 0.0.3

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
  SHA1:
3
- metadata.gz: 86ad6732756669ca9ff2cd17d2b93e5431293cba
4
- data.tar.gz: f0431aabdf32e47dd36236dc5a752ae03125d6ac
3
+ metadata.gz: 1c8839ef65eb5cfaf913e14a0a69ca6d13b91afe
4
+ data.tar.gz: '08a32877fc9b4ec11a0c45d4f430a252c586dc8a'
5
5
  SHA512:
6
- metadata.gz: df928c14b863bb5fed17220fa857f23a293d4232648bca72d6de1593e2f58da32998d3a0abfa5f0164767245f4b3d954a722abbebf69a27fc9452e6e8d61e4b8
7
- data.tar.gz: 4a5cc6236210583a8cca30a2d48fdd4f012f14e5311c1219ee0de18303e8cfdcafd47e98181ba1e774d763474f206275f06495c247672469bbb749237d2f51cf
6
+ metadata.gz: 1bcd3afffcbee600fc0a78a27992b58e1ed087156dbf2b7ebf5b6919977e1b9d5729d69cfdbc968374cb2c4cd5991466aeb65c1b9b3c0f4173307c39e8de3a4b
7
+ data.tar.gz: 141d9da9a6b8d1a649af472e13b7fd92d32a7e21296885532f872a923eb575dd0a2261a990f9e4a2ee5d87b58ebef22b19632124a73ad3d2bc8fddbf6e47c1a7
@@ -5,6 +5,10 @@ An experiemental unofficial Ruby client for the
5
5
 
6
6
  ## v0
7
7
 
8
+ ### v0.0.3 (2017-08-30)
9
+
10
+ - Added Orders.add API.
11
+
8
12
  ### v0.0.2.2 (2016-10-26)
9
13
 
10
14
  - Fix date parsing bug.
data/README.md CHANGED
@@ -77,9 +77,10 @@ not be overwritten in most cases.
77
77
 
78
78
  ### APIs
79
79
 
80
- - `Territories.list()`
81
80
  - `ApprovedPlans.get(route_id, territory_id: WorkSurfer::Client.default_territory_id)`
82
81
  - `ApprovedPlans.list(date: "today", territory_id: WorkSurfer::Client.default_territory_id)`
82
+ - `Orders.add(*orders, territory_id: WorkSurfer::Client.default_territory_id, **options)`
83
+ - `Territories.list()`
83
84
  - `TimeOfArrival.get(route_id, territory_id: WorkSurfer::Client.default_territory_id)`
84
85
  - `TimeOfArrival.list(date: nil, territory_id: WorkSurfer::Client.default_territory_id, vehicle_id: nil)`
85
86
 
@@ -107,6 +108,10 @@ At the moment, The following APIs are supported:
107
108
  - List Approved Routes
108
109
  - Get Approved Route
109
110
 
111
+ ### [Orders](https://wwrm.workwave.com/api/#orders-api)
112
+
113
+ - Add Orders
114
+
110
115
  ### [Territories](https://wwrm.workwave.com/api/#territories-api)
111
116
 
112
117
  Fully supported.
@@ -8,5 +8,6 @@ end
8
8
  require "work_surfer/api/base"
9
9
 
10
10
  require "work_surfer/api/approved_plans"
11
+ require "work_surfer/api/orders"
11
12
  require "work_surfer/api/territories"
12
13
  require "work_surfer/api/time_of_arrival"
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WorkSurfer
4
+ module API
5
+ class Orders < Base
6
+ class << self
7
+ def add(*orders, territory_id: WorkSurfer::Client.default_territory_id, **options)
8
+ client.post("territories/#{territory_id}/orders", {
9
+ orders: orders,
10
+ }.merge(options).to_json)
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -31,7 +31,7 @@ module WorkSurfer
31
31
 
32
32
  self.connection_builder = ->(builder) {
33
33
  builder.adapter Faraday.default_adapter
34
- builder.request :url_encoded
34
+ builder.request :json
35
35
  builder.response :json
36
36
  }
37
37
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: work_surfer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Niels Ganser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-26 00:00:00.000000000 Z
11
+ date: 2017-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -58,6 +58,7 @@ files:
58
58
  - lib/work_surfer/api.rb
59
59
  - lib/work_surfer/api/approved_plans.rb
60
60
  - lib/work_surfer/api/base.rb
61
+ - lib/work_surfer/api/orders.rb
61
62
  - lib/work_surfer/api/territories.rb
62
63
  - lib/work_surfer/api/time_of_arrival.rb
63
64
  - lib/work_surfer/client.rb
@@ -81,10 +82,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
82
  version: '0'
82
83
  requirements: []
83
84
  rubyforge_project:
84
- rubygems_version: 2.5.1
85
+ rubygems_version: 2.6.8
85
86
  signing_key:
86
87
  specification_version: 4
87
88
  summary: An experiemental unofficial API client for the WorkWave.com Route Manager
88
89
  API.
89
90
  test_files: []
90
- has_rdoc: