zohoho 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,31 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
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
10
+ code: 200
11
+ message: OK
12
+ headers:
13
+ set-cookie:
14
+ - iamcsr=7c8861a5-4f9e-4910-93d8-7351fbe53135; Path=/
15
+ - JSESSIONID=92F8253FD02CDD40404BAD9B06510277; Path=/; Secure
16
+ content-type:
17
+ - text/html;charset=UTF-8
18
+ date:
19
+ - Fri, 20 May 2011 15:27:29 GMT
20
+ server:
21
+ - ZWS
22
+ body: |
23
+ #
24
+ #Fri May 20 08:27:30 PDT 2011
25
+ GETUSERNAME=null
26
+ WARNING=null
27
+ PASS_EXPIRY=-1
28
+ TICKET=c1eea66055af5d42b8b1ab0d1171c9c4
29
+ RESULT=TRUE
30
+
31
+ http_version: "1.1"
@@ -0,0 +1,65 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
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
10
+ code: 200
11
+ message: OK
12
+ headers:
13
+ set-cookie:
14
+ - iamcsr=ba654187-f216-4c01-bba6-b5eb7bba000b; Path=/
15
+ - JSESSIONID=B83C9A8068089FDF4A86EE97F71B0F4F; Path=/; Secure
16
+ content-type:
17
+ - text/html;charset=UTF-8
18
+ date:
19
+ - Fri, 20 May 2011 17:25:04 GMT
20
+ server:
21
+ - ZWS
22
+ body: |
23
+ #
24
+ #Fri May 20 10:25:04 PDT 2011
25
+ GETUSERNAME=null
26
+ WARNING=null
27
+ PASS_EXPIRY=-1
28
+ TICKET=4467b7f577a28232963628cd1417c82a
29
+ RESULT=TRUE
30
+
31
+ http_version: "1.1"
32
+ - !ruby/struct:VCR::HTTPInteraction
33
+ request: !ruby/struct:VCR::Request
34
+ method: :post
35
+ uri: https://crm.zoho.com:443/crm/private/json/Contacts/insertRecords
36
+ body: xmlData=%3CContacts%3E%0A%20%20%3Crow%20no%3D%221%22%3E%0A%20%20%20%20%3CFL%20val%3D%22First%20Name%22%3EJohnny%3C%2FFL%3E%0A%20%20%20%20%3CFL%20val%3D%22Last%20Name%22%3EDepp%3C%2FFL%3E%0A%20%20%3C%2Frow%3E%0A%3C%2FContacts%3E%0A&newFormat=1&apikey=&ticket=4467b7f577a28232963628cd1417c82a
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
+ - crmcsr=93d348fc-ab9f-4b31-8fe1-82b354e1c4a0; Path=/
45
+ - crmze=1; Path=/
46
+ pragma:
47
+ - no-cache
48
+ cache-control:
49
+ - no-cache
50
+ expires:
51
+ - Thu, 01 Jan 1970 00:00:00 GMT
52
+ content-type:
53
+ - text/plain;charset=utf-8
54
+ content-length:
55
+ - "387"
56
+ date:
57
+ - Fri, 20 May 2011 17:25:05 GMT
58
+ server:
59
+ - "-"
60
+ p3p:
61
+ - CP="CAO PSA OUR"
62
+ body: |
63
+ {"response":{"result":{"message":"Record(s) added successfully","recorddetail":{"FL":[{"content":"384023000000055001","val":"Id"},{"content":"2011-05-20 17:25:05","val":"Created Time"},{"content":"2011-05-20 17:25:05","val":"Modified Time"},{"content":"kentonwhite","val":"Created By"},{"content":"kentonwhite","val":"Modified By"}]}},"uri":"/crm/private/json/Contacts/insertRecords"}}
64
+
65
+ http_version: "1.1"
@@ -0,0 +1,96 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
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
10
+ code: 200
11
+ message: OK
12
+ headers:
13
+ set-cookie:
14
+ - iamcsr=870d7d96-7c83-4372-bbd5-730a5e75e194; Path=/
15
+ - JSESSIONID=633BD92451E076DA45700115D4CD28B0; Path=/; Secure
16
+ content-type:
17
+ - text/html;charset=UTF-8
18
+ date:
19
+ - Fri, 20 May 2011 17:20:37 GMT
20
+ server:
21
+ - ZWS
22
+ body: |
23
+ #
24
+ #Fri May 20 10:20:37 PDT 2011
25
+ GETUSERNAME=null
26
+ WARNING=null
27
+ PASS_EXPIRY=-1
28
+ TICKET=6af274f5fe5976b1f12e2b348f2e3de3
29
+ RESULT=TRUE
30
+
31
+ http_version: "1.1"
32
+ - !ruby/struct:VCR::HTTPInteraction
33
+ request: !ruby/struct:VCR::Request
34
+ method: :get
35
+ uri: https://crm.zoho.com:443/crm/private/json/Contacts/getSearchRecords?searchCondition=(Contact%20Name%7Cends%20with%7CWhite)&selectColumns=All&apikey=&ticket=6af274f5fe5976b1f12e2b348f2e3de3
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
+ - crmcsr=333f3bd0-76ef-4170-a205-ed8177eaef29; Path=/
45
+ pragma:
46
+ - no-cache
47
+ cache-control:
48
+ - no-cache
49
+ expires:
50
+ - Thu, 01 Jan 1970 00:00:00 GMT
51
+ content-type:
52
+ - text/plain;charset=utf-8
53
+ content-length:
54
+ - "1417"
55
+ date:
56
+ - Fri, 20 May 2011 17:20:38 GMT
57
+ server:
58
+ - "-"
59
+ body: |
60
+ {"response":{"result":{"Contacts":{"row":[{"no":"1","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"}]},{"no":"2","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"}]}]}},"uri":"/crm/private/json/Contacts/getSearchRecords"}}
61
+
62
+ http_version: "1.1"
63
+ - !ruby/struct:VCR::HTTPInteraction
64
+ request: !ruby/struct:VCR::Request
65
+ method: :get
66
+ uri: https://crm.zoho.com:443/crm/private/json/Contacts/getSearchRecords?searchCondition=(Contact%20Name%7Cends%20with%7CDepp)&selectColumns=All&apikey=&ticket=6af274f5fe5976b1f12e2b348f2e3de3
67
+ body:
68
+ headers:
69
+ response: !ruby/struct:VCR::Response
70
+ status: !ruby/struct:VCR::ResponseStatus
71
+ code: 200
72
+ message: OK
73
+ headers:
74
+ set-cookie:
75
+ - crmcsr=3d210d39-6f1d-4ce8-b86e-feffa7f7bd3c; Path=/
76
+ - crmze=0; Path=/
77
+ pragma:
78
+ - no-cache
79
+ cache-control:
80
+ - no-cache
81
+ expires:
82
+ - Thu, 01 Jan 1970 00:00:00 GMT
83
+ content-type:
84
+ - text/plain;charset=utf-8
85
+ content-length:
86
+ - "130"
87
+ date:
88
+ - Fri, 20 May 2011 17:21:25 GMT
89
+ server:
90
+ - "-"
91
+ p3p:
92
+ - CP="CAO PSA OUR"
93
+ body: |
94
+ {"response":{"nodata":{"message":"There is no data to show","code":"4422"},"uri":"/crm/private/json/Contacts/getSearchRecords"}}
95
+
96
+ http_version: "1.1"
@@ -0,0 +1,62 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
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
10
+ code: 200
11
+ message: OK
12
+ headers:
13
+ set-cookie:
14
+ - iamcsr=97b34f21-a554-46d2-85a7-5def95ec1381; Path=/
15
+ - JSESSIONID=FC1334AAF90EFEBBD13F87ECA1BC965F; Path=/; Secure
16
+ content-type:
17
+ - text/html;charset=UTF-8
18
+ date:
19
+ - Fri, 20 May 2011 17:37:41 GMT
20
+ server:
21
+ - ZWS
22
+ body: |
23
+ #
24
+ #Fri May 20 10:37:41 PDT 2011
25
+ GETUSERNAME=null
26
+ WARNING=null
27
+ PASS_EXPIRY=-1
28
+ TICKET=d09b47a40943b2dd6d92704f61507e0f
29
+ RESULT=TRUE
30
+
31
+ http_version: "1.1"
32
+ - !ruby/struct:VCR::HTTPInteraction
33
+ request: !ruby/struct:VCR::Request
34
+ method: :post
35
+ uri: https://crm.zoho.com:443/crm/private/json/Notes/insertRecords
36
+ body: xmlData=%3CNotes%3E%0A%20%20%3Crow%20no%3D%221%22%3E%0A%20%20%20%20%3CFL%20val%3D%22entityId%22%3E384023000000055001%3C%2FFL%3E%0A%20%20%20%20%3CFL%20val%3D%22Note%20Title%22%3ENote%20to%20self%3C%2FFL%3E%0A%20%20%20%20%3CFL%20val%3D%22Note%20Content%22%3EDon%26apos%3Bt%20do%20that%20again%3C%2FFL%3E%0A%20%20%3C%2Frow%3E%0A%3C%2FNotes%3E%0A&newFormat=1&apikey=&ticket=d09b47a40943b2dd6d92704f61507e0f
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
+ - crmcsr=79cbb578-a277-48c6-bb4c-d241f089fc4d; Path=/
45
+ pragma:
46
+ - no-cache
47
+ cache-control:
48
+ - no-cache
49
+ expires:
50
+ - Thu, 01 Jan 1970 00:00:00 GMT
51
+ content-type:
52
+ - text/plain;charset=utf-8
53
+ content-length:
54
+ - "384"
55
+ date:
56
+ - Fri, 20 May 2011 17:37:42 GMT
57
+ server:
58
+ - "-"
59
+ body: |
60
+ {"response":{"result":{"message":"Record(s) added successfully","recorddetail":{"FL":[{"content":"384023000000056001","val":"Id"},{"content":"2011-05-20 17:37:42","val":"Created Time"},{"content":"2011-05-20 17:37:42","val":"Modified Time"},{"content":"kentonwhite","val":"Created By"},{"content":"kentonwhite","val":"Modified By"}]}},"uri":"/crm/private/json/Notes/insertRecords"}}
61
+
62
+ http_version: "1.1"
@@ -0,0 +1,31 @@
1
+ require 'rubygems'
2
+ require 'rspec'
3
+ require 'fakeweb'
4
+ require 'vcr'
5
+ require 'mocha'
6
+
7
+
8
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
9
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
10
+ require 'zohoho'
11
+
12
+ RSpec.configure do |config|
13
+ # == Mock Framework
14
+ #
15
+ # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
16
+ #
17
+ config.mock_with :mocha
18
+ # config.mock_with :flexmock
19
+ # config.mock_with :rr
20
+ # config.mock_with :rspec
21
+
22
+ end
23
+
24
+ def vcr_config(dir_name)
25
+ VCR.config do |c|
26
+ c.cassette_library_dir = "spec/fixtures/vcr_cassettes/#{dir_name}"
27
+ c.stub_with :fakeweb # or :webmock
28
+ c.default_cassette_options = {:record => :none}
29
+ end
30
+ end
31
+
@@ -0,0 +1,78 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{zohoho}
8
+ s.version = "0.1.2"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["KentonWhite"]
12
+ s.date = %q{2011-05-24}
13
+ s.description = %q{Simple interface to zoho api}
14
+ s.email = %q{jkentonwhite@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".autotest",
21
+ ".document",
22
+ "Gemfile",
23
+ "Gemfile.lock",
24
+ "LICENSE.txt",
25
+ "README.rdoc",
26
+ "Rakefile",
27
+ "VERSION",
28
+ "autotest/discover.rb",
29
+ "lib/zohoho.rb",
30
+ "lib/zohoho/connection.rb",
31
+ "lib/zohoho/crm.rb",
32
+ "spec/connection_spec.rb",
33
+ "spec/crm_spec.rb",
34
+ "spec/fixtures/vcr_cassettes/connection/call.yml",
35
+ "spec/fixtures/vcr_cassettes/connection/ticket.yml",
36
+ "spec/fixtures/vcr_cassettes/crm/add_contact.yml",
37
+ "spec/fixtures/vcr_cassettes/crm/contact.yml",
38
+ "spec/fixtures/vcr_cassettes/crm/note.yml",
39
+ "spec/spec_helper.rb",
40
+ "zohoho.gemspec"
41
+ ]
42
+ s.homepage = %q{http://github.com/kwhite/zohoho}
43
+ s.licenses = ["MIT"]
44
+ s.require_paths = ["lib"]
45
+ s.rubygems_version = %q{1.5.2}
46
+ s.summary = %q{Simple interface to zoho api}
47
+
48
+ if s.respond_to? :specification_version then
49
+ s.specification_version = 3
50
+
51
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
52
+ s.add_runtime_dependency(%q<httparty>, [">= 0"])
53
+ s.add_runtime_dependency(%q<json>, [">= 0"])
54
+ s.add_runtime_dependency(%q<xml-simple>, [">= 0"])
55
+ s.add_development_dependency(%q<rspec>, [">= 0"])
56
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
57
+ s.add_development_dependency(%q<jeweler>, ["~> 1.6.0"])
58
+ s.add_development_dependency(%q<rcov>, [">= 0"])
59
+ else
60
+ s.add_dependency(%q<httparty>, [">= 0"])
61
+ s.add_dependency(%q<json>, [">= 0"])
62
+ s.add_dependency(%q<xml-simple>, [">= 0"])
63
+ s.add_dependency(%q<rspec>, [">= 0"])
64
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
65
+ s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
66
+ s.add_dependency(%q<rcov>, [">= 0"])
67
+ end
68
+ else
69
+ s.add_dependency(%q<httparty>, [">= 0"])
70
+ s.add_dependency(%q<json>, [">= 0"])
71
+ s.add_dependency(%q<xml-simple>, [">= 0"])
72
+ s.add_dependency(%q<rspec>, [">= 0"])
73
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
74
+ s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
75
+ s.add_dependency(%q<rcov>, [">= 0"])
76
+ end
77
+ end
78
+
metadata ADDED
@@ -0,0 +1,153 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: zohoho
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.1.2
6
+ platform: ruby
7
+ authors:
8
+ - KentonWhite
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2011-05-24 00:00:00 -03:00
14
+ default_executable:
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: httparty
18
+ prerelease: false
19
+ requirement: &id001 !ruby/object:Gem::Requirement
20
+ none: false
21
+ requirements:
22
+ - - ">="
23
+ - !ruby/object:Gem::Version
24
+ version: "0"
25
+ type: :runtime
26
+ version_requirements: *id001
27
+ - !ruby/object:Gem::Dependency
28
+ name: json
29
+ prerelease: false
30
+ requirement: &id002 !ruby/object:Gem::Requirement
31
+ none: false
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: "0"
36
+ type: :runtime
37
+ version_requirements: *id002
38
+ - !ruby/object:Gem::Dependency
39
+ name: xml-simple
40
+ prerelease: false
41
+ requirement: &id003 !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: "0"
47
+ type: :runtime
48
+ version_requirements: *id003
49
+ - !ruby/object:Gem::Dependency
50
+ name: rspec
51
+ prerelease: false
52
+ requirement: &id004 !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: "0"
58
+ type: :development
59
+ version_requirements: *id004
60
+ - !ruby/object:Gem::Dependency
61
+ name: bundler
62
+ prerelease: false
63
+ requirement: &id005 !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: 1.0.0
69
+ type: :development
70
+ version_requirements: *id005
71
+ - !ruby/object:Gem::Dependency
72
+ name: jeweler
73
+ prerelease: false
74
+ requirement: &id006 !ruby/object:Gem::Requirement
75
+ none: false
76
+ requirements:
77
+ - - ~>
78
+ - !ruby/object:Gem::Version
79
+ version: 1.6.0
80
+ type: :development
81
+ version_requirements: *id006
82
+ - !ruby/object:Gem::Dependency
83
+ name: rcov
84
+ prerelease: false
85
+ requirement: &id007 !ruby/object:Gem::Requirement
86
+ none: false
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: "0"
91
+ type: :development
92
+ version_requirements: *id007
93
+ description: Simple interface to zoho api
94
+ email: jkentonwhite@gmail.com
95
+ executables: []
96
+
97
+ extensions: []
98
+
99
+ extra_rdoc_files:
100
+ - LICENSE.txt
101
+ - README.rdoc
102
+ files:
103
+ - .autotest
104
+ - .document
105
+ - Gemfile
106
+ - Gemfile.lock
107
+ - LICENSE.txt
108
+ - README.rdoc
109
+ - Rakefile
110
+ - VERSION
111
+ - autotest/discover.rb
112
+ - lib/zohoho.rb
113
+ - lib/zohoho/connection.rb
114
+ - lib/zohoho/crm.rb
115
+ - spec/connection_spec.rb
116
+ - spec/crm_spec.rb
117
+ - spec/fixtures/vcr_cassettes/connection/call.yml
118
+ - spec/fixtures/vcr_cassettes/connection/ticket.yml
119
+ - spec/fixtures/vcr_cassettes/crm/add_contact.yml
120
+ - spec/fixtures/vcr_cassettes/crm/contact.yml
121
+ - spec/fixtures/vcr_cassettes/crm/note.yml
122
+ - spec/spec_helper.rb
123
+ - zohoho.gemspec
124
+ has_rdoc: true
125
+ homepage: http://github.com/kwhite/zohoho
126
+ licenses:
127
+ - MIT
128
+ post_install_message:
129
+ rdoc_options: []
130
+
131
+ require_paths:
132
+ - lib
133
+ required_ruby_version: !ruby/object:Gem::Requirement
134
+ none: false
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: "0"
139
+ required_rubygems_version: !ruby/object:Gem::Requirement
140
+ none: false
141
+ requirements:
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ version: "0"
145
+ requirements: []
146
+
147
+ rubyforge_project:
148
+ rubygems_version: 1.6.2
149
+ signing_key:
150
+ specification_version: 3
151
+ summary: Simple interface to zoho api
152
+ test_files: []
153
+