gosquared 0.0.1 → 0.0.2

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.
data/README.md CHANGED
@@ -1,3 +1,75 @@
1
1
  ## GoSquared Ruby API client
2
2
 
3
- Under construction. Check back for progress in a few days :)
3
+ This module works with the [GoSquared API][api-docs], making it really easy to integrate GoSquared with your node app. You can also use it to track metrics and events in your application using GoSquared
4
+
5
+ ## Installation
6
+ ```bash
7
+ gem install gosquared
8
+ ```
9
+
10
+ ## Usage
11
+
12
+ ```ruby
13
+ # Create an API client
14
+ gosquared_api = GoSquared::API.new(opts)
15
+
16
+ # Create Event client
17
+ gosquared_event = GoSquared::Event.new(opts)
18
+
19
+ ```
20
+
21
+ ##### Options
22
+
23
+ * api_key: API key from your [account][casa]. Required for API client, not required for event client.
24
+ * site_token: Token for the registered site you're working with. Required.
25
+ * debugLevel: One of:
26
+ * GoSquared::DEBUG_LEVELS[:ALL]
27
+ * GoSquared::DEBUG_LEVELS[:TRACE]
28
+ * GoSquared::DEBUG_LEVELS[:NOTICE]
29
+ * GoSquared::DEBUG_LEVELS[:WARNING]
30
+ * GoSquared::DEBUG_LEVELS[:FATAL]
31
+
32
+ ### API
33
+ ```ruby
34
+ require 'gosquared'
35
+
36
+ gosquared_api = GoSquared::API.new({
37
+ :api_key => 'demo',
38
+ :site_token => 'GSN-181546-E'
39
+ })
40
+
41
+ response = gosquared_api.concurrents(params)
42
+ ```
43
+
44
+ All functions listed in the [API documentation][api-docs] are methods you can call on the ```GoSquared::API``` class.
45
+
46
+
47
+ ### Tracking
48
+
49
+ ##### Events
50
+ Send events to GoSquared:
51
+
52
+ ```ruby
53
+ require 'gosquared'
54
+
55
+ gosquared_event = GoSquared::Event.new({
56
+ :site_token => 'GSN-181546-E'
57
+ })
58
+
59
+ response = gosquared_event.store_event('Test Event', {
60
+ :its => true,
61
+ :'you can' => 'store',
62
+ :any => 'event',
63
+ :properties => 'You Like'
64
+ })
65
+ ```
66
+
67
+ ## Run tests
68
+ Install all dependencies using ```bundle``` then:
69
+
70
+ ```bash
71
+ rake
72
+ ```
73
+
74
+ [api-docs]: https://www.gosquared.com/developer/latest/
75
+ [casa]: https://www.gosquared.com/home/developer
data/gosquared.gemspec CHANGED
@@ -5,10 +5,10 @@ $:.unshift lib unless $:.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "gosquared"
8
- spec.version = "0.0.1"
8
+ spec.version = "0.0.2"
9
9
  spec.authors = ["Geoff Wagstaff"]
10
10
  spec.email = ["geoff@gosquared.com"]
11
- spec.homepage = "https://www.gosquared.com/"
11
+ spec.homepage = "https://github.com/gosquared/ruby-client"
12
12
  spec.summary = %q{Official GoSquared Ruby Client}
13
13
  spec.description = %q{For use with the API and for tracking metrics}
14
14
 
data/test/api.rb CHANGED
@@ -4,7 +4,7 @@ require 'gosquared'
4
4
 
5
5
  describe GoSquared do
6
6
  before do
7
- @gosquared = GoSquared::API.new(:site_token => "GSN-106863-S", :api_key => "demo")
7
+ @gosquared = GoSquared::API.new({:site_token => "GSN-106863-S", :api_key => "demo"})
8
8
  end
9
9
 
10
10
  describe "getting functions" do
data/test/event.rb CHANGED
@@ -4,7 +4,7 @@ require 'gosquared'
4
4
 
5
5
  describe GoSquared do
6
6
  before do
7
- @gosquared = GoSquared::Event.new(:site_token => "GSN-106863-S")
7
+ @gosquared = GoSquared::Event.new({:site_token => "GSN-106863-S"})
8
8
  end
9
9
 
10
10
  describe "storing events" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gosquared
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -90,7 +90,7 @@ files:
90
90
  - README.md
91
91
  - test/api.rb
92
92
  - test/event.rb
93
- homepage: https://www.gosquared.com/
93
+ homepage: https://github.com/gosquared/ruby-client
94
94
  licenses: []
95
95
  post_install_message:
96
96
  rdoc_options: []
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
110
  version: '0'
111
111
  requirements: []
112
112
  rubyforge_project:
113
- rubygems_version: 1.8.23
113
+ rubygems_version: 1.8.25
114
114
  signing_key:
115
115
  specification_version: 3
116
116
  summary: Official GoSquared Ruby Client