zohoho 0.1.2 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -4,13 +4,22 @@ source "http://rubygems.org"
4
4
  # gem "activesupport", ">= 2.3.5"
5
5
  gem 'httparty'
6
6
  gem 'json'
7
- gem 'xml-simple'
7
+ gem 'xml-simple'
8
+ gem 'nokogiri'
8
9
 
9
10
  # Add dependencies to develop your gem here.
10
11
  # Include everything needed to run rake, tests, features, etc.
11
- group :development do
12
+ group :development, :test do
13
+ gem 'rake'
14
+ gem 'rdoc'
12
15
  gem "rspec", ">= 0"
13
16
  gem "bundler", "~> 1.0.0"
14
17
  gem "jeweler", "~> 1.6.0"
15
18
  gem "rcov", ">= 0"
16
19
  end
20
+
21
+ group :development, :test do
22
+ gem 'fakeweb'
23
+ gem 'vcr'
24
+ gem 'mocha'
25
+ end
@@ -3,34 +3,43 @@ GEM
3
3
  specs:
4
4
  crack (0.1.8)
5
5
  diff-lcs (1.1.2)
6
+ fakeweb (1.3.0)
6
7
  git (1.2.5)
7
- httparty (0.7.7)
8
+ httparty (0.7.8)
8
9
  crack (= 0.1.8)
9
- jeweler (1.6.0)
10
- bundler (~> 1.0.0)
10
+ jeweler (1.6.4)
11
+ bundler (~> 1.0)
11
12
  git (>= 1.2.5)
12
13
  rake
13
- json (1.5.1)
14
- rake (0.8.7)
14
+ json (1.5.3)
15
+ mocha (0.9.12)
16
+ rake (0.9.2)
15
17
  rcov (0.9.9)
18
+ rdoc (3.8)
16
19
  rspec (2.6.0)
17
20
  rspec-core (~> 2.6.0)
18
21
  rspec-expectations (~> 2.6.0)
19
22
  rspec-mocks (~> 2.6.0)
20
- rspec-core (2.6.0)
23
+ rspec-core (2.6.4)
21
24
  rspec-expectations (2.6.0)
22
25
  diff-lcs (~> 1.1.2)
23
26
  rspec-mocks (2.6.0)
24
- xml-simple (1.0.15)
27
+ vcr (1.10.3)
28
+ xml-simple (1.1.0)
25
29
 
26
30
  PLATFORMS
27
31
  ruby
28
32
 
29
33
  DEPENDENCIES
30
34
  bundler (~> 1.0.0)
35
+ fakeweb
31
36
  httparty
32
37
  jeweler (~> 1.6.0)
33
38
  json
39
+ mocha
40
+ rake
34
41
  rcov
42
+ rdoc
35
43
  rspec
44
+ vcr
36
45
  xml-simple
data/Rakefile CHANGED
@@ -42,8 +42,8 @@ end
42
42
 
43
43
  task :default => :test
44
44
 
45
- require 'rake/rdoctask'
46
- Rake::RDocTask.new do |rdoc|
45
+ require 'rdoc/task'
46
+ RDoc::Task.new do |rdoc|
47
47
  version = File.exist?('VERSION') ? File.read('VERSION') : ""
48
48
 
49
49
  rdoc.rdoc_dir = 'rdoc'
@@ -1,2 +1,3 @@
1
1
  require 'zohoho/connection'
2
- require 'zohoho/crm'
2
+ require 'zohoho/crm'
3
+ require 'zohoho/recruit'
@@ -10,7 +10,7 @@ module Zohoho
10
10
  end
11
11
 
12
12
  def ticket_url
13
- "https://accounts.zoho.com/login?servicename=Zoho#{@service_name}&FROM_AGENT=true&LOGIN_ID=#{@username}&PASSWORD=#{@password}"
13
+ "https://accounts.zoho.com/login?servicename=#{@service_name}&FROM_AGENT=true&LOGIN_ID=#{@username}&PASSWORD=#{@password}"
14
14
  end
15
15
 
16
16
  def api_key
@@ -22,10 +22,7 @@ module Zohoho
22
22
  end
23
23
 
24
24
  def ticket
25
- return @ticket if @ticket
26
- url = ticket_url
27
- ticket_info = self.class.post(url).parsed_response
28
- ticket_info.match(/\sTICKET=(.*)\s/)[1]
25
+ @ticket = Regexp.last_match(1) if self.class.post(ticket_url).parsed_response =~ /TICKET=(\w+)/
29
26
  end
30
27
 
31
28
  def call(entry, api_method, query = {}, http_method = :get)
@@ -7,7 +7,7 @@ module Zohoho
7
7
  include HTTParty
8
8
 
9
9
  def initialize(username, password, apikey)
10
- @conn = Zohoho::Connection.new 'CRM', username, password, apikey
10
+ @conn = Zohoho::Connection.new 'ZohoCRM', username, password, apikey
11
11
  end
12
12
 
13
13
  def auth_url
@@ -0,0 +1,26 @@
1
+ module Zohoho
2
+ require 'httparty'
3
+ require 'nokogiri'
4
+ require 'json'
5
+
6
+ class Recruit
7
+ include HTTParty
8
+
9
+ def initialize(username, password, apikey, type = 'json')
10
+ @type = type
11
+ @conn = Zohoho::Connection.new 'zohopeople', username, password, apikey
12
+ end
13
+
14
+ def auth_url
15
+ @conn.ticket_url
16
+ end
17
+
18
+ def candidates_url(type = @type)
19
+ "http://recruit.zoho.com/ats/private/#{type}/Candidates/getRecords?apikey=#{@conn.api_key}&ticket=#{@conn.ticket}"
20
+ end
21
+
22
+ def get_candidates(conditions = {:toIndex => 200})
23
+ @type == 'json' ? JSON.parse(self.class.get(candidates_url, conditions)) : Nokogiri::XML.parse(self.class.get(candidates_url, conditions))
24
+ end
25
+ end
26
+ end
@@ -6,7 +6,7 @@ describe "Zohoho::Connection" do
6
6
  @username = 'kentonwhite'
7
7
  @password = 'mopa3lwb'
8
8
  @apikey = 'L-PvsrDNn9EIW2phA3vzp9YuL5REECogkQaMGWeIdlI$'
9
- @conn = Zohoho::Connection.new('CRM', @username, @password, @apikey)
9
+ @conn = Zohoho::Connection.new('ZohoCRM', @username, @password, @apikey)
10
10
  vcr_config 'connection'
11
11
  end
12
12
  it "should create the proper ticket url" do
@@ -1,23 +1,23 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
4
  method: :post
5
5
  uri: https://accounts.zoho.com:443/login?servicename=ZohoCRM&FROM_AGENT=true&LOGIN_ID=kentonwhite&PASSWORD=mopa3lwb
6
- body:
7
- headers:
8
- response: !ruby/struct:VCR::Response
9
- status: !ruby/struct:VCR::ResponseStatus
6
+ body:
7
+ headers:
8
+ response: !ruby/struct:VCR::Response
9
+ status: !ruby/struct:VCR::ResponseStatus
10
10
  code: 200
11
11
  message: OK
12
- headers:
13
- set-cookie:
12
+ headers:
13
+ set-cookie:
14
14
  - iamcsr=d6a9b521-243e-44c7-a074-ce8a70318c73; Path=/
15
15
  - JSESSIONID=9318133BF702B481FE84388BA6E4AA66; Path=/; Secure
16
- content-type:
16
+ content-type:
17
17
  - text/html;charset=UTF-8
18
- date:
18
+ date:
19
19
  - Fri, 20 May 2011 15:40:52 GMT
20
- server:
20
+ server:
21
21
  - ZWS
22
22
  body: |
23
23
  #
@@ -29,126 +29,126 @@
29
29
  RESULT=TRUE
30
30
 
31
31
  http_version: "1.1"
32
- - !ruby/struct:VCR::HTTPInteraction
33
- request: !ruby/struct:VCR::Request
32
+ - !ruby/struct:VCR::HTTPInteraction
33
+ request: !ruby/struct:VCR::Request
34
34
  method: :get
35
35
  uri: https://crm.zoho.com:443/crm/private/json/Contacts/getRecords?apikey=&ticket=89433f747b864d4013ee6ba6cc9eda79
36
- body:
37
- headers:
38
- response: !ruby/struct:VCR::Response
39
- status: !ruby/struct:VCR::ResponseStatus
36
+ body:
37
+ headers:
38
+ response: !ruby/struct:VCR::Response
39
+ status: !ruby/struct:VCR::ResponseStatus
40
40
  code: 200
41
41
  message: OK
42
- headers:
43
- set-cookie:
42
+ headers:
43
+ set-cookie:
44
44
  - crmcsr=52a18e42-2fbf-40e6-80d8-cc2ea85d60d7; Path=/
45
- pragma:
45
+ pragma:
46
46
  - no-cache
47
- cache-control:
47
+ cache-control:
48
48
  - no-cache
49
- expires:
49
+ expires:
50
50
  - Thu, 01 Jan 1970 00:00:00 GMT
51
- content-type:
51
+ content-type:
52
52
  - text/plain;charset=utf-8
53
- content-length:
53
+ content-length:
54
54
  - "3295"
55
- date:
55
+ date:
56
56
  - Fri, 20 May 2011 15:44:55 GMT
57
- server:
57
+ server:
58
58
  - "-"
59
59
  body: |
60
60
  {"response":{"result":{"Contacts":{"row":[{"no":"1","FL":[{"content":"384023000000051007","val":"CONTACTID"},{"content":"384023000000042003","val":"SMOWNERID"},{"content":"kentonwhite","val":"Contact Owner"},{"content":"Girih","val":"Last Name"},{"content":"384023000000042003","val":"SMCREATORID"},{"content":"kentonwhite","val":"Created By"},{"content":"384023000000042003","val":"MODIFIEDBY"},{"content":"kentonwhite","val":"Modified By"},{"content":"2011-05-12 14:25:21","val":"Created Time"},{"content":"2011-05-12 14:25:21","val":"Modified Time"},{"content":"false","val":"Email Opt Out"},{"content":"false","val":"Add to QuickBooks"}]},{"no":"2","FL":[{"content":"384023000000051005","val":"CONTACTID"},{"content":"384023000000042003","val":"SMOWNERID"},{"content":"kentonwhite","val":"Contact Owner"},{"content":"George","val":"First Name"},{"content":"Clooney","val":"Last Name"},{"content":"384023000000042003","val":"SMCREATORID"},{"content":"kentonwhite","val":"Created By"},{"content":"384023000000042003","val":"MODIFIEDBY"},{"content":"kentonwhite","val":"Modified By"},{"content":"2011-05-12 14:03:44","val":"Created Time"},{"content":"2011-05-12 14:03:44","val":"Modified Time"},{"content":"false","val":"Email Opt Out"},{"content":"false","val":"Add to QuickBooks"}]},{"no":"3","FL":[{"content":"384023000000048001","val":"CONTACTID"},{"content":"384023000000042003","val":"SMOWNERID"},{"content":"kentonwhite","val":"Contact Owner"},{"content":"Vivek","val":"First Name"},{"content":"Sarin","val":"Last Name"},{"content":"384023000000042003","val":"SMCREATORID"},{"content":"kentonwhite","val":"Created By"},{"content":"384023000000042003","val":"MODIFIEDBY"},{"content":"kentonwhite","val":"Modified By"},{"content":"2011-05-11 20:53:07","val":"Created Time"},{"content":"2011-05-11 20:53:07","val":"Modified Time"},{"content":"false","val":"Email Opt Out"},{"content":"false","val":"Add to QuickBooks"}]},{"no":"4","FL":[{"content":"384023000000047003","val":"CONTACTID"},{"content":"384023000000042003","val":"SMOWNERID"},{"content":"kentonwhite","val":"Contact Owner"},{"content":"John","val":"First Name"},{"content":"White","val":"Last Name"},{"content":"384023000000042003","val":"SMCREATORID"},{"content":"kentonwhite","val":"Created By"},{"content":"384023000000042003","val":"MODIFIEDBY"},{"content":"kentonwhite","val":"Modified By"},{"content":"2011-05-11 13:48:39","val":"Created Time"},{"content":"2011-05-11 13:48:39","val":"Modified Time"},{"content":"false","val":"Email Opt Out"},{"content":"false","val":"Add to QuickBooks"}]},{"no":"5","FL":[{"content":"384023000000045001","val":"CONTACTID"},{"content":"384023000000042003","val":"SMOWNERID"},{"content":"kentonwhite","val":"Contact Owner"},{"content":"Kenton","val":"First Name"},{"content":"White","val":"Last Name"},{"content":"384023000000042003","val":"SMCREATORID"},{"content":"kentonwhite","val":"Created By"},{"content":"384023000000042003","val":"MODIFIEDBY"},{"content":"kentonwhite","val":"Modified By"},{"content":"2011-05-10 20:22:25","val":"Created Time"},{"content":"2011-05-10 20:22:25","val":"Modified Time"},{"content":"false","val":"Email Opt Out"},{"content":"Dr.","val":"Salutation"},{"content":"false","val":"Add to QuickBooks"}]}]}},"uri":"/crm/private/json/Contacts/getRecords"}}
61
61
 
62
62
  http_version: "1.1"
63
- - !ruby/struct:VCR::HTTPInteraction
64
- request: !ruby/struct:VCR::Request
63
+ - !ruby/struct:VCR::HTTPInteraction
64
+ request: !ruby/struct:VCR::Request
65
65
  method: :get
66
66
  uri: https://CRM.zoho.com:443/CRM/private/json/Contacts/getRecords?apikey=&ticket=89433f747b864d4013ee6ba6cc9eda79
67
- body:
68
- headers:
69
- response: !ruby/struct:VCR::Response
70
- status: !ruby/struct:VCR::ResponseStatus
67
+ body:
68
+ headers:
69
+ response: !ruby/struct:VCR::Response
70
+ status: !ruby/struct:VCR::ResponseStatus
71
71
  code: 302
72
72
  message: Found
73
- headers:
74
- set-cookie:
73
+ headers:
74
+ set-cookie:
75
75
  - JSESSIONID=0BEF22A4AEE35416C4922DA5068EBC11; Path=/
76
76
  - crmze=0; Path=/
77
- location:
77
+ location:
78
78
  - https://CRM.zoho.com/crm/IAMSecurityError.do?isload=true
79
- content-type:
79
+ content-type:
80
80
  - text/html;charset=UTF-8
81
- date:
81
+ date:
82
82
  - Fri, 20 May 2011 15:53:44 GMT
83
- server:
83
+ server:
84
84
  - "-"
85
- p3p:
85
+ p3p:
86
86
  - CP="CAO PSA OUR"
87
- transfer-encoding:
87
+ transfer-encoding:
88
88
  - chunked
89
- body:
89
+ body:
90
90
  http_version: "1.1"
91
- - !ruby/struct:VCR::HTTPInteraction
92
- request: !ruby/struct:VCR::Request
91
+ - !ruby/struct:VCR::HTTPInteraction
92
+ request: !ruby/struct:VCR::Request
93
93
  method: :get
94
94
  uri: https://CRM.zoho.com:443/crm/IAMSecurityError.do?isload=true
95
- body:
96
- headers:
97
- cookie:
95
+ body:
96
+ headers:
97
+ cookie:
98
98
  - JSESSIONID=0BEF22A4AEE35416C4922DA5068EBC11; Path=/
99
- response: !ruby/struct:VCR::Response
100
- status: !ruby/struct:VCR::ResponseStatus
99
+ response: !ruby/struct:VCR::Response
100
+ status: !ruby/struct:VCR::ResponseStatus
101
101
  code: 302
102
102
  message: Found
103
- headers:
104
- set-cookie:
103
+ headers:
104
+ set-cookie:
105
105
  - crmcsr=56c20bfe-6385-465a-9a74-9af48dc77c1d; Path=/
106
106
  - crmze=0; Path=/
107
- pragma:
107
+ pragma:
108
108
  - no-cache
109
- cache-control:
109
+ cache-control:
110
110
  - no-cache
111
- expires:
111
+ expires:
112
112
  - Thu, 01 Jan 1970 00:00:00 GMT
113
- location:
113
+ location:
114
114
  - https://CRM.zoho.com/crm/login.sas?serviceurl=%2Fcrm%2FIAMSecurityError.do%3Fisload%3Dtrue
115
- content-length:
115
+ content-length:
116
116
  - "0"
117
- date:
117
+ date:
118
118
  - Fri, 20 May 2011 15:53:45 GMT
119
- server:
119
+ server:
120
120
  - "-"
121
- p3p:
121
+ p3p:
122
122
  - CP="CAO PSA OUR"
123
- body:
123
+ body:
124
124
  http_version: "1.1"
125
- - !ruby/struct:VCR::HTTPInteraction
126
- request: !ruby/struct:VCR::Request
125
+ - !ruby/struct:VCR::HTTPInteraction
126
+ request: !ruby/struct:VCR::Request
127
127
  method: :get
128
128
  uri: https://CRM.zoho.com:443/crm/login.sas?serviceurl=%2Fcrm%2FIAMSecurityError.do%3Fisload%3Dtrue
129
- body:
130
- headers:
131
- cookie:
129
+ body:
130
+ headers:
131
+ cookie:
132
132
  - JSESSIONID=0BEF22A4AEE35416C4922DA5068EBC11; Path=/; crmcsr=56c20bfe-6385-465a-9a74-9af48dc77c1d
133
- response: !ruby/struct:VCR::Response
134
- status: !ruby/struct:VCR::ResponseStatus
133
+ response: !ruby/struct:VCR::Response
134
+ status: !ruby/struct:VCR::ResponseStatus
135
135
  code: 301
136
136
  message: Moved Permanently
137
- headers:
138
- set-cookie:
137
+ headers:
138
+ set-cookie:
139
139
  - JSESSIONID=7A6BA37ED8E1DA29B78E16FD31592DAC; Path=/crm
140
140
  - crmze=1; Path=/
141
- location:
141
+ location:
142
142
  - https://www.zoho.com/crm/index.html
143
- content-type:
143
+ content-type:
144
144
  - text/html;charset=UTF-8
145
- date:
145
+ date:
146
146
  - Fri, 20 May 2011 15:53:45 GMT
147
- server:
147
+ server:
148
148
  - "-"
149
- p3p:
149
+ p3p:
150
150
  - CP="CAO PSA OUR"
151
- transfer-encoding:
151
+ transfer-encoding:
152
152
  - chunked
153
153
  body: "\n\n\n\n\n\
154
154
  <!doctype html><html><head><title>On-Demand CRM Software-as-a-Service(SaaS),Free CRM,Customer Relationship Management - Zoho CRM</title><meta http-equiv=\"Content-type\" content=\"text/html;charset=UTF-8\" /><meta name=\"keywords\" content=\"CRM,On-Demand CRM Software-as-a-Service(SaaS),Free CRM,Web-based CRM,Hosted CRM,Customer Relationship Management,CRM API,Sales force automation,Sales Tracking Software,Email Marketing,CRM Plug-in for Microsoft Office,CRM Plug-in for Microsoft Outlook\" /><meta name=\"description\" content=\"On-demand CRM (Customer Relationship Management) services for managing organization-wide sales, marketing, customer support, and orders.\" /><meta name=\"verify-v1\" content=\"mOR4CRGAgTyZTYxaOWwZYvIBJdfnbAtIWy47rz7wzYs=\" ><meta name=\"google-site-verification\" content=\"XzzFQdjeXm1I1dfFTFHVoWA8ZZagAL0nalo2NjuNlMA\" /><link rel=\"SHORTCUT ICON\" href=\"/crm/images/favicon.ico\" /><style type=\"text/css\">body, td, div, li, p, h2, h3, h4{font-family:Arial, Helvetica, sans-serif; margin:0px; padding:0px; font-size:12px;}.tlink{ padding:0px 10px; font-size:13px; color:#ffffff; text-decoration:none;}.tollfree{ font-size:17px; font-weight:bold; color:#f7f7f7; padding:0px 0px 0px 10px;}\n\
@@ -312,34 +312,34 @@
312
312
  } catch(err) {}\n\
313
313
  </script>\n"
314
314
  http_version: "1.1"
315
- - !ruby/struct:VCR::HTTPInteraction
316
- request: !ruby/struct:VCR::Request
315
+ - !ruby/struct:VCR::HTTPInteraction
316
+ request: !ruby/struct:VCR::Request
317
317
  method: :get
318
318
  uri: https://www.zoho.com:443/crm/index.html
319
- body:
320
- headers:
321
- cookie:
319
+ body:
320
+ headers:
321
+ cookie:
322
322
  - JSESSIONID=7A6BA37ED8E1DA29B78E16FD31592DAC; Path=/; crmcsr=56c20bfe-6385-465a-9a74-9af48dc77c1d
323
- response: !ruby/struct:VCR::Response
324
- status: !ruby/struct:VCR::ResponseStatus
323
+ response: !ruby/struct:VCR::Response
324
+ status: !ruby/struct:VCR::ResponseStatus
325
325
  code: 301
326
326
  message: Moved Permanently
327
- headers:
328
- date:
327
+ headers:
328
+ date:
329
329
  - Fri, 20 May 2011 15:53:46 GMT
330
- server:
330
+ server:
331
331
  - Apache
332
- location:
332
+ location:
333
333
  - https://www.zoho.com/crm/
334
- cache-control:
334
+ cache-control:
335
335
  - max-age=426934
336
- expires:
336
+ expires:
337
337
  - Wed, 25 May 2011 14:29:21 GMT
338
- vary:
338
+ vary:
339
339
  - Accept-Encoding
340
- content-length:
340
+ content-length:
341
341
  - "233"
342
- content-type:
342
+ content-type:
343
343
  - text/html; charset=iso-8859-1
344
344
  body: |
345
345
  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
@@ -351,38 +351,38 @@
351
351
  </body></html>
352
352
 
353
353
  http_version: "1.1"
354
- - !ruby/struct:VCR::HTTPInteraction
355
- request: !ruby/struct:VCR::Request
354
+ - !ruby/struct:VCR::HTTPInteraction
355
+ request: !ruby/struct:VCR::Request
356
356
  method: :get
357
357
  uri: https://www.zoho.com:443/crm/
358
- body:
359
- headers:
360
- cookie:
358
+ body:
359
+ headers:
360
+ cookie:
361
361
  - JSESSIONID=7A6BA37ED8E1DA29B78E16FD31592DAC; Path=/; crmcsr=56c20bfe-6385-465a-9a74-9af48dc77c1d
362
- response: !ruby/struct:VCR::Response
363
- status: !ruby/struct:VCR::ResponseStatus
362
+ response: !ruby/struct:VCR::Response
363
+ status: !ruby/struct:VCR::ResponseStatus
364
364
  code: 200
365
365
  message: OK
366
- headers:
367
- date:
366
+ headers:
367
+ date:
368
368
  - Fri, 20 May 2011 15:53:47 GMT
369
- server:
369
+ server:
370
370
  - Apache
371
- last-modified:
371
+ last-modified:
372
372
  - Wed, 18 May 2011 14:29:21 GMT
373
- etag:
373
+ etag:
374
374
  - "\"7651-4a38db6e4b240\""
375
- accept-ranges:
375
+ accept-ranges:
376
376
  - bytes
377
- content-length:
377
+ content-length:
378
378
  - "30289"
379
- cache-control:
379
+ cache-control:
380
380
  - max-age=426933
381
- expires:
381
+ expires:
382
382
  - Wed, 25 May 2011 14:29:21 GMT
383
- vary:
383
+ vary:
384
384
  - Accept-Encoding
385
- content-type:
385
+ content-type:
386
386
  - text/html; charset=UTF-8
387
387
  body: |-
388
388
  <!doctype html>
@@ -539,7 +539,7 @@
539
539
  width: 215px;
540
540
  }
541
541
  .scb p {
542
-
542
+
543
543
  float: left;
544
544
  line-height: 26px;
545
545
  margin: 0;
@@ -633,7 +633,7 @@
633
633
  padding-bottom: 6px;
634
634
  }
635
635
  .cs ul {
636
-
636
+
637
637
  padding: 15px 5px 0;
638
638
  }
639
639
  .cs li {
@@ -1023,7 +1023,7 @@
1023
1023
  margin:25px 5px
1024
1024
  }
1025
1025
  </style>
1026
-
1026
+
1027
1027
  </head>
1028
1028
  <body>
1029
1029
  <iframe height=0 width=0 frameborder=0 scrolling=no src="https://accounts.zoho.com/login?servicename=ZohoCRM&serviceurl=/crm/ShowHomePage.do"></iframe>
@@ -1070,7 +1070,7 @@
1070
1070
  </ul>
1071
1071
  <p><a href="/crm/lp/signup.html" title="Sign Up Now!" onClick="_gaq.push(['_trackEvent', 'crm1', 'slideraction', 'saf']);">Sign Up Now!</a></p>
1072
1072
  </div>
1073
- </div>
1073
+ </div>
1074
1074
  <div class="panel">
1075
1075
  <div class="is"> <img src="/crm/images/zohocrm-product-customization.png" width="610" height="347" title="Product Customization" alt="Product Customization" /> </div>
1076
1076
  <div class="cs">
@@ -1116,7 +1116,7 @@
1116
1116
  <li class="tab4"><a title="Integration with Google Apps" href="#4">Collaboration</a></li>
1117
1117
  </ul>
1118
1118
  </div>
1119
-
1119
+
1120
1120
  </div>
1121
1121
  <p class="d">Zoho CRM offers you a complete customer relationship life-cycle management software for managing Sales, Marketing, Customer Support, and Inventory activities in a single system. It is simple to use, yet packed with features for automation, customization, integration, and collaboration that allow you to grow your business and have a 360-degree view of your customer interactions.</p>
1122
1122
  </div>
@@ -1303,7 +1303,7 @@
1303
1303
  </ul>
1304
1304
  </div>
1305
1305
  </div>
1306
- </div>
1306
+ </div>
1307
1307
  <div class=cop>
1308
1308
  <p>&copy; 2011, ZOHO Corp.<span> Affordable On-demand, Web-based <a href="/crm/">Customer Relationship Management (CRM) Software</a></span><br>
1309
1309
  ZOHO Corporation, 4900 Hopyard Rd, Suite 310, Pleasanton, CA 94588, USA | Support: +1 888 204-3539 | Sales: +1 888-900-9646<br>
@@ -1327,3 +1327,58 @@
1327
1327
  </body>
1328
1328
  </html>
1329
1329
  http_version: "1.1"
1330
+ - !ruby/struct:VCR::HTTPInteraction
1331
+ request: !ruby/struct:VCR::Request
1332
+ method: :post
1333
+ uri: https://accounts.zoho.com:443/login?servicename=CRM&FROM_AGENT=true&LOGIN_ID=kentonwhite&PASSWORD=mopa3lwb
1334
+ body:
1335
+ headers:
1336
+ response: !ruby/struct:VCR::Response
1337
+ status: !ruby/struct:VCR::ResponseStatus
1338
+ code: 200
1339
+ message: OK
1340
+ headers:
1341
+ set-cookie:
1342
+ - iamcsr=2405ea38-74f3-47ea-a86b-606e774a1a27; Path=/
1343
+ - JSESSIONID=6DA68292F17626FA60F2AC6F29D2822C; Path=/; Secure
1344
+ content-type:
1345
+ - text/html;charset=UTF-8
1346
+ content-length:
1347
+ - "23"
1348
+ date:
1349
+ - Mon, 25 Jul 2011 00:14:05 GMT
1350
+ server:
1351
+ - ZWS
1352
+ body: |
1353
+ CRM not known to IAM.
1354
+
1355
+ http_version: "1.1"
1356
+ - !ruby/struct:VCR::HTTPInteraction
1357
+ request: !ruby/struct:VCR::Request
1358
+ method: :get
1359
+ uri: https://crm.zoho.com:443/crm/private/json/Contacts/getRecords?apikey=L-PvsrDNn9EIW2phA3vzp9YuL5REECogkQaMGWeIdlI%24&ticket=
1360
+ body:
1361
+ headers:
1362
+ response: !ruby/struct:VCR::Response
1363
+ status: !ruby/struct:VCR::ResponseStatus
1364
+ code: 500
1365
+ message: Internal Server Error
1366
+ headers:
1367
+ set-cookie:
1368
+ - JSESSIONID=1F6D7F6E3E9D1862ADF2DC8194D0CB39; Path=/crm
1369
+ - crmze=0; Path=/
1370
+ content-type:
1371
+ - text/html;charset=UTF-8
1372
+ date:
1373
+ - Mon, 25 Jul 2011 00:14:07 GMT
1374
+ server:
1375
+ - "-"
1376
+ p3p:
1377
+ - CP="CAO PSA OUR"
1378
+ transfer-encoding:
1379
+ - chunked
1380
+ strict-transport-security:
1381
+ - max-age=604800
1382
+ body: "\n\n \n\n\n\
1383
+ {\"response\":{\"error\":{\"message\":\"Invalid Ticket Id\",\"code\":\"4834\"}}}\n"
1384
+ http_version: "1.1"
@@ -1,23 +1,23 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
4
  method: :post
5
5
  uri: https://accounts.zoho.com:443/login?servicename=ZohoCRM&FROM_AGENT=true&LOGIN_ID=kentonwhite&PASSWORD=mopa3lwb
6
- body:
7
- headers:
8
- response: !ruby/struct:VCR::Response
9
- status: !ruby/struct:VCR::ResponseStatus
6
+ body:
7
+ headers:
8
+ response: !ruby/struct:VCR::Response
9
+ status: !ruby/struct:VCR::ResponseStatus
10
10
  code: 200
11
11
  message: OK
12
- headers:
13
- set-cookie:
12
+ headers:
13
+ set-cookie:
14
14
  - iamcsr=7c8861a5-4f9e-4910-93d8-7351fbe53135; Path=/
15
15
  - JSESSIONID=92F8253FD02CDD40404BAD9B06510277; Path=/; Secure
16
- content-type:
16
+ content-type:
17
17
  - text/html;charset=UTF-8
18
- date:
18
+ date:
19
19
  - Fri, 20 May 2011 15:27:29 GMT
20
- server:
20
+ server:
21
21
  - ZWS
22
22
  body: |
23
23
  #
@@ -29,3 +29,29 @@
29
29
  RESULT=TRUE
30
30
 
31
31
  http_version: "1.1"
32
+ - !ruby/struct:VCR::HTTPInteraction
33
+ request: !ruby/struct:VCR::Request
34
+ method: :post
35
+ uri: https://accounts.zoho.com:443/login?servicename=CRM&FROM_AGENT=true&LOGIN_ID=kentonwhite&PASSWORD=mopa3lwb
36
+ body:
37
+ headers:
38
+ response: !ruby/struct:VCR::Response
39
+ status: !ruby/struct:VCR::ResponseStatus
40
+ code: 200
41
+ message: OK
42
+ headers:
43
+ set-cookie:
44
+ - iamcsr=9ade9407-b2f3-4875-a295-38b6066c4697; Path=/
45
+ - JSESSIONID=3F1851AF4857965C6FB3EB768A8D7650; Path=/; Secure
46
+ content-type:
47
+ - text/html;charset=UTF-8
48
+ content-length:
49
+ - "23"
50
+ date:
51
+ - Mon, 25 Jul 2011 00:14:04 GMT
52
+ server:
53
+ - ZWS
54
+ body: |
55
+ CRM not known to IAM.
56
+
57
+ http_version: "1.1"
@@ -5,10 +5,10 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{zohoho}
8
- s.version = "0.1.2"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["KentonWhite"]
11
+ s.authors = ["KentonWhite", "Elland"]
12
12
  s.date = %q{2011-05-24}
13
13
  s.description = %q{Simple interface to zoho api}
14
14
  s.email = %q{jkentonwhite@gmail.com}
@@ -29,6 +29,7 @@ Gem::Specification.new do |s|
29
29
  "lib/zohoho.rb",
30
30
  "lib/zohoho/connection.rb",
31
31
  "lib/zohoho/crm.rb",
32
+ "lib/zohoho/recruit.rb",
32
33
  "spec/connection_spec.rb",
33
34
  "spec/crm_spec.rb",
34
35
  "spec/fixtures/vcr_cassettes/connection/call.yml",
metadata CHANGED
@@ -2,10 +2,11 @@
2
2
  name: zohoho
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.2
5
+ version: 0.2.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - KentonWhite
9
+ - Elland
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
@@ -112,6 +113,7 @@ files:
112
113
  - lib/zohoho.rb
113
114
  - lib/zohoho/connection.rb
114
115
  - lib/zohoho/crm.rb
116
+ - lib/zohoho/recruit.rb
115
117
  - spec/connection_spec.rb
116
118
  - spec/crm_spec.rb
117
119
  - spec/fixtures/vcr_cassettes/connection/call.yml