tarta-api 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +90 -0
- data/tarta_api.rb +52 -0
- metadata +80 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 544d926902d26f0880f580084088c77be0a20396024b9f4b0454c3468c23d29b
|
4
|
+
data.tar.gz: fa92b7580d5333e6b3d1bcc2f8cf2cdb6878c14e10e5d1b552181ba595df277f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: dd739b07fd31aeff73535a3a1b10f252fb5ee228df272ecc7a7f2201ce601bee9c5206c846a30e0d776b7bf964afb6fc1ac2419d75900fcb2d5a7bd290228779
|
7
|
+
data.tar.gz: fa3f7020b70d038dbb915c00a992374ba6d05a0dc3d4f9e90bd0364ed7649d2764b762c6419f8f799a39c83af5055badf8420ae051206730eaf70c1eea6885ec
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2025 JoPilot
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
# TartaAPI-Ruby
|
2
|
+
|
3
|
+
## Overview
|
4
|
+
TartaAPI-Ruby is a Ruby wrapper for the Tarta API, designed to seamlessly integrate AI-powered job search functionality into your applications.
|
5
|
+
|
6
|
+
## API Documentation
|
7
|
+
For detailed API documentation, visit:
|
8
|
+
[Tarta API Documentation](https://api.tarta.ai/swagger/index.html)
|
9
|
+
|
10
|
+
## What is Tarta?
|
11
|
+
Tarta.ai is a sophisticated AI platform that consolidates job listings from a wide range of sources, including job boards and social media. The platform streamlines the job search experience, matching users with suitable vacancies and even facilitating interview scheduling.
|
12
|
+
|
13
|
+
To learn more, visit:
|
14
|
+
[Tarta Official Website](https://tarta.ai/)
|
15
|
+
|
16
|
+
## ChatGPT Integration
|
17
|
+
Tarta is also available as a ChatGPT plugin to enhance your job search experience:
|
18
|
+
[Tarta ChatGPT Plugin](https://chat.openai.com/g/g-Gkf9YM4sR-job-search-in-the-us)
|
19
|
+
|
20
|
+
## Installation
|
21
|
+
To install TartaAPI-Ruby, add this line to your Gemfile:
|
22
|
+
```ruby
|
23
|
+
gem 'tarta-api'
|
24
|
+
```
|
25
|
+
Then, execute:
|
26
|
+
```sh
|
27
|
+
bundle install
|
28
|
+
```
|
29
|
+
Or install it yourself with:
|
30
|
+
```sh
|
31
|
+
gem install tarta-api
|
32
|
+
```
|
33
|
+
|
34
|
+
## Usage Example
|
35
|
+
Here's a simple example demonstrating how to use the library to execute a job search:
|
36
|
+
|
37
|
+
```ruby
|
38
|
+
require 'tarta_api'
|
39
|
+
|
40
|
+
def search_jobs(title, size = 5)
|
41
|
+
request = TartaAPI::JobSearchRequest.new(title: title, size: size)
|
42
|
+
|
43
|
+
begin
|
44
|
+
results = TartaAPI::JobSearchService.search_jobs(request)
|
45
|
+
jobs = results.fetch("jobs", [])
|
46
|
+
|
47
|
+
if jobs.empty?
|
48
|
+
puts "No job results found."
|
49
|
+
return
|
50
|
+
end
|
51
|
+
|
52
|
+
puts "Job Search Results:"
|
53
|
+
jobs.each do |job|
|
54
|
+
job_name = job.fetch("name", "N/A")
|
55
|
+
company = job.fetch("companyName", "N/A")
|
56
|
+
location = job.fetch("location", {})
|
57
|
+
city = location.fetch("city", "Unknown")
|
58
|
+
state = location.fetch("state", "Unknown")
|
59
|
+
country = location.fetch("country", "Unknown")
|
60
|
+
source = job.fetch("feed", "N/A")
|
61
|
+
posted_date = job.fetch("created", "N/A")
|
62
|
+
|
63
|
+
puts "Job: #{job_name} at #{company}"
|
64
|
+
puts "Location: #{city}, #{state}, #{country}"
|
65
|
+
puts "Source: #{source}"
|
66
|
+
puts "Posted: #{posted_date}\n"
|
67
|
+
end
|
68
|
+
|
69
|
+
rescue => e
|
70
|
+
puts "Error fetching job results: #{e}"
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
search_jobs("ruby", size: 2)
|
75
|
+
|
76
|
+
```
|
77
|
+
|
78
|
+
## Key Features
|
79
|
+
- **Effortless API Integration**: Interact with Tarta's API using straightforward Ruby methods.
|
80
|
+
- **AI Matching**: Utilize AI algorithms to find jobs that align with user profiles and preferences.
|
81
|
+
- **Interview Scheduling**: Automate interview scheduling to streamline the application process.
|
82
|
+
|
83
|
+
## Contributions
|
84
|
+
Contributions are welcome! Feel free to open issues or submit pull requests to enhance the library.
|
85
|
+
|
86
|
+
## License
|
87
|
+
This project is under the MIT License.
|
88
|
+
|
89
|
+
---
|
90
|
+
Experience the efficiency of Tarta and integrate AI-powered job search into your Ruby applications today!
|
data/tarta_api.rb
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
module TartaAPI
|
5
|
+
API_BASE_URL = 'https://api.tarta.ai'
|
6
|
+
|
7
|
+
class JobSearchRequest
|
8
|
+
attr_reader :title, :company_name, :city, :state, :country, :is_remote, :size
|
9
|
+
|
10
|
+
def initialize(title:, size:, company_name: nil, city: nil, state: nil, country: nil, is_remote: nil)
|
11
|
+
@title = title
|
12
|
+
@company_name = company_name
|
13
|
+
@city = city
|
14
|
+
@state = state
|
15
|
+
@country = country
|
16
|
+
@is_remote = is_remote
|
17
|
+
@size = size
|
18
|
+
end
|
19
|
+
|
20
|
+
def to_h
|
21
|
+
{
|
22
|
+
title: title,
|
23
|
+
companyName: company_name,
|
24
|
+
city: city,
|
25
|
+
state: state,
|
26
|
+
country: country,
|
27
|
+
isRemote: is_remote,
|
28
|
+
size: size
|
29
|
+
}.compact
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
class JobSearchService
|
34
|
+
def self.search_jobs(request)
|
35
|
+
uri = URI.join(API_BASE_URL, '/api/v1/search')
|
36
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
37
|
+
http.use_ssl = true
|
38
|
+
|
39
|
+
req = Net::HTTP::Post.new(uri, { 'Content-Type' => 'application/json' })
|
40
|
+
req.body = request.to_h.to_json
|
41
|
+
|
42
|
+
response = http.request(req)
|
43
|
+
|
44
|
+
raise "Error: #{response.message}" unless response.is_a?(Net::HTTPSuccess)
|
45
|
+
|
46
|
+
JSON.parse(response.body, symbolize_names: true)
|
47
|
+
rescue StandardError => e
|
48
|
+
warn "Job search request failed: #{e.message}"
|
49
|
+
raise 'Unable to complete the job search request.'
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
metadata
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tarta-api
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- tarta.ai
|
8
|
+
bindir: bin
|
9
|
+
cert_chain: []
|
10
|
+
date: 2025-03-11 00:00:00.000000000 Z
|
11
|
+
dependencies:
|
12
|
+
- !ruby/object:Gem::Dependency
|
13
|
+
name: json
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - ">="
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '0'
|
19
|
+
type: :runtime
|
20
|
+
prerelease: false
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
requirements:
|
23
|
+
- - ">="
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: '0'
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: net-http
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
description: TartaAPI enables seamless integration of AI-driven job search capabilities
|
41
|
+
into Ruby applications. Access a vast database of job listings, utilize AI matching
|
42
|
+
algorithms, and automate interview scheduling, all through an easy-to-use interface
|
43
|
+
with the Tarta API.
|
44
|
+
email:
|
45
|
+
- taras@tarta.ai
|
46
|
+
executables: []
|
47
|
+
extensions: []
|
48
|
+
extra_rdoc_files: []
|
49
|
+
files:
|
50
|
+
- LICENSE.txt
|
51
|
+
- README.md
|
52
|
+
- tarta_api.rb
|
53
|
+
homepage: https://tarta.ai
|
54
|
+
licenses:
|
55
|
+
- MIT
|
56
|
+
metadata:
|
57
|
+
homepage_uri: https://tarta.ai
|
58
|
+
source_code_uri: https://github.com/tarta-ai/TartaAPI-ruby
|
59
|
+
api_uri: https://api.tarta.net/swagger/index.html
|
60
|
+
github_repo: https://api.tarta.net/swagger/index.html
|
61
|
+
allowed_push_host: https://rubygems.org
|
62
|
+
rdoc_options: []
|
63
|
+
require_paths:
|
64
|
+
- "."
|
65
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
requirements: []
|
76
|
+
rubygems_version: 3.6.5
|
77
|
+
specification_version: 4
|
78
|
+
summary: A Ruby wrapper for the Tarta API, enabling seamless integration of AI-powered
|
79
|
+
job search functionality.
|
80
|
+
test_files: []
|