artemis_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 +4 -4
- data/History.txt +5 -1
- data/artemis_api-0.1.0.gem +0 -0
- data/lib/artemis_api/client.rb +4 -0
- data/lib/artemis_api/subscription.rb +9 -0
- data/lib/artemis_api/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32db9ba97ad1d05952feab8c6bd9b4ee8de457ba
|
4
|
+
data.tar.gz: 51c060027ec42f376727b5306458757050fefbec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68232ded4b5b706fd7ddcc3be017a7d054063df9af3090447449833d5eb16177da445c863eeac10153cc7b98d168fdbb7c9a23877eaf73c4cee222f38c2a8039
|
7
|
+
data.tar.gz: cc72bb823a05f33d8cbda6e231464aee7ed1f3555016c60952fcaeaeb9fc8c956e0d18b840a1b79fd057be6f0884002a71be9c61dc0391dc007c90de0a0f16ae
|
data/History.txt
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
# coding: UTF-8
|
2
2
|
|
3
|
+
=== 0.2.0 / 2019-10-24
|
4
|
+
|
5
|
+
* Added the ability to delete Subscriptions
|
6
|
+
|
3
7
|
=== 0.1.0 / 2019-10-03
|
4
8
|
|
5
9
|
* Initial public release of the Artemis API wrapper
|
6
10
|
|
7
11
|
Includes initial support for the following Artemis classes:
|
8
|
-
User, Facility, Organization, Batch, Zone, Completion, Harvest, Discard, HarvestUnit, SeedingUnit
|
12
|
+
User, Facility, Organization, Batch, Zone, Completion, Harvest, Discard, HarvestUnit, SeedingUnit, Item, Subscription
|
Binary file
|
data/lib/artemis_api/client.rb
CHANGED
@@ -20,5 +20,14 @@ module ArtemisApi
|
|
20
20
|
|
21
21
|
response.status == 200 ? client.process_response(response, 'subscriptions') : false
|
22
22
|
end
|
23
|
+
|
24
|
+
def self.delete(id:, facility_id:, client:)
|
25
|
+
client.oauth_token.refresh! if client.oauth_token.expired?
|
26
|
+
|
27
|
+
url = "#{client.options[:base_uri]}/api/v3/facilities/#{facility_id}/subscriptions/#{id}"
|
28
|
+
|
29
|
+
response = client.oauth_token.delete(url)
|
30
|
+
client.remove_record('subscriptions', id) if response.status == 204
|
31
|
+
end
|
23
32
|
end
|
24
33
|
end
|
data/lib/artemis_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: artemis_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamey Hampton
|
@@ -110,6 +110,7 @@ files:
|
|
110
110
|
- LICENSE.txt
|
111
111
|
- README.md
|
112
112
|
- Rakefile
|
113
|
+
- artemis_api-0.1.0.gem
|
113
114
|
- artemis_api.gemspec
|
114
115
|
- bin/console
|
115
116
|
- bin/setup
|