brandspotter 1.0.0 → 1.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 71a7612b26d3403b8ec7f271850d8893ad981af7
4
- data.tar.gz: 8371df6a3edfd721bc1744432e598a6ad6bfd3cd
3
+ metadata.gz: c1f66dc40e057f5c3de9a3a2133bcc4411b2c1fc
4
+ data.tar.gz: 8cbff907d7b5730cbf963d8f5e8b3526f2af8622
5
5
  SHA512:
6
- metadata.gz: 4b826af70df03199ec8024bfea35a21ce6345765739a5eb267ecba28ee62fbe17c5a6363593f8fcc945711f48dc4371ec53e960a2c1a7821bfd4c1fb759a0002
7
- data.tar.gz: ddb08fac5157f0fd3469529a250f2f8a6a47a9f2cbe3d8ae6a36ee4ce0cf2873dbcef8363291d101460a6832730e325e0b4d21b2375e062dea91aa1955664ca7
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.0'
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
@@ -1,3 +1,3 @@
1
1
  module Brandspotter
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
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.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-04-20 00:00:00.000000000 Z
12
+ date: 2016-05-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler