Permalink
Browse files

Merge pull request #6 from bobbytables/master

Change all references from Assistly to Desk
  • Loading branch information...
2 parents aa615d8 + ebdc430 commit 26b5715c3a5fcf17f6c1179b19063b0e2700a6f5 Chris Warren committed Feb 29, 2012
View
@@ -1,6 +1,6 @@
The Assistly Ruby Gem
====================
-A Ruby wrapper for the [Assistly API](http://dev.assistly.com/)
+A Ruby wrapper for the [Assistly API](http://dev.desk.com/)
Installation
------------
@@ -42,7 +42,7 @@ Added the ability to create outbound communications over email
What's new in 0.1?
------------------
-This is the first release of the Assistly gem, based on the [Twitter gem](http://github.com/jnunemaker/twitter). Support for most of the [Assistly API](http://dev.assistly.com/docs/api) are handled.
+This is the first release of the Assistly gem, based on the [Twitter gem](http://github.com/jnunemaker/twitter). Support for most of the [Assistly API](http://dev.desk.com/docs/api) are handled.
There is not yet support for Content or Macros.
Help! I'm getting: "Did not recognize your engine specification. Please specify either a symbol or a class. (RuntimeError)"
@@ -56,7 +56,7 @@ Usage Examples
require "assistly"
# All methods require authentication. To get your Assistly OAuth credentials,
- # register an app in the Assistly admin for your account at http://your-domain.assistly.com/admin
+ # register an app in the Assistly admin for your account at http://your-domain.desk.com/admin
Assistly.configure do |config|
config.support_email = "help@example.com"
config.subdomain = YOUR_ASSISTLY_SUBDOMAIN
@@ -125,8 +125,8 @@ Usage Examples
# Assistly's API doesn't support creating outbound communications, so we do this over email with a BCC back to Assistly and customer headers.
# Assistly.support_email must be set to your Assistly email address so that the email can be sent to the account and give the customer someone to respond to.
#
- # Read more at http://support.assistly.com/customer/portal/articles/4180
- # Additional headers can be passed as well http://support.assistly.com/customer/portal/articles/6728
+ # Read more at http://support.desk.com/customer/portal/articles/4180
+ # Additional headers can be passed as well http://support.desk.com/customer/portal/articles/6728
#
# Email is sent using Pony https://github.com/benprew/pony
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")
View
@@ -18,7 +18,7 @@ def initialize(options={})
end
def endpoint
- "https://#{self.subdomain}.assistly.com/api/#{self.version}/"
+ "https://#{self.subdomain}.desk.com/api/#{self.version}/"
end
include Connection
View
@@ -1,8 +1,8 @@
module Assistly
# Wrapper for the Assistly REST API
#
- # @note All methods have been separated into modules and follow the same grouping used in {http://dev.assistly.com/doc the Assistly API Documentation}.
- # @see http://dev.assistly.com/pages/every_developer
+ # @note All methods have been separated into modules and follow the same grouping used in {http://dev.desk.com/doc the Assistly API Documentation}.
+ # @see http://dev.desk.com/pages/every_developer
class Client < API
# Require client method modules after initializing the Client class in
# order to avoid a superclass mismatch error, allowing those modules to be
@@ -12,7 +12,7 @@ module Article
# Assistly.articles(:count => 5, :page => 3)
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/topics/articles
+ # @see http://dev.desk.com/docs/api/topics/articles
def articles(id, *args)
options = args.last.is_a?(Hash) ? args.pop : {}
response = get("topics/#{id}/articles",options)
@@ -28,7 +28,7 @@ def articles(id, *args)
# Assistly.article(12345, :by => "external_id")
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/articles/show
+ # @see http://dev.desk.com/docs/api/articles/show
def article(id, *args)
options = args.last.is_a?(Hash) ? args.pop : {}
response = get("articles/#{id}",options)
@@ -45,7 +45,7 @@ def article(id, *args)
# Assistly.create_article(1, :subject => "API Tips", :main_content => "Tips on using our API")
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/articles/create
+ # @see http://dev.desk.com/docs/api/articles/create
def create_article(topic_id, *args)
options = args.last.is_a?(Hash) ? args.pop : {}
response = post("topics/#{topic_id}/articles",options)
@@ -64,7 +64,7 @@ def create_article(topic_id, *args)
# Assistly.update_article(12345, :subject => "New Subject")
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/articles/update
+ # @see http://dev.desk.com/docs/api/articles/update
def update_article(id, *args)
options = args.last.is_a?(Hash) ? args.pop : {}
response = put("articles/#{id}",options)
@@ -82,7 +82,7 @@ def update_article(id, *args)
# Assistly.update_article(12345, :subject => "New Subject")
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/articles/update
+ # @see http://dev.desk.com/docs/api/articles/update
def delete_article(id)
response = delete("articles/#{id}")
response
@@ -11,7 +11,7 @@ module Case
# Assistly.cases(:since_id => 12345)
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/cases/show
+ # @see http://dev.desk.com/docs/api/cases/show
def cases(*args)
options = args.last.is_a?(Hash) ? args.pop : {}
response = get("cases",options)
@@ -26,7 +26,7 @@ def cases(*args)
# Assistly.case(12345, :by => "external_id")
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/cases/show
+ # @see http://dev.desk.com/docs/api/cases/show
def case(id, *args)
options = args.last.is_a?(Hash) ? args.pop : {}
response = get("cases/#{id}",options)
@@ -40,15 +40,15 @@ def case(id, *args)
# Assistly.update_case(12345, :subject => "New Subject")
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/cases/update
+ # @see http://dev.desk.com/docs/api/cases/update
def update_case(id, *args)
options = args.last.is_a?(Hash) ? args.pop : {}
response = put("cases/#{id}",options)
response.case
end
def case_url(id)
- "https://#{subdomain}.assistly.com/agent/case/#{id}"
+ "https://#{subdomain}.desk.com/agent/case/#{id}"
end
end
end
@@ -10,7 +10,7 @@ module Customer
# Assistly.customers(:since_id => 12345, :count => 5)
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/customers
+ # @see http://dev.desk.com/docs/api/customers
def customers(*args)
options = args.last.is_a?(Hash) ? args.pop : {}
response = get("customers",options)
@@ -24,7 +24,7 @@ def customers(*args)
# Assistly.customer(12345)
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/customers/show
+ # @see http://dev.desk.com/docs/api/customers/show
def customer(id)
response = get("customers/#{id}")
response.customer
@@ -37,7 +37,7 @@ def customer(id)
# Assistly.create_customer(:name => "Chris Warren", :twitter => "cdwarren")
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/customers/create
+ # @see http://dev.desk.com/docs/api/customers/create
def create_customer(*args)
options = args.last.is_a?(Hash) ? args.pop : {}
response = post("customers",options)
@@ -55,7 +55,7 @@ def create_customer(*args)
# Assistly.update_customer(12345, :name => "Christopher Warren")
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/customers/update
+ # @see http://dev.desk.com/docs/api/customers/update
def update_customer(id, *args)
options = args.last.is_a?(Hash) ? args.pop : {}
response = put("customers/#{id}",options)
@@ -73,7 +73,7 @@ def update_customer(id, *args)
# Assistly.create_customer_email(12345, "foo@example.com")
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/customers/emails/create
+ # @see http://dev.desk.com/docs/api/customers/emails/create
def create_customer_email(id, email, *args)
options = args.last.is_a?(Hash) ? args.pop : {}
options.merge!({:email => email})
@@ -93,7 +93,7 @@ def create_customer_email(id, email, *args)
# Assistly.update_customer_email(12345, 12345, :customer_contact_type => "work")
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/customers/emails/update
+ # @see http://dev.desk.com/docs/api/customers/emails/update
def update_customer_email(id, email_id, *args)
options = args.last.is_a?(Hash) ? args.pop : {}
response = put("customers/#{id}/emails/#{email_id}",options)
@@ -11,7 +11,7 @@ module Interaction
# Assistly.interactions(:since_id => 12345, :count => 5)
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/interactions
+ # @see http://dev.desk.com/docs/api/interactions
def interactions(*args)
options = args.last.is_a?(Hash) ? args.pop : {}
response = get("interactions",options)
@@ -38,7 +38,7 @@ def create_interaction(*args)
# @authenticated true
# @rate_limited true
# @return [Array] The requested users.
- # @see http://dev.assistly.com/docs/api/interactions/create
+ # @see http://dev.desk.com/docs/api/interactions/create
# @example Create a new interaction
# Assistly.create_interaction(:interaction_subject => "this is an api test", :customer_email => "foo@example.com")
def create_inbound_interaction(*args)
@@ -57,8 +57,8 @@ def create_inbound_interaction(*args)
# so we'll use send an email to the customer directly that is BCC'd to the support email address
# which will create the ticket
#
- # @see http://support.assistly.com/customer/portal/articles/4180
- # @see http://support.assistly.com/customer/portal/articles/6728
+ # @see http://support.desk.com/customer/portal/articles/4180
+ # @see http://support.desk.com/customer/portal/articles/6728
def create_outbound_interaction(to, subject, body, *args)
raise Assistly::SupportEmailNotSet if support_email.blank?
options = args.last.is_a?(Hash) ? args.pop : {}
@@ -11,7 +11,7 @@ module Macro
# Assistly.macros(:count => 5, :page => 3)
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/macros
+ # @see http://dev.desk.com/docs/api/macros
def macros(*args)
options = args.last.is_a?(Hash) ? args.pop : {}
response = get("macros",options)
@@ -26,7 +26,7 @@ def macros(*args)
# Assistly.macro(12345)
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/macros/show
+ # @see http://dev.desk.com/docs/api/macros/show
def macro(id)
response = get("macros/#{id}")
response.macro
@@ -41,7 +41,7 @@ def macro(id)
# Assistly.create_macro("name")
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/macros/create
+ # @see http://dev.desk.com/docs/api/macros/create
def create_macro(name, *args)
options = args.last.is_a?(Hash) ? args.pop : {}
response = post("macros",options)
@@ -60,7 +60,7 @@ def create_macro(name, *args)
# Assistly.update_macro(12345, :subject => "New Subject")
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/macros/update
+ # @see http://dev.desk.com/docs/api/macros/update
def update_macro(id, *args)
options = args.last.is_a?(Hash) ? args.pop : {}
response = put("macros/#{id}",options)
@@ -78,7 +78,7 @@ def update_macro(id, *args)
# Assistly.update_macro(12345, :subject => "New Subject")
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/macros/update
+ # @see http://dev.desk.com/docs/api/macros/update
def delete_macro(id)
response = delete("macros/#{id}")
response
@@ -97,7 +97,7 @@ def delete_macro(id)
# Assistly.macro_actions(1, :count => 5, :page => 3)
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/macros/actions
+ # @see http://dev.desk.com/docs/api/macros/actions
def macro_actions(id, *args)
options = args.last.is_a?(Hash) ? args.pop : {}
response = get("macros/#{id}/actions",options)
@@ -112,7 +112,7 @@ def macro_actions(id, *args)
# Assistly.macro_action(12345, "set-case-description")
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/macros/actions/show
+ # @see http://dev.desk.com/docs/api/macros/actions/show
def macro_action(id, slug)
response = get("macros/#{id}/actions/#{slug}")
response['action']
@@ -126,7 +126,7 @@ def macro_action(id, slug)
# Assistly.update_macro_action(12345, "set-case-description", :value => "New Subject")
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/macros/actions/update
+ # @see http://dev.desk.com/docs/api/macros/actions/update
def update_macro_action(id, slug, *args)
options = args.last.is_a?(Hash) ? args.pop : {}
response = put("macros/#{id}/actions/#{slug}",options)
@@ -11,7 +11,7 @@ module Topic
# Assistly.topics(:count => 5, :page => 3)
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/topics/show
+ # @see http://dev.desk.com/docs/api/topics/show
def topics(*args)
options = args.last.is_a?(Hash) ? args.pop : {}
response = get("topics",options)
@@ -27,7 +27,7 @@ def topics(*args)
# Assistly.topic(12345, :by => "external_id")
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/topics/show
+ # @see http://dev.desk.com/docs/api/topics/show
def topic(id, *args)
options = args.last.is_a?(Hash) ? args.pop : {}
response = get("topics/#{id}",options)
@@ -43,7 +43,7 @@ def topic(id, *args)
# Assistly.create_topic("name", :description => "description")
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/topics/create
+ # @see http://dev.desk.com/docs/api/topics/create
def create_topic(name, *args)
options = args.last.is_a?(Hash) ? args.pop : {}
response = post("topics",options)
@@ -62,7 +62,7 @@ def create_topic(name, *args)
# Assistly.update_topic(12345, :subject => "New Subject")
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/topics/update
+ # @see http://dev.desk.com/docs/api/topics/update
def update_topic(id, *args)
options = args.last.is_a?(Hash) ? args.pop : {}
response = put("topics/#{id}",options)
@@ -80,7 +80,7 @@ def update_topic(id, *args)
# Assistly.update_topic(12345, :subject => "New Subject")
# @format :json
# @authenticated true
- # @see http://dev.assistly.com/docs/api/topics/update
+ # @see http://dev.desk.com/docs/api/topics/update
def delete_topic(id)
response = delete("topics/#{id}")
response
@@ -12,7 +12,7 @@ module User
# Assistly.user(12345)
# @format :json, :xml
# @authenticated true
- # @see http://dev.assistly.com/docs/api/users/show
+ # @see http://dev.desk.com/docs/api/users/show
def user(id,*args)
options = args.last.is_a?(Hash) ? args.pop : {}
response = get("users/#{id}",options)
@@ -25,7 +25,7 @@ def user(id,*args)
# @authenticated true
# @rate_limited true
# @return [Array] The requested users.
- # @see http://dev.assistly.com/docs/api/users
+ # @see http://dev.desk.com/docs/api/users
# @example Return extended information account users
# Assistly.users
def users(*args)
View
@@ -45,7 +45,7 @@ class NotAcceptable < Error; end
class EnhanceYourCalm < Error
# The number of seconds your application should wait before requesting date from the Search API again
#
- # @see http://dev.Assistly.com/pages/rate-limiting
+ # @see http://dev.desk.com/pages/rate-limiting
def retry_after
@http_headers.values_at('retry-after', 'Retry-After').detect {|value| value }.to_i
end
@@ -89,7 +89,7 @@
context "generating a case url" do
it "should make a correct url for the case" do
- @client.case_url(123).should == "https://example.assistly.com/agent/case/123"
+ @client.case_url(123).should == "https://example.desk.com/agent/case/123"
end
end
View
@@ -55,7 +55,7 @@
end
it "should change the endpoint" do
- Assistly.endpoint.should == "https://zencoder.assistly.com/api/#{Assistly::Configuration::DEFAULT_VERSION}/"
+ Assistly.endpoint.should == "https://zencoder.desk.com/api/#{Assistly::Configuration::DEFAULT_VERSION}/"
end
end
@@ -82,7 +82,7 @@
end
it "should change the endpoint" do
- Assistly.endpoint.should == "https://#{Assistly::Configuration::DEFAULT_SUBDOMAIN}.assistly.com/api/v4/"
+ Assistly.endpoint.should == "https://#{Assistly::Configuration::DEFAULT_SUBDOMAIN}.desk.com/api/v4/"
end
end
Oops, something went wrong.

0 comments on commit 26b5715

Please sign in to comment.