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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 738a6a408575a7686612e21e3c0778fdf51de2ba
4
- data.tar.gz: 7e11351db8cf9f54bb0057b8ac66c8f30203df19
3
+ metadata.gz: 44e4c2435d390eb82ef36aa133863d248aad9301
4
+ data.tar.gz: ed886f71678fa38b3a820b95232a8fd74fcdfa64
5
5
  SHA512:
6
- metadata.gz: d047462c93fa23570309dea0fc10ea4259bf8051b6c4aad4f942c53bbebb38488e572c5b5cade0077a0fd955a9c8c1c2599fdb88be068c49bf3e3f9c677f2f3e
7
- data.tar.gz: aff758204c53103e268e9e0a4a600d727b9db7b02d1278d41aa594fbed6a289c0aaaece502d57d1d0839981dbffadbf114918d34034f9bbc4d451a67afefd3e7
6
+ metadata.gz: 3a6f6b0478a0ffb5ef619ccbcf22cc06dad7e6bbafa9583c188bd212d54ffd312e5d2a44cc12ac5e0bf3c0ff76192d206e37d44e6eda1a464cf8ad9d30ca1da3
7
+ data.tar.gz: ee4eae0eb58a2097c3d8132047275f0c0b0a7de91c0b95163d4d5dc8716f5ea57976d72a6f710af91fe017835e768c0e716d03f14c6bbfbd3e72c466ac1b6301
data/.gitignore CHANGED
@@ -10,3 +10,4 @@ example.rb
10
10
  bin/*.yml
11
11
  .sass-cache
12
12
  config/mongod
13
+ Gemfile.lock
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
- install = ZendeskAPI::AppInstallation.new(client, :app_id => 123)
353
- install.save!
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
- client.apps.installations.create!(:app_id => 123)
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
- install = ZendeskAPI::AppInstallation.new(client, :id => 123)
373
- install.settings = { :title => "My New Name" }
374
- install.save!
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
- install = ZendeskAPI::AppInstallation.new(client, :id => 123)
385
- install.destroy!
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
@@ -1,3 +1,3 @@
1
1
  module ZendeskAPI
2
- VERSION = "1.6.0"
2
+ VERSION = "1.6.1"
3
3
  end
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.0
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-02-19 00:00:00.000000000 Z
12
+ date: 2015-03-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bump