zendesk_api 1.6.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +15 -9
- data/lib/zendesk_api/resources.rb +41 -0
- data/lib/zendesk_api/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: 44e4c2435d390eb82ef36aa133863d248aad9301
|
4
|
+
data.tar.gz: ed886f71678fa38b3a820b95232a8fd74fcdfa64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a6f6b0478a0ffb5ef619ccbcf22cc06dad7e6bbafa9583c188bd212d54ffd312e5d2a44cc12ac5e0bf3c0ff76192d206e37d44e6eda1a464cf8ad9d30ca1da3
|
7
|
+
data.tar.gz: ee4eae0eb58a2097c3d8132047275f0c0b0a7de91c0b95163d4d5dc8716f5ea57976d72a6f710af91fe017835e768c0e716d03f14c6bbfbd3e72c466ac1b6301
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -348,13 +348,19 @@ ZendeskAPI::App.destroy!(client, :id => 123)
|
|
348
348
|
|
349
349
|
#### Installing an App
|
350
350
|
|
351
|
+
**Installation name is required**
|
352
|
+
|
351
353
|
```ruby
|
352
|
-
|
353
|
-
|
354
|
+
installation = ZendeskAPI::AppInstallation.new(client, :app_id => 123, :settings => { :name => 'Name' })
|
355
|
+
installation.save!
|
356
|
+
|
357
|
+
# or
|
358
|
+
|
359
|
+
client.apps.installations.create!(:app_id => 123, :settings => { :name => 'Name' })
|
354
360
|
|
355
|
-
|
361
|
+
# or
|
356
362
|
|
357
|
-
ZendeskAPI::AppInstallation.create!(client, :app_id => 123)
|
363
|
+
ZendeskAPI::AppInstallation.create!(client, :app_id => 123, :settings => { :name => 'Name' })
|
358
364
|
```
|
359
365
|
|
360
366
|
#### List Installations
|
@@ -369,9 +375,9 @@ apps.fetch!
|
|
369
375
|
```ruby
|
370
376
|
client.app.installations.update!(:id => 123, :settings => { :title => "My New Name" })
|
371
377
|
|
372
|
-
|
373
|
-
|
374
|
-
|
378
|
+
installation = ZendeskAPI::AppInstallation.new(client, :id => 123)
|
379
|
+
installation.settings = { :title => "My New Name" }
|
380
|
+
installation.save!
|
375
381
|
|
376
382
|
ZendeskAPI::AppInstallation.update!(client, :id => 123, :settings => { :title => "My New Name" })
|
377
383
|
```
|
@@ -381,8 +387,8 @@ ZendeskAPI::AppInstallation.update!(client, :id => 123, :settings => { :title =>
|
|
381
387
|
```ruby
|
382
388
|
client.app.installations.destroy!(:id => 123)
|
383
389
|
|
384
|
-
|
385
|
-
|
390
|
+
installation = ZendeskAPI::AppInstallation.new(client, :id => 123)
|
391
|
+
installation.destroy!
|
386
392
|
|
387
393
|
ZendeskAPI::AppInstallation.destroy!(client, :id => 123)
|
388
394
|
```
|
@@ -26,6 +26,10 @@ module ZendeskAPI
|
|
26
26
|
class SharingAgreement < ReadResource; end
|
27
27
|
class JobStatus < ReadResource; end
|
28
28
|
|
29
|
+
class Session < ReadResource
|
30
|
+
include Destroy
|
31
|
+
end
|
32
|
+
|
29
33
|
class Tag < DataResource
|
30
34
|
include Update
|
31
35
|
include Destroy
|
@@ -360,6 +364,12 @@ module ZendeskAPI
|
|
360
364
|
alias :save! :save
|
361
365
|
end
|
362
366
|
|
367
|
+
class SatisfactionRating < CreateResource
|
368
|
+
class << self
|
369
|
+
alias :resource_name :singular_resource_name
|
370
|
+
end
|
371
|
+
end
|
372
|
+
|
363
373
|
put :mark_as_spam
|
364
374
|
post :merge
|
365
375
|
|
@@ -615,6 +625,37 @@ module ZendeskAPI
|
|
615
625
|
|
616
626
|
has Organization
|
617
627
|
|
628
|
+
class Session < Resource
|
629
|
+
end
|
630
|
+
|
631
|
+
class CurrentSession < SingularResource
|
632
|
+
class << self
|
633
|
+
def singular_resource_name
|
634
|
+
'session'
|
635
|
+
end
|
636
|
+
|
637
|
+
alias :resource_name :singular_resource_name
|
638
|
+
end
|
639
|
+
end
|
640
|
+
|
641
|
+
has_many Session
|
642
|
+
|
643
|
+
def current_session
|
644
|
+
ZendeskAPI::User::CurrentSession.find(@client, :user_id => 'me')
|
645
|
+
end
|
646
|
+
|
647
|
+
delete :logout
|
648
|
+
|
649
|
+
def clear_sessions!
|
650
|
+
@client.connection.delete(path + '/sessions')
|
651
|
+
end
|
652
|
+
|
653
|
+
def clear_sessions
|
654
|
+
clear_sessions!
|
655
|
+
rescue ZendeskAPI::Error::ClientError
|
656
|
+
false
|
657
|
+
end
|
658
|
+
|
618
659
|
has CustomRole, :inline => true, :include => :roles
|
619
660
|
has Role, :inline => true, :include_key => :name
|
620
661
|
has Ability, :inline => true
|
data/lib/zendesk_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zendesk_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Davidovitz
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-03-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bump
|