highrise_wrapper 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +17 -0
- data/.ruby-version +1 -0
- data/Gemfile +2 -0
- data/LICENSE.txt +22 -0
- data/README.md +30 -0
- data/Rakefile +1 -0
- data/TODO +23 -0
- data/highrise_wrapper.gemspec +32 -0
- data/lib/highrise_wrapper/contact.rb +15 -0
- data/lib/highrise_wrapper/version.rb +3 -0
- data/lib/highrise_wrapper.rb +5 -0
- data/mytests.rb +74 -0
- metadata +114 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
M2E5ODE0MzFjNGEzMDhkOTVlMGZiNjUyOWUxYTZlMDdkZDE0OGQ0Yw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NjZmNTQ2ZGVhNDQ3ZTVlM2JkYzk0N2FmMTc2NDcyZThlZTM4ODg5YQ==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
Y2QyMjlhYWNjODg2YTliMjYwN2I5ZDYzNmE1NTQ5NGRmYTQ5NjUwYmE5NjU1
|
10
|
+
YTFhMzM0ZWYwNzU0OWE4MzVjYWQzY2RiNmYwN2RjNGNiZDc3Mjg3ZjgwZjk0
|
11
|
+
MzBmZWNhNDBjYTY3Y2Q4MzllOTNjNDdlMjk1NWU5YTEzZDFmNzg=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZGQ0Y2RiODMyOWFkYjliMTYzMGNmNThkNDBiNmIzOTU3YjcwOTBlMDZiZjNk
|
14
|
+
Y2Y0YjljMjEzMWM0Nzc3NjRkZDZjMDc0MGZmYWRhZWRmYTlmMjNlM2Y3YTAz
|
15
|
+
ZmVmNjNlNGRlMzUzNDgzNDE1MzU1MDI1YWEzMDA0NjRmMGE2YmI=
|
data/.gitignore
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.9.3
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 rhlobo
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# Highrise_wrapper
|
2
|
+
|
3
|
+
Gem built to wrap the highrise gem.
|
4
|
+
This is a POC created to be used in my personal studies.
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
gem 'Highrise_wrapper'
|
11
|
+
|
12
|
+
And then execute:
|
13
|
+
|
14
|
+
$ bundle
|
15
|
+
|
16
|
+
Or install it yourself as:
|
17
|
+
|
18
|
+
$ gem install Highrise_wrapper
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
TODO: Write usage instructions here
|
23
|
+
|
24
|
+
## Contributing
|
25
|
+
|
26
|
+
1. Fork it ( http://github.com/rhlobo/Highrise_wrapper/fork )
|
27
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
28
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
29
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
30
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/TODO
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
MAIN SCOPE:
|
2
|
+
✔ Test integration (highrise gem usage) @done (14-03-20 16:32)
|
3
|
+
✔ Make project read to implementation @done (14-03-20 16:36)
|
4
|
+
☐ ??
|
5
|
+
☐ Criar metodo de conexão com highrise
|
6
|
+
☐ Cadastramento de um contato
|
7
|
+
☐ Descadastramento de um contato
|
8
|
+
☐ Fazer com que chamada a api seja assincrona (outra thread, ou etc)
|
9
|
+
☐ Remover script de testes
|
10
|
+
|
11
|
+
DOCUMENTATION:
|
12
|
+
✔ Add gem description to Highrise_wrapper.gemspec @done (14-03-20 16:31)
|
13
|
+
|
14
|
+
QUALITY:
|
15
|
+
☐ Create tests
|
16
|
+
☐ Add to Travis CI
|
17
|
+
|
18
|
+
README:
|
19
|
+
☐ Add travis badge
|
20
|
+
☐ Add gem version badge
|
21
|
+
☐ Add code quality badge (code climate?)
|
22
|
+
☐ Add other badges??
|
23
|
+
☐ Write 'usage'
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'highrise_wrapper/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = "highrise_wrapper"
|
9
|
+
spec.version = Highrise_wrapper::VERSION
|
10
|
+
spec.authors = ["rhlobo"]
|
11
|
+
spec.email = ["rhlobo+github@gmail.com"]
|
12
|
+
spec.summary = "Gem to provide easy usage of Highrise API"
|
13
|
+
spec.description = 'Gem to provide easy usage of Highrise API.
|
14
|
+
Built wrapping the highrise gem, it is a POC
|
15
|
+
created by me in order to study rubys platform'
|
16
|
+
spec.homepage = "http://github.com/rhlobo/highrise_wrapper"
|
17
|
+
spec.license = "MIT"
|
18
|
+
|
19
|
+
spec.platform = Gem::Platform::RUBY
|
20
|
+
spec.required_ruby_version = ">= 1.9.3"
|
21
|
+
|
22
|
+
spec.files = `git ls-files -z`.split("\x0")
|
23
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
24
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
25
|
+
spec.require_paths = ["lib"]
|
26
|
+
|
27
|
+
spec.add_development_dependency "bundler", "~> 1.5"
|
28
|
+
spec.add_development_dependency "rake"
|
29
|
+
spec.add_development_dependency "rspec"
|
30
|
+
|
31
|
+
spec.add_dependency "highrise", "~>3.1"
|
32
|
+
end
|
data/mytests.rb
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
require 'highrise'
|
2
|
+
|
3
|
+
Highrise::Base.site = 'https://personal1788.highrisehq.com'
|
4
|
+
Highrise::Base.user = 'ee54dd83345c800c14b6fda0a650659e'
|
5
|
+
Highrise::Base.format = :xml
|
6
|
+
|
7
|
+
#@people = Highrise::Person.find_all_across_pages(:params => {:tag_id => 12345})
|
8
|
+
@people = Highrise::Person.find_all_across_pages
|
9
|
+
|
10
|
+
# [#<Highrise::Person:0x9db1d80 @attributes={"author_id"=>1018065, "background"=>nil, "company_id"=>nil, "created_at"=>2014-03-17 22:11:22 UTC, "first_name"=>"A", "group_id"=>nil, "id"=>201374388, "last_name"=>"A", "owner_id"=>nil, "title"=>nil, "updated_at"=>2014-03-17 22:11:22 UTC, "visible_to"=>"Everyone", "company_name"=>nil, "linkedin_url"=>nil, "avatar_url"=>"http://dge9rmgqjs8m1.cloudfront.net/highrise/missing/avatar.gif?r=3", "contact_data"=>#<Highrise::Person::ContactData:0x9db0a98 @attributes={"instant_messengers"=>[], "twitter_accounts"=>[], "email_addresses"=>[], "phone_numbers"=>[], "addresses"=>[], "web_addresses"=>[]}, @prefix_options={}, @persisted=true>, "subject_datas"=>[#<Highrise::Person::SubjectData:0x9dafc88 @attributes={"id"=>118062439, "subject_field_id"=>878834, "subject_field_label"=>"Customer ID", "value"=>"A"}, @prefix_options={}, @persisted=true>]}, @prefix_options={}, @persisted=true>]
|
11
|
+
|
12
|
+
|
13
|
+
class Contact
|
14
|
+
attr_accessor :name, :last_name, :email, :company, :job_title, :phone, :website
|
15
|
+
|
16
|
+
def initialize site, user, attributes
|
17
|
+
@site = site
|
18
|
+
@user = user
|
19
|
+
attributes.each { |k, v| instance_variable_set("@#{k}", v) }
|
20
|
+
end
|
21
|
+
|
22
|
+
def save
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
#c = Contact.new "site", "user", {name: "fernando"}
|
27
|
+
#puts c.name
|
28
|
+
puts @people.to_json
|
29
|
+
|
30
|
+
=begin
|
31
|
+
{
|
32
|
+
"author_id":1018065,
|
33
|
+
"background":null,
|
34
|
+
"company_id":202863650,
|
35
|
+
"created_at":"2014-03-17T22:11:22Z",
|
36
|
+
"first_name":"Roberto",
|
37
|
+
"group_id":null,
|
38
|
+
"id":201374388,
|
39
|
+
"last_name":"Lobo",
|
40
|
+
"owner_id":null,
|
41
|
+
"title":"Project Manager",
|
42
|
+
"updated_at":"2014-03-29T20:40:56Z",
|
43
|
+
"visible_to":"Everyone",
|
44
|
+
"company_name":"Empresa",
|
45
|
+
"linkedin_url":null,
|
46
|
+
"avatar_url":"http://dge9rmgqjs8m1.cloudfront.net/highrise/missing/avatar.gif?r=3",
|
47
|
+
"contact_data": {
|
48
|
+
"instant_messengers":[],
|
49
|
+
"twitter_accounts":[],
|
50
|
+
"email_addresses":[{
|
51
|
+
"address":"rhlobo+highrise@gmail.com",
|
52
|
+
"id":103683105,
|
53
|
+
"location":"Home"
|
54
|
+
}],
|
55
|
+
"phone_numbers":[{
|
56
|
+
"id":164635766,
|
57
|
+
"location":"Work",
|
58
|
+
"number":"84442234"
|
59
|
+
}],
|
60
|
+
"addresses":[],
|
61
|
+
"web_addresses":[{
|
62
|
+
"id":164635767,
|
63
|
+
"location":"Work",
|
64
|
+
"url":"http://how.i.drycode.it"
|
65
|
+
}]
|
66
|
+
},
|
67
|
+
"subject_datas":[{
|
68
|
+
"id":118062439,
|
69
|
+
"subject_field_id":878834,
|
70
|
+
"subject_field_label":"Customer ID",
|
71
|
+
"value":"ID"
|
72
|
+
}]
|
73
|
+
}
|
74
|
+
=end
|
metadata
ADDED
@@ -0,0 +1,114 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: highrise_wrapper
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- rhlobo
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-03-30 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.5'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.5'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: highrise
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.1'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.1'
|
69
|
+
description: ! "Gem to provide easy usage of Highrise API.\n Built
|
70
|
+
wrapping the highrise gem, it is a POC\n created by me in
|
71
|
+
order to study rubys platform"
|
72
|
+
email:
|
73
|
+
- rhlobo+github@gmail.com
|
74
|
+
executables: []
|
75
|
+
extensions: []
|
76
|
+
extra_rdoc_files: []
|
77
|
+
files:
|
78
|
+
- .gitignore
|
79
|
+
- .ruby-version
|
80
|
+
- Gemfile
|
81
|
+
- LICENSE.txt
|
82
|
+
- README.md
|
83
|
+
- Rakefile
|
84
|
+
- TODO
|
85
|
+
- highrise_wrapper.gemspec
|
86
|
+
- lib/highrise_wrapper.rb
|
87
|
+
- lib/highrise_wrapper/contact.rb
|
88
|
+
- lib/highrise_wrapper/version.rb
|
89
|
+
- mytests.rb
|
90
|
+
homepage: http://github.com/rhlobo/highrise_wrapper
|
91
|
+
licenses:
|
92
|
+
- MIT
|
93
|
+
metadata: {}
|
94
|
+
post_install_message:
|
95
|
+
rdoc_options: []
|
96
|
+
require_paths:
|
97
|
+
- lib
|
98
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ! '>='
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: 1.9.3
|
103
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
|
+
requirements:
|
105
|
+
- - ! '>='
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: '0'
|
108
|
+
requirements: []
|
109
|
+
rubyforge_project:
|
110
|
+
rubygems_version: 2.2.2
|
111
|
+
signing_key:
|
112
|
+
specification_version: 4
|
113
|
+
summary: Gem to provide easy usage of Highrise API
|
114
|
+
test_files: []
|