Official Pescheck API client - part of the pescheck-clients SDKs.
pescheck-client
Pescheck - the Ruby gem for the Pescheck API
Official client library for the Pescheck API (v2), generated from the OpenAPI specification. Authenticate with OAuth2 client credentials and use the checks, profiles, screenings, webhooks and divisions endpoints. See https://github.com/pescheckit/pescheck-clients for installation and usage.
This SDK is automatically generated by the OpenAPI Generator project:
- API version: 2.0.0
- Package version: 0.1.0
- Generator version: 7.23.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
Installation
Build a gem
To build the Ruby code into a gem:
gem build pescheck-client.gemspec
Then either install the gem locally:
gem install ./pescheck-client-0.1.0.gem
(for development, run gem install --dev ./pescheck-client-0.1.0.gem to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'pescheck-client', '~> 0.1.0'
Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/pescheckit/pescheck-clients, then add the following in the Gemfile:
gem 'pescheck-client', :git => 'https://github.com/pescheckit/pescheck-clients.git'
Include the Ruby code directly
Include the Ruby code directly using -I as follows:
ruby -Ilib script.rb
Getting Started
Please follow the installation procedure and then run the following code:
# Load the gem
require 'pescheck-client'
# Setup authorization
Pescheck.configure do |config|
# Configure OAuth2 access token for authorization: oauth2
config.access_token = 'YOUR ACCESS TOKEN'
# Configure a proc to get access tokens in lieu of the static access_token configuration
config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' }
# Configure faraday connection
config.configure_faraday_connection { |connection| 'YOUR CONNECTION CONFIG PROC' }
end
api_instance = Pescheck::AuthenticationApi.new
jwt_generation = Pescheck::JWTGeneration.new({email: 'email_example', password: 'password_example'}) # JWTGeneration |
begin
result = api_instance.generate_jwt_token2(jwt_generation)
p result
rescue Pescheck::ApiError => e
puts "Exception when calling AuthenticationApi->generate_jwt_token2: #{e}"
end
Documentation for API Endpoints
All URIs are relative to https://api.pescheck.io
| Class | Method | HTTP request | Description |
|---|---|---|---|
| Pescheck::AuthenticationApi | generate_jwt_token2 | POST /api/v2/jwt/generate/ | |
| Pescheck::AuthenticationApi | jwt_create | POST /api/jwt/ | |
| Pescheck::AuthenticationApi | jwt_refresh_create | POST /api/jwt/refresh/ | |
| Pescheck::ChecksApi | v2_checks_list | GET /api/v2/checks/ | |
| Pescheck::ChecksApi | v2_checks_retrieve | GET /api/v2/checks/check_type/ | |
| Pescheck::DivisionsApi | v2_organisations_divisions_create | POST /api/v2/organisations/divisions/ | |
| Pescheck::DivisionsApi | v2_organisations_divisions_list | GET /api/v2/organisations/divisions/ | |
| Pescheck::DivisionsApi | v2_organisations_divisions_partial_update | PATCH /api/v2/organisations/divisions/id/ | |
| Pescheck::DivisionsApi | v2_organisations_divisions_retrieve | GET /api/v2/organisations/divisions/id/ | |
| Pescheck::DivisionsApi | v2_organisations_divisions_update | PUT /api/v2/organisations/divisions/id/ | |
| Pescheck::OAuthApi | create_o_auth_application2 | POST /api/v2/oauth/applications/ | |
| Pescheck::OAuthApi | delete_o_auth_application2 | DELETE /api/v2/oauth/applications/application_id/ | |
| Pescheck::OAuthApi | list_o_auth_applications2 | GET /api/v2/oauth/applications/list/ | |
| Pescheck::ProfilesApi | v2_profiles_create | POST /api/v2/profiles/ | |
| Pescheck::ProfilesApi | v2_profiles_destroy | DELETE /api/v2/profiles/id/ | |
| Pescheck::ProfilesApi | v2_profiles_list | GET /api/v2/profiles/ | |
| Pescheck::ProfilesApi | v2_profiles_partial_update | PATCH /api/v2/profiles/id/ | |
| Pescheck::ProfilesApi | v2_profiles_retrieve | GET /api/v2/profiles/id/ | |
| Pescheck::ProfilesApi | v2_profiles_update | PUT /api/v2/profiles/id/ | |
| Pescheck::ScreeningsApi | v2_screenings_create | POST /api/v2/screenings/ | |
| Pescheck::ScreeningsApi | v2_screenings_documents_list | GET /api/v2/screenings/id/documents/ | Retrieve screening documents |
| Pescheck::ScreeningsApi | v2_screenings_list | GET /api/v2/screenings/ | |
| Pescheck::ScreeningsApi | v2_screenings_retrieve | GET /api/v2/screenings/id/ | |
| Pescheck::WebhooksApi | create_webhook2 | POST /api/v2/webhooks/ | |
| Pescheck::WebhooksApi | delete_webhook2 | DELETE /api/v2/webhooks/webhook_id/ | |
| Pescheck::WebhooksApi | list_webhooks2 | GET /api/v2/webhooks/list/ | |
| Pescheck::WebhooksApi | verify_webhook2 | POST /api/v2/webhooks/webhook_id/verify/ |
Documentation for Models
- Pescheck::CustomTokenObtainPair
- Pescheck::DivisionReadOnly
- Pescheck::DivisionWrite
- Pescheck::JWTGeneration
- Pescheck::JWTResponse
- Pescheck::OAuthApplication
- Pescheck::OAuthApplicationResponse
- Pescheck::PaginatedDivisionReadOnlyList
- Pescheck::PaginatedV2ProfileListItemList
- Pescheck::PaginatedV2ScreeningListItemList
- Pescheck::PatchedDivisionWrite
- Pescheck::PatchedV2ProfilePartialUpdate
- Pescheck::TokenRefresh
- Pescheck::V2Candidate
- Pescheck::V2CheckField
- Pescheck::V2CheckInfo
- Pescheck::V2Document
- Pescheck::V2DocumentContent
- Pescheck::V2Money
- Pescheck::V2ProfileCheck
- Pescheck::V2ProfileCheckEntry
- Pescheck::V2ProfileCreate
- Pescheck::V2ProfileDetail
- Pescheck::V2ProfileListItem
- Pescheck::V2ProfileUpdate
- Pescheck::V2ProfileUpdateCheck
- Pescheck::V2ScreeningCheck
- Pescheck::V2ScreeningCheckEntry
- Pescheck::V2ScreeningCheckListItem
- Pescheck::V2ScreeningCreate
- Pescheck::V2ScreeningDetail
- Pescheck::V2ScreeningDetailProfile
- Pescheck::V2ScreeningListItem
- Pescheck::VerifyWebhook
- Pescheck::Webhook
- Pescheck::WebhookResponse
Documentation for Authorization
Authentication schemes defined for the API:
cookieAuth
- Type: API key
- API key parameter name: __Secure-sessionid
- Location:
jwtAuth
- Type: Bearer authentication (JWT)
oauth2
- Type: OAuth
- Flow: application
- Authorization URL:
-
Scopes:
- read:api: read groups
- create:api: create groups
- update:api: update groups