drone_view_api 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/drone_view_api-0.1.2.gem +0 -0
- data/drone_view_api-0.1.3.gem +0 -0
- data/lib/drone_api/inspections/create.rb +41 -0
- data/lib/drone_api/inspections.rb +5 -0
- data/lib/drone_api/version.rb +1 -1
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27407d251bcaefeda71580e96e4de326c34c517381366a127a76be9be531a90d
|
4
|
+
data.tar.gz: 7a3da58293dd3e123017073d5aa77bf233e86d170029b186dae4b2b377d0d777
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a6bae0b679f6038e593ded001e1c21d1a48097b672af6ef1816c58af5dbdcf21f6dfac8cad200ebc723184fd6539879107f0046317b6e13f0fd522080ecac5a
|
7
|
+
data.tar.gz: feec7594f7d0314f68d9db8836e697a00a9ac56655cc22ae443d8ebb9c7443c6113489b30f764b4aec5a5114146ddb77fc749137daa3316b5be810b9338d3fc1
|
Binary file
|
Binary file
|
@@ -0,0 +1,41 @@
|
|
1
|
+
class DroneApi::Inspections::Create < DroneApi::Base
|
2
|
+
Params = Struct.new(
|
3
|
+
:name,
|
4
|
+
:inspection_date,
|
5
|
+
:building,
|
6
|
+
keyword_init: true
|
7
|
+
)
|
8
|
+
|
9
|
+
def initialize params={}
|
10
|
+
super()
|
11
|
+
@params = Params.new(params)
|
12
|
+
end
|
13
|
+
|
14
|
+
def process_response response
|
15
|
+
@response_data = JSON.parse(response)
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def validate
|
21
|
+
@errors['name'] << 'Can\'t be blank' if @params.name.to_s.empty?
|
22
|
+
end
|
23
|
+
|
24
|
+
def api_path
|
25
|
+
"/api/v2/inspections"
|
26
|
+
end
|
27
|
+
|
28
|
+
def request_type
|
29
|
+
'POST'
|
30
|
+
end
|
31
|
+
|
32
|
+
def payload
|
33
|
+
{
|
34
|
+
inspection: {
|
35
|
+
name: @params.email,
|
36
|
+
inspection_date: @params.inspection_date,
|
37
|
+
building: @params.building
|
38
|
+
}
|
39
|
+
}
|
40
|
+
end
|
41
|
+
end
|
data/lib/drone_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: drone_view_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- saurabh gulati
|
@@ -47,6 +47,8 @@ files:
|
|
47
47
|
- bin/console
|
48
48
|
- bin/setup
|
49
49
|
- drone_api.gemspec
|
50
|
+
- drone_view_api-0.1.2.gem
|
51
|
+
- drone_view_api-0.1.3.gem
|
50
52
|
- lib/drone_api.rb
|
51
53
|
- lib/drone_api/accounts.rb
|
52
54
|
- lib/drone_api/accounts/create.rb
|
@@ -58,6 +60,8 @@ files:
|
|
58
60
|
- lib/drone_api/clients.rb
|
59
61
|
- lib/drone_api/clients/create.rb
|
60
62
|
- lib/drone_api/clients/show.rb
|
63
|
+
- lib/drone_api/inspections.rb
|
64
|
+
- lib/drone_api/inspections/create.rb
|
61
65
|
- lib/drone_api/version.rb
|
62
66
|
homepage: http://app.droneviewpro.com
|
63
67
|
licenses:
|