Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(api): remove deprecated & unused ATS API #12

Merged
merged 1 commit into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 27
configured_endpoints: 18
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ func main() {
client := finchgo.NewClient(
option.WithAccessToken("my access token"),
)
candidate, err := client.ATS.Candidates.Get(context.TODO(), "<candidate id>")
page, err := client.HRIS.Directory.ListIndividuals(context.TODO(), finchgo.HRISDirectoryListIndividualsParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", candidate.FirstName)
fmt.Printf("%+v\n", page)
}

```
Expand Down Expand Up @@ -142,7 +142,7 @@ client := finchgo.NewClient(
option.WithHeader("X-Some-Header", "custom_header_info"),
)

client.ATS.Candidates.Get(context.TODO(), ...,
client.HRIS.Directory.ListIndividuals(context.TODO(), ...,
// Override the header
option.WithHeader("X-Some-Header", "some_other_custom_header_info"),
// Add an undocumented field to the request body, using sjson syntax
Expand All @@ -159,11 +159,11 @@ This library provides some conveniences for working with paginated list endpoint
You can use `.ListAutoPaging()` methods to iterate through items across all pages:

```go
iter := client.ATS.Jobs.ListAutoPaging(context.TODO(), finchgo.ATSJobListParams{})
iter := client.HRIS.Directory.ListIndividualsAutoPaging(context.TODO(), finchgo.HRISDirectoryListIndividualsParams{})
// Automatically fetches more pages as needed.
for iter.Next() {
job := iter.Current()
fmt.Printf("%+v\n", job)
directory := iter.Current()
fmt.Printf("%+v\n", directory)
}
if err := iter.Err(); err != nil {
panic(err.Error())
Expand All @@ -174,10 +174,10 @@ Or you can use simple `.List()` methods to fetch a single page and receive a sta
with additional helper methods like `.GetNextPage()`, e.g.:

```go
page, err := client.ATS.Jobs.List(context.TODO(), finchgo.ATSJobListParams{})
page, err := client.HRIS.Directory.ListIndividuals(context.TODO(), finchgo.HRISDirectoryListIndividualsParams{})
for page != nil {
for _, job := range page.Jobs {
fmt.Printf("%+v\n", job)
for _, directory := range page.Individuals {
fmt.Printf("%+v\n", directory)
}
page, err = page.GetNextPage()
}
Expand Down
56 changes: 0 additions & 56 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,62 +112,6 @@ Methods:
- <code title="get /employer/benefits/{benefit_id}/individuals">client.HRIS.Benefits.Individuals.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#HRISBenefitIndividualService.GetManyBenefits">GetManyBenefits</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, benefitID <a href="https://pkg.go.dev/builtin#string">string</a>, query <a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#HRISBenefitIndividualGetManyBenefitsParams">HRISBenefitIndividualGetManyBenefitsParams</a>) (<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#SinglePage">SinglePage</a>[<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#IndividualBenefit">IndividualBenefit</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="delete /employer/benefits/{benefit_id}/individuals">client.HRIS.Benefits.Individuals.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#HRISBenefitIndividualService.UnenrollMany">UnenrollMany</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, benefitID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#HRISBenefitIndividualUnenrollManyParams">HRISBenefitIndividualUnenrollManyParams</a>) (<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#SinglePage">SinglePage</a>[<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#UnenrolledIndividual">UnenrolledIndividual</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

# ATS

## Candidates

Response Types:

- <a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#Candidate">Candidate</a>

Methods:

- <code title="get /ats/candidates/{candidate_id}">client.ATS.Candidates.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#ATSCandidateService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, candidateID <a href="https://pkg.go.dev/builtin#string">string</a>) (<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#Candidate">Candidate</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /ats/candidates">client.ATS.Candidates.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#ATSCandidateService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#ATSCandidateListParams">ATSCandidateListParams</a>) (<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#CandidatesPage">CandidatesPage</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

## Applications

Response Types:

- <a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#Application">Application</a>

Methods:

- <code title="get /ats/applications/{application_id}">client.ATS.Applications.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#ATSApplicationService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, applicationID <a href="https://pkg.go.dev/builtin#string">string</a>) (<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#Application">Application</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /ats/applications">client.ATS.Applications.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#ATSApplicationService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#ATSApplicationListParams">ATSApplicationListParams</a>) (<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#ApplicationsPage">ApplicationsPage</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

## Stages

Response Types:

- <a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#Stage">Stage</a>

Methods:

- <code title="get /ats/stages">client.ATS.Stages.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#ATSStageService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>) (<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#SinglePage">SinglePage</a>[<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#Stage">Stage</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

## Jobs

Response Types:

- <a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#Job">Job</a>

Methods:

- <code title="get /ats/jobs/{job_id}">client.ATS.Jobs.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#ATSJobService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, jobID <a href="https://pkg.go.dev/builtin#string">string</a>) (<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#Job">Job</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /ats/jobs">client.ATS.Jobs.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#ATSJobService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#ATSJobListParams">ATSJobListParams</a>) (<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#JobsPage">JobsPage</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

## Offers

Response Types:

- <a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#Offer">Offer</a>

Methods:

- <code title="get /ats/offers/{offer_id}">client.ATS.Offers.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#ATSOfferService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, offerID <a href="https://pkg.go.dev/builtin#string">string</a>) (<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#Offer">Offer</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /ats/offers">client.ATS.Offers.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#ATSOfferService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#ATSOfferListParams">ATSOfferListParams</a>) (<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go">finchgo</a>.<a href="https://pkg.go.dev/github.com/Finch-API/finch-api-go#OffersPage">OffersPage</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

# Providers

Response Types:
Expand Down
34 changes: 0 additions & 34 deletions ats.go

This file was deleted.

217 changes: 0 additions & 217 deletions atsapplication.go

This file was deleted.

Loading