qoery
v0.5.0
Published
Every_number_on_the_internet
Readme
qoery
Qoery - JavaScript client for qoery Qoetry API for dataset collection and management. Start dataset collection jobs, monitor their progress, and download results as CSV files.
Authentication
All endpoints require API key authentication (except /health and /).
You can provide your API key via:
- Query parameter:
?api_key=your_api_key - Header:
x-api-key: your_api_key - Header:
Authorization: Bearer your_api_key
Rate Limits
API calls are subject to monthly quotas based on your subscription plan.
Quota information is available via the /v0/usage endpoint.
This SDK is automatically generated by the OpenAPI Generator project:
- API version: 0.5.0
- Package version: 0.5.0
- Generator version: 7.14.0
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen For more information, please visit https://qoery.com
Installation
For Node.js
npm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install qoery --saveFinally, you need to build the module:
npm run buildLocal development
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:
npm installNext, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:
npm linkTo use the link you just defined in your project, switch to the directory you want to use your qoery from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>Finally, you need to build the module:
npm run buildgit
If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:
npm install GIT_USER_ID/GIT_REPO_ID --saveFor browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.jsThen include bundle.js in the HTML pages.
Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}Getting Started
Please follow the installation instruction and execute the following JS code:
var Qoery = require('qoery');
var defaultClient = Qoery.ApiClient.instance;
// Configure API key authorization: ApiKeyHeader
var ApiKeyHeader = defaultClient.authentications['ApiKeyHeader'];
ApiKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyHeader.apiKeyPrefix['x-api-key'] = "Token"
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['api_key'] = "Token"
// Configure Bearer (API_KEY) access token for authorization: BearerAuth
var BearerAuth = defaultClient.authentications['BearerAuth'];
BearerAuth.accessToken = "YOUR ACCESS TOKEN"
var api = new Qoery.DatasetsApi()
var jobId = "20251110_151628"; // {String} Unique identifier for the job
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.downloadDatasetCsv(jobId, callback);
Documentation for API Endpoints
All URIs are relative to https://api.qoery.com
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- Qoery.DatasetsApi | downloadDatasetCsv | GET /v0/datasets/{job_id}/csv | Download the CSV file Qoery.DatasetsApi | getDatasetJobStatus | GET /v0/datasets/{job_id} | Get job status and progress Qoery.DatasetsApi | listDatasetsOrStartJob | GET /v0/datasets | List API endpoints or start a dataset collection job Qoery.DatasetsApi | startDatasetJob | POST /v0/datasets | Start a new dataset collection job Qoery.HealthApi | healthCheck | GET /health | Health Check Qoery.HealthApi | rootStatus | GET / | Root Status Qoery.PlansApi | listPlans | GET /v0/plans | List subscription plans and endpoint limits Qoery.UsageApi | getUsageStats | GET /v0/usage | Get usage statistics
Documentation for Models
- Qoery.ApiInfo
- Qoery.EndpointUsage
- Qoery.ErrorResponse
- Qoery.GetDatasetJobStatus200Response
- Qoery.GetDatasetJobStatus200ResponseProgress
- Qoery.GetUsageStats200Response
- Qoery.GetUsageStats200ResponseEndpointBreakdownInner
- Qoery.HealthResponse
- Qoery.JobProgress
- Qoery.JobStartRequest
- Qoery.JobStartResponse
- Qoery.JobStatus
- Qoery.ListDatasetsOrStartJob200Response
- Qoery.ListDatasetsOrStartJob200ResponseOneOf
- Qoery.ListDatasetsOrStartJob200ResponseOneOf1
- Qoery.ListDatasetsOrStartJob400Response
- Qoery.ListDatasetsOrStartJob429Response
- Qoery.ListPlans200Response
- Qoery.ListPlans200ResponsePlansValue
- Qoery.ListPlans200ResponsePlansValueAnnualPrice
- Qoery.ListPlans200ResponsePlansValueApiKeys
- Qoery.ListPlans200ResponsePlansValueMonthlyPrice
- Qoery.Plan
- Qoery.PlanPrice
- Qoery.PlansResponse
- Qoery.RootStatus200Response
- Qoery.StartDatasetJobRequest
- Qoery.UsageStats
Documentation for Authorization
Authentication schemes defined for the API:
ApiKeyAuth
- Type: API key
- API key parameter name: api_key
- Location: URL query string
ApiKeyHeader
- Type: API key
- API key parameter name: x-api-key
- Location: HTTP header
BearerAuth
- Type: Bearer authentication (API_KEY)
