brandspotter 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -1
- data/lib/brandspotter/client/jobs.rb +17 -0
- data/lib/brandspotter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1f66dc40e057f5c3de9a3a2133bcc4411b2c1fc
|
4
|
+
data.tar.gz: 8cbff907d7b5730cbf963d8f5e8b3526f2af8622
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9bcd1d88217e66f0182a0e5347876ebdc52b38c3fff48e53c0a06d3a117dd5f8de5bc6f6bb134950ef962491390a646c986287355128e45368fde28df76eb22
|
7
|
+
data.tar.gz: b86cc30386753a396a0c8ec9eec2003850192260329412e94c0f2d876ee638b95a1d14e4251ac696f8b6d57f923eab37dba4e6e0b0564090c7459e89088f3622
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ API is currently invitation only.
|
|
7
7
|
|
8
8
|
Add this line to your application's Gemfile:
|
9
9
|
|
10
|
-
gem ‘brandspotter’, '~> 0.1
|
10
|
+
gem ‘brandspotter’, '~> 1.0.1'
|
11
11
|
|
12
12
|
And then execute:
|
13
13
|
|
@@ -42,3 +42,19 @@ Create a new initializer: (config/initializers/brandspotter.rb)
|
|
42
42
|
# delete subscription
|
43
43
|
client = Brandspotter::Client.new
|
44
44
|
client.destroy_subscription(subscription_id)
|
45
|
+
|
46
|
+
# create a new location
|
47
|
+
client = Brandspotter::Client.new
|
48
|
+
client.create_location(location: 'Amsterdam')
|
49
|
+
|
50
|
+
# list all locations
|
51
|
+
client = Brandspotter::Client.new
|
52
|
+
client.locations
|
53
|
+
|
54
|
+
# find specific location
|
55
|
+
client = Brandspotter::Client.new
|
56
|
+
client.find_location(location_id)
|
57
|
+
|
58
|
+
# delete location
|
59
|
+
client = Brandspotter::Client.new
|
60
|
+
client.destroy_location(location_id)
|
@@ -17,5 +17,22 @@ module Brandspotter
|
|
17
17
|
def destroy_subscription(id)
|
18
18
|
delete_request "/subscriptions/#{id}"
|
19
19
|
end
|
20
|
+
|
21
|
+
def locations
|
22
|
+
get_request configure_payload('/locations')
|
23
|
+
end
|
24
|
+
|
25
|
+
def find_location(id)
|
26
|
+
get_request configure_payload("/locations/#{id}")
|
27
|
+
end
|
28
|
+
|
29
|
+
def create_location(opts={})
|
30
|
+
opts.assert_valid_keys(:location)
|
31
|
+
post_request '/locations', opts
|
32
|
+
end
|
33
|
+
|
34
|
+
def destroy_location(id)
|
35
|
+
delete_request "/locations/#{id}"
|
36
|
+
end
|
20
37
|
end
|
21
38
|
end
|
data/lib/brandspotter/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brandspotter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dirk van Wensem
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-05-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|