proxycurl 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 974322ef1aacd292afffab16e3f3f0776fc86157476b6f985bd8bbd44291b426
4
+ data.tar.gz: 7f7340f9209a920d27e07f1184b108817b4c8236560573ea1073398596e4964f
5
+ SHA512:
6
+ metadata.gz: 2acf060bd0117bc956eee2cae349a30459ae8600f32bf2cf3d59025688d563129911620fca21f53dbf5c503e1a700ec1c5a7500ec465b45486d48ed7ca9c5bc1
7
+ data.tar.gz: 73eae3efcf323e401e047921e662c767eca7cd62c3ea050610d94656f7d8e1f63f341ab73d7fab6844e180fdecf1ae92bc141493c155500ad592819a49e2c0bd
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.gitignore ADDED
@@ -0,0 +1,49 @@
1
+ # rcov generated
2
+ coverage
3
+ coverage.data
4
+
5
+ # rdoc generated
6
+ rdoc
7
+
8
+ # yard generated
9
+ doc
10
+ .yardoc
11
+
12
+ # bundler
13
+ .bundle
14
+
15
+ # juwelier generated
16
+ pkg
17
+
18
+ # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
19
+ #
20
+ # * Create a file at ~/.gitignore
21
+ # * Include files you want ignored
22
+ # * Run: git config --global core.excludesfile ~/.gitignore
23
+ #
24
+ # After doing this, these files will be ignored in all your git projects,
25
+ # saving you from having to 'pollute' every project you touch with them
26
+ #
27
+ # Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
28
+ #
29
+ # For MacOS:
30
+ #
31
+ #.DS_Store
32
+
33
+ # For TextMate
34
+ #*.tmproj
35
+ #tmtags
36
+
37
+ # For emacs:
38
+ #*~
39
+ #\#*
40
+ #.\#*
41
+
42
+ # For vim:
43
+ #*.swp
44
+
45
+ # For redcar:
46
+ #.redcar
47
+
48
+ # For rubinius:
49
+ #*.rbc
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ source "https://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ # gem "activesupport", ">= 2.3.5"
5
+
6
+ # Add dependencies to develop your gem here.
7
+ # Include everything needed to run rake, tests, features, etc.
8
+ gem "httparty", "~> 0.20.0"
9
+
10
+ group :development do
11
+ gem "rufo"
12
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,21 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ httparty (0.20.0)
5
+ mime-types (~> 3.0)
6
+ multi_xml (>= 0.5.2)
7
+ mime-types (3.4.1)
8
+ mime-types-data (~> 3.2015)
9
+ mime-types-data (3.2022.0105)
10
+ multi_xml (0.6.0)
11
+ rufo (0.13.0)
12
+
13
+ PLATFORMS
14
+ arm64-darwin-20
15
+
16
+ DEPENDENCIES
17
+ httparty (~> 0.20.0)
18
+ rufo
19
+
20
+ BUNDLED WITH
21
+ 2.2.15
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2022 Javier Segura
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,18 @@
1
+ = proxycurl
2
+
3
+ Client for accessing proxycurl
4
+
5
+ == Contributing to proxycurl
6
+
7
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
8
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
9
+ * Fork the project.
10
+ * Start a feature/bugfix branch.
11
+ * Commit and push until you are happy with your contribution.
12
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
+
15
+ == Copyright
16
+
17
+ Copyright (c) 2022 Javier Segura. See LICENSE.txt for
18
+ further details.
data/Rakefile ADDED
@@ -0,0 +1,50 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+ require 'juwelier'
14
+ Juwelier::Tasks.new do |gem|
15
+ # gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
16
+ gem.name = "proxycurl"
17
+ gem.homepage = "http://github.com/jsegura/proxycurl"
18
+ gem.license = "MIT"
19
+ gem.summary = %Q{TODO: one-line summary of your gem}
20
+ gem.description = %Q{TODO: longer description of your gem}
21
+ gem.email = "javism@gmail.com"
22
+ gem.authors = ["Javier Segura"]
23
+
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Juwelier::RubygemsDotOrgTasks.new
27
+ require 'rake/testtask'
28
+ Rake::TestTask.new(:test) do |test|
29
+ test.libs << 'lib' << 'test'
30
+ test.pattern = 'test/**/test_*.rb'
31
+ test.verbose = true
32
+ end
33
+
34
+ desc "Code coverage detail"
35
+ task :simplecov do
36
+ ENV['COVERAGE'] = "true"
37
+ Rake::Task['test'].execute
38
+ end
39
+
40
+ task :default => :test
41
+
42
+ require 'rdoc/task'
43
+ Rake::RDocTask.new do |rdoc|
44
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
45
+
46
+ rdoc.rdoc_dir = 'rdoc'
47
+ rdoc.title = "proxycurl #{version}"
48
+ rdoc.rdoc_files.include('README*')
49
+ rdoc.rdoc_files.include('lib/**/*.rb')
50
+ end
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "proxycurl"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
@@ -0,0 +1,42 @@
1
+ require "httparty"
2
+
3
+ module Proxycurl
4
+ class Client
5
+ include HTTParty
6
+
7
+ base_uri "https://nubela.co/proxycurl/api/"
8
+ format :json
9
+
10
+ def initialize(api_key)
11
+ self.class.default_options.merge!(headers: { "Authorization" => "Bearer #{api_key}" })
12
+ end
13
+
14
+ def linkedin_company_profile(url)
15
+ response = self.class.get("/linkedin/company", { query: {
16
+ resolve_numeric_id: false,
17
+ categories: :include,
18
+ funding_data: :include,
19
+ extra: :include,
20
+ exit_data: :include,
21
+ acquisitions: :include,
22
+ url: url,
23
+ } })
24
+ response.parsed_response
25
+ end
26
+ end
27
+
28
+ def linkedin_person_profile(url)
29
+ response = self.class.get("/linkedin", { query: {
30
+ skills: :include,
31
+ inferred_salary: :include,
32
+ personal_email: :include,
33
+ personal_contact_number: :include,
34
+ twitter_profile_id: :include,
35
+ facebook_profile_id: :include,
36
+ github_profile_id: :include,
37
+ extra: :include,
38
+ url: url,
39
+ } })
40
+ response.parsed_response
41
+ end
42
+ end
@@ -0,0 +1,3 @@
1
+ module Proxycurl
2
+ VERSION = "0.0.1"
3
+ end
data/lib/proxycurl.rb ADDED
@@ -0,0 +1,5 @@
1
+ require "proxycurl/version"
2
+ require "proxycurl/client"
3
+
4
+ module Proxycurl
5
+ end
data/proxycurl.gemspec ADDED
@@ -0,0 +1,29 @@
1
+ require_relative "lib/proxycurl/version"
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = "proxycurl"
5
+ spec.version = Proxycurl::VERSION
6
+ spec.authors = ["jsegura"]
7
+ spec.email = ["javism@gmail.com"]
8
+
9
+ spec.summary = %q{Proxycurl client}
10
+ spec.description = %q{Proxycurl client}
11
+ spec.homepage = "https://github.com/jsegura/proxycurl"
12
+ spec.license = "MIT"
13
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
14
+
15
+ spec.metadata["homepage_uri"] = spec.homepage
16
+ spec.metadata["source_code_uri"] = "https://github.com/jsegura/proxycurl"
17
+ spec.metadata["changelog_uri"] = "https://github.com/jsegura/proxycurl"
18
+
19
+ # Specify which files should be added to the gem when it is released.
20
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
21
+ spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
22
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
23
+ end
24
+ spec.bindir = "exe"
25
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
+ spec.require_paths = ["lib"]
27
+
28
+ spec.add_dependency "httparty"
29
+ end
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: proxycurl
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - jsegura
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2022-06-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: httparty
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: Proxycurl client
28
+ email:
29
+ - javism@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - ".document"
35
+ - ".gitignore"
36
+ - Gemfile
37
+ - Gemfile.lock
38
+ - LICENSE.txt
39
+ - README.rdoc
40
+ - Rakefile
41
+ - bin/console
42
+ - lib/proxycurl.rb
43
+ - lib/proxycurl/client.rb
44
+ - lib/proxycurl/version.rb
45
+ - proxycurl.gemspec
46
+ homepage: https://github.com/jsegura/proxycurl
47
+ licenses:
48
+ - MIT
49
+ metadata:
50
+ homepage_uri: https://github.com/jsegura/proxycurl
51
+ source_code_uri: https://github.com/jsegura/proxycurl
52
+ changelog_uri: https://github.com/jsegura/proxycurl
53
+ post_install_message:
54
+ rdoc_options: []
55
+ require_paths:
56
+ - lib
57
+ required_ruby_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: 2.3.0
62
+ required_rubygems_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ requirements: []
68
+ rubygems_version: 3.2.15
69
+ signing_key:
70
+ specification_version: 4
71
+ summary: Proxycurl client
72
+ test_files: []