assistly 0.2.4 → 0.2.5
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/LICENSE.mkd +1 -1
- data/README.mkd +51 -43
- data/assistly.gemspec +2 -2
- data/lib/assistly/connection.rb +1 -1
- data/lib/assistly/version.rb +1 -1
- metadata +12 -14
data/LICENSE.mkd
CHANGED
data/README.mkd
CHANGED
@@ -6,6 +6,14 @@ Installation
|
|
6
6
|
------------
|
7
7
|
gem install assistly
|
8
8
|
|
9
|
+
What's new in 0.2.5?
|
10
|
+
------------------
|
11
|
+
Newer MultiJson
|
12
|
+
|
13
|
+
What's new in 0.2.4?
|
14
|
+
------------------
|
15
|
+
Resolved an issue that was breaking PUT requests.
|
16
|
+
|
9
17
|
What's new in 0.2.3?
|
10
18
|
------------------
|
11
19
|
Removed deep_merge because it conflicts with rails. Handling the merge inside the create_outbound_interaction method only on headers for now, until we need it elsewhere.
|
@@ -45,7 +53,7 @@ Usage Examples
|
|
45
53
|
|
46
54
|
# All methods require authentication. To get your Assistly OAuth credentials,
|
47
55
|
# register an app in the Assistly admin for your account at http://your-domain.assistly.com/admin
|
48
|
-
|
56
|
+
Assistly.configure do |config|
|
49
57
|
config.support_email = "help@example.com"
|
50
58
|
config.subdomain = YOUR_ASSISTLY_SUBDOMAIN
|
51
59
|
config.consumer_key = YOUR_CONSUMER_KEY
|
@@ -59,55 +67,55 @@ Usage Examples
|
|
59
67
|
######
|
60
68
|
|
61
69
|
# List cases
|
62
|
-
|
63
|
-
|
70
|
+
Assistly.cases
|
71
|
+
Assistly.cases(:since_id => 12345)
|
64
72
|
|
65
73
|
# Get a specific case
|
66
|
-
|
74
|
+
Assistly.case(12345)
|
67
75
|
|
68
76
|
# Update a specific case
|
69
|
-
|
77
|
+
Assistly.update_case(12345, :subject => "Something Else")
|
70
78
|
|
71
79
|
# Get a case url
|
72
|
-
|
80
|
+
Assistly.case_url(12345)
|
73
81
|
|
74
82
|
######
|
75
83
|
# Customers
|
76
84
|
######
|
77
85
|
|
78
86
|
# List customers
|
79
|
-
|
80
|
-
|
87
|
+
Assistly.customers
|
88
|
+
Assistly.customers(:since_id => 12345, :count => 5)
|
81
89
|
|
82
90
|
# Get a specific customer
|
83
|
-
|
91
|
+
Assistly.customer(12345)
|
84
92
|
|
85
93
|
# Create a customer
|
86
|
-
|
94
|
+
Assistly.create_customer(:name => "Chris Warren", :twitter => "cdwarren")
|
87
95
|
|
88
96
|
# Update a customer
|
89
|
-
|
97
|
+
Assistly.update_customer(12345, :name => "Christopher Warren")
|
90
98
|
|
91
99
|
# Add a customer email
|
92
|
-
|
93
|
-
|
100
|
+
Assistly.create_customer_email(12345, "foo@example.com")
|
101
|
+
Assistly.create_customer_email(12345, "foo@example.com", :customer_contact_type => "work")
|
94
102
|
|
95
103
|
# Update a customer email
|
96
|
-
|
97
|
-
|
104
|
+
Assistly.update_customer_email(12345, 54321, :email => "foo@example.com")
|
105
|
+
Assistly.update_customer_email(12345, 54321, :customer_contact_type => "work")
|
98
106
|
|
99
107
|
######
|
100
108
|
# Interactions
|
101
109
|
######
|
102
110
|
|
103
111
|
# List interactions
|
104
|
-
|
105
|
-
|
106
|
-
|
112
|
+
Assistly.interactions
|
113
|
+
Assistly.interactions(:since_id => 12345)
|
114
|
+
Assistly.interactions(:since_id => 12345, :count => 5)
|
107
115
|
|
108
116
|
# Create an inbound interaction
|
109
|
-
|
110
|
-
|
117
|
+
Assistly.create_interaction(:interaction_subject => "help me", :customer_email => "foo@example.com", :interaction_body => "You're my only hope.")
|
118
|
+
Assistly.create_inbound_interaction(:interaction_subject => "help me", :customer_email => "foo@example.com", :interaction_body => "You're my only hope.")
|
111
119
|
|
112
120
|
# Create an outbound interaction
|
113
121
|
# Assistly's API doesn't support creating outbound communications, so we do this over email with a BCC back to Assistly and customer headers.
|
@@ -117,84 +125,84 @@ Usage Examples
|
|
117
125
|
# Additional headers can be passed as well http://support.assistly.com/customer/portal/articles/6728
|
118
126
|
#
|
119
127
|
# Email is sent using Pony https://github.com/benprew/pony
|
120
|
-
|
121
|
-
|
128
|
+
Assistly.create_interaction(:interaction_subject => "Missed Your Call", :customer_email => "foo@example.com", :interaction_body => "Sorry we missed yoru call. What's up?", :direction => "outbound")
|
129
|
+
Assistly.create_outbound_interaction("foo@example.com", "Missed Your Call", "Sorry we missed yoru call. What's up?")
|
122
130
|
|
123
131
|
######
|
124
132
|
# Users
|
125
133
|
######
|
126
134
|
|
127
135
|
# List users
|
128
|
-
|
136
|
+
Assistly.users
|
129
137
|
|
130
138
|
# Get a specific user
|
131
|
-
|
139
|
+
Assistly.user(12345)
|
132
140
|
|
133
141
|
######
|
134
142
|
# Topics
|
135
143
|
######
|
136
144
|
|
137
145
|
# List Topics
|
138
|
-
|
146
|
+
Assistly.topics
|
139
147
|
|
140
148
|
# Get a specific topic
|
141
|
-
|
149
|
+
Assistly.topic(12345)
|
142
150
|
|
143
151
|
# Create a new topic
|
144
|
-
|
152
|
+
Assistly.create_topic("name", :description => "description")
|
145
153
|
|
146
154
|
# Update a topic
|
147
|
-
|
155
|
+
Assistly.update_topic(12345, :subject => "Updated")
|
148
156
|
|
149
157
|
# Delete a topic
|
150
|
-
|
158
|
+
Assistly.delete_topic(12345)
|
151
159
|
|
152
160
|
######
|
153
161
|
# Articles
|
154
162
|
######
|
155
163
|
|
156
164
|
# List articles for a topic
|
157
|
-
|
165
|
+
Assistly.articles(1)
|
158
166
|
|
159
167
|
# Get a specific article
|
160
|
-
|
168
|
+
Assistly.article(12345)
|
161
169
|
|
162
170
|
# Create a new article within a topic
|
163
|
-
|
171
|
+
Assistly.create_article(1, :subject => "API Tips", :main_content => "Tips on using our API")
|
164
172
|
|
165
173
|
# Update an article
|
166
|
-
|
174
|
+
Assistly.update_article(12345, :subject => "Updated API Tips")
|
167
175
|
|
168
176
|
# Delete an article
|
169
|
-
|
177
|
+
Assistly.delete_article(12345)
|
170
178
|
|
171
179
|
######
|
172
180
|
# Macros
|
173
181
|
######
|
174
182
|
|
175
183
|
# List Macros
|
176
|
-
|
184
|
+
Assistly.macros
|
177
185
|
|
178
186
|
# Get a specific macro
|
179
|
-
|
187
|
+
Assistly.macro(12345)
|
180
188
|
|
181
189
|
# Create a new macro
|
182
|
-
|
190
|
+
Assistly.create_macro("name", :labels => "escalated")
|
183
191
|
|
184
192
|
# Update a macro
|
185
|
-
|
193
|
+
Assistly.update_macro(12345, :name => "Updated Name")
|
186
194
|
|
187
195
|
# Delete a macro
|
188
|
-
|
196
|
+
Assistly.delete_macro(12345)
|
189
197
|
|
190
198
|
# Macro Actions
|
191
|
-
|
199
|
+
Assistly.macro_actions(12345)
|
192
200
|
|
193
201
|
# Macro Action
|
194
|
-
|
202
|
+
Assistly.macro_action(12345, "set-case-description")
|
195
203
|
|
196
204
|
# Update Macro Action
|
197
|
-
|
205
|
+
Assistly.update_macro_action(12345, "set-case-description", :value => "New Subject")
|
198
206
|
|
199
207
|
Contributing
|
200
208
|
------------
|
@@ -238,5 +246,5 @@ Submitting a Pull Request
|
|
238
246
|
|
239
247
|
Copyright
|
240
248
|
---------
|
241
|
-
Copyright (c) 2011 Chris Warren
|
249
|
+
Copyright (c) 2011 Chris Warren/[Zencoder](http://zencoder.com)
|
242
250
|
See [LICENSE](https://github.com/zencoder/assistly/blob/master/LICENSE.mkd) for details.
|
data/assistly.gemspec
CHANGED
@@ -13,10 +13,10 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.add_development_dependency('yard', '~> 0.6')
|
14
14
|
s.add_development_dependency('ZenTest', '~> 4.5')
|
15
15
|
s.add_runtime_dependency('hashie', '~> 1.0.0')
|
16
|
-
s.add_runtime_dependency('faraday', '~> 0.6.
|
16
|
+
s.add_runtime_dependency('faraday', '~> 0.6.0')
|
17
17
|
s.add_runtime_dependency('faraday_middleware', '~> 0.6.3')
|
18
18
|
s.add_runtime_dependency('jruby-openssl', '~> 0.7.2') if RUBY_PLATFORM == 'java'
|
19
|
-
s.add_runtime_dependency('multi_json', '~>
|
19
|
+
s.add_runtime_dependency('multi_json', '~> 1.0.3')
|
20
20
|
s.add_runtime_dependency('multi_xml', '~> 0.2.0')
|
21
21
|
s.add_runtime_dependency('rash', '~> 0.3.0')
|
22
22
|
s.add_runtime_dependency('simple_oauth', '~> 0.1.4')
|
data/lib/assistly/connection.rb
CHANGED
@@ -17,8 +17,8 @@ module Assistly
|
|
17
17
|
}
|
18
18
|
|
19
19
|
Faraday.new(options) do |builder|
|
20
|
-
builder.use Faraday::Request::OAuth, authentication if authenticated?
|
21
20
|
builder.use Faraday::Request::MultipartWithFile
|
21
|
+
builder.use Faraday::Request::OAuth, authentication if authenticated?
|
22
22
|
builder.use Faraday::Request::Multipart
|
23
23
|
builder.use Faraday::Request::UrlEncoded
|
24
24
|
builder.use Faraday::Response::RaiseHttp4xx
|
data/lib/assistly/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: assistly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 5
|
10
|
+
version: 0.2.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Chris Warren
|
@@ -15,8 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
19
|
-
default_executable:
|
18
|
+
date: 2011-08-17 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
21
|
name: json
|
@@ -193,12 +192,12 @@ dependencies:
|
|
193
192
|
requirements:
|
194
193
|
- - ~>
|
195
194
|
- !ruby/object:Gem::Version
|
196
|
-
hash:
|
195
|
+
hash: 7
|
197
196
|
segments:
|
198
197
|
- 0
|
199
198
|
- 6
|
200
|
-
-
|
201
|
-
version: 0.6.
|
199
|
+
- 0
|
200
|
+
version: 0.6.0
|
202
201
|
type: :runtime
|
203
202
|
version_requirements: *id012
|
204
203
|
- !ruby/object:Gem::Dependency
|
@@ -225,12 +224,12 @@ dependencies:
|
|
225
224
|
requirements:
|
226
225
|
- - ~>
|
227
226
|
- !ruby/object:Gem::Version
|
228
|
-
hash:
|
227
|
+
hash: 17
|
229
228
|
segments:
|
229
|
+
- 1
|
230
230
|
- 0
|
231
|
-
-
|
232
|
-
|
233
|
-
version: 0.0.5
|
231
|
+
- 3
|
232
|
+
version: 1.0.3
|
234
233
|
type: :runtime
|
235
234
|
version_requirements: *id014
|
236
235
|
- !ruby/object:Gem::Dependency
|
@@ -380,7 +379,6 @@ files:
|
|
380
379
|
- spec/fixtures/user.json
|
381
380
|
- spec/fixtures/users.json
|
382
381
|
- spec/helper.rb
|
383
|
-
has_rdoc: true
|
384
382
|
homepage: https://github.com/zencoder/assistly
|
385
383
|
licenses: []
|
386
384
|
|
@@ -418,7 +416,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
418
416
|
requirements: []
|
419
417
|
|
420
418
|
rubyforge_project: assistly
|
421
|
-
rubygems_version: 1.
|
419
|
+
rubygems_version: 1.8.8
|
422
420
|
signing_key:
|
423
421
|
specification_version: 3
|
424
422
|
summary: Ruby wrapper for the Assistly API, based on the Twitter gem
|