kinto
Module kinto
API
ballerinax/kinto Ballerina library
Overview
This is a generated connector for Kinto API v1.22 OpenAPI specification.
The Kinto API provides the capability to store and retrieve JSON data.
Quickstart
To use the Kinto connector in your Ballerina application, update the .bal file as follows:
Step 1: Import connector
Import the ballerinax/kinto module into the Ballerina project.
import ballerinax/kinto;
Step 2: Create a new connector instance
kinto:Client kintoClient = check new();
Step 3: Invoke connector operation
-
Now you can use the operations available within the connector. Note that they are in the form of remote operations.
Following is an example on how to get buckets using the connector.public function main() returns error? { Schema entity = check kintoClient->getBuckets(); }
-
Use
bal run
command to compile and run the Ballerina program.
Clients
kinto: Client
This is a generated connector for Kinto v1.22 OpenAPI specification. The Kinto API provides the capability to store and retrieve JSON data.
Constructor
Gets invoked to initialize the connector
.
The connector initialization does not require setting the API credentials.
init (ConnectionConfig config, string serviceUrl)
- config ConnectionConfig {} - The configurations to be used when initializing the
connector
- serviceUrl string "https://firefox.settings.services.mozilla.com/v1" - URL of the target service
serverInfo
function serverInfo() returns json|error
Return Type
- json|error - Return information about the running Instance.
getOpenapiSpec
function getOpenapiSpec() returns json|error
Return Type
- json|error - Return an OpenAPI description of the running instance.
heartbeat
function heartbeat() returns json|error
Return Type
- json|error - Server is working properly.
lbheartbeat
function lbheartbeat() returns json|error
Return Type
- json|error - Returned if server is reachable.
getversion
function getversion() returns json|error
Return Type
- json|error - Return the running Instance version information.
batch
function batch(BatchPayloadSchema payload) returns BatchResponseBodySchema|error
Parameters
- payload BatchPayloadSchema - Batch
Return Type
- BatchResponseBodySchema|error - Return a list of operation responses.
getBuckets
function getBuckets(int? 'limit, string[]? sort, string? token, int? since, int? to, int? before, string? id, int? lastModified, string[]? fields, string? ifMatch, string? ifNoneMatch) returns Schema|error
Parameters
- 'limit int? (default ()) - Limit
- sort string[]? (default ()) - Sort
- token string? (default ()) - Token
- since int? (default ()) - Since
- to int? (default ()) - To
- before int? (default ()) - Before
- id string? (default ()) - ID
- lastModified int? (default ()) - Last modified
- fields string[]? (default ()) - Fields
- ifMatch string? (default ()) - If match
- ifNoneMatch string? (default ()) - If none match
getChanges
function getChanges(int? 'limit, string[]? sort, string? token, int? since, int? to, int? before, string? id, int? lastModified, string[]? fields, string? ifMatch, string? ifNoneMatch) returns Schema1|error
Parameters
- 'limit int? (default ()) - Limit
- sort string[]? (default ()) - Sort
- token string? (default ()) - Token
- since int? (default ()) - Since
- to int? (default ()) - To
- before int? (default ()) - Before
- id string? (default ()) - ID
- lastModified int? (default ()) - Last modified
- fields string[]? (default ()) - Fields
- ifMatch string? (default ()) - If match
- ifNoneMatch string? (default ()) - If none match
getCollectionChangeset
function getCollectionChangeset(string bid, string cid, string expected, string? since, int? 'limit, string? bucket, string? collection) returns Response|error
Parameters
- bid string - bid
- cid string - cid
- expected string - Expected
- since string? (default ()) - Since
- 'limit int? (default ()) - Limit
- bucket string? (default ()) - Bucket
- collection string? (default ()) - Collection
getCollections
function getCollections(string bucketId, int? 'limit, string[]? sort, string? token, int? since, int? to, int? before, string? id, int? lastModified, string[]? fields, string? ifMatch, string? ifNoneMatch) returns Schema2|error
Parameters
- bucketId string - Bucket ID
- 'limit int? (default ()) - Limit
- sort string[]? (default ()) - Sort
- token string? (default ()) - Token
- since int? (default ()) - Since
- to int? (default ()) - To
- before int? (default ()) - Before
- id string? (default ()) - ID
- lastModified int? (default ()) - Last modified
- fields string[]? (default ()) - Fields
- ifMatch string? (default ()) - If match
- ifNoneMatch string? (default ()) - If none match
getRecords
function getRecords(string bucketId, string collectionId, int? 'limit, string[]? sort, string? token, int? since, int? to, int? before, string? id, int? lastModified, string[]? fields, string? ifMatch, string? ifNoneMatch) returns Schema3|error
Parameters
- bucketId string - Bucket ID
- collectionId string - Collection ID
- 'limit int? (default ()) - Limit
- sort string[]? (default ()) - Sort
- token string? (default ()) - Token
- since int? (default ()) - Since
- to int? (default ()) - To
- before int? (default ()) - Before
- id string? (default ()) - ID
- lastModified int? (default ()) - Last modified
- fields string[]? (default ()) - Fields
- ifMatch string? (default ()) - If match
- ifNoneMatch string? (default ()) - If none match
getRecord
function getRecord(string bucketId, string collectionId, string id, string[]? fields, string? ifMatch, string? ifNoneMatch) returns ObjectSchema|error
Parameters
- bucketId string - Bucket ID
- collectionId string - Collection ID
- id string - ID
- fields string[]? (default ()) - Fields
- ifMatch string? (default ()) - If match
- ifNoneMatch string? (default ()) - If none match
Return Type
- ObjectSchema|error - Return the target object.
createAttachment
deleteAttachment
getCollection
function getCollection(string bucketId, string id, string[]? fields, string? ifMatch, string? ifNoneMatch) returns Objectschema1|error
Parameters
- bucketId string - Bucket ID
- id string - ID
- fields string[]? (default ()) - Fields
- ifMatch string? (default ()) - If match
- ifNoneMatch string? (default ()) - If none match
Return Type
- Objectschema1|error - Return the target object.
getGroups
function getGroups(string bucketId, int? 'limit, string[]? sort, string? token, int? since, int? to, int? before, string? id, int? lastModified, string[]? fields, string? ifMatch, string? ifNoneMatch) returns Schema4|error
Parameters
- bucketId string - Bucket ID
- 'limit int? (default ()) - Limit
- sort string[]? (default ()) - Sort
- token string? (default ()) - Token
- since int? (default ()) - Since
- to int? (default ()) - To
- before int? (default ()) - Before
- id string? (default ()) - ID
- lastModified int? (default ()) - Last modified
- fields string[]? (default ()) - Fields
- ifMatch string? (default ()) - If match
- ifNoneMatch string? (default ()) - If none match
getGroup
function getGroup(string bucketId, string id, string[]? fields, string? ifMatch, string? ifNoneMatch) returns Objectschema2|error
Parameters
- bucketId string - Bucket ID
- id string - ID
- fields string[]? (default ()) - Fields
- ifMatch string? (default ()) - If match
- ifNoneMatch string? (default ()) - If none match
Return Type
- Objectschema2|error - Return the target object.
getBucket
function getBucket(string id, string[]? fields, string? ifMatch, string? ifNoneMatch) returns Objectschema3|error
Parameters
- id string - ID
- fields string[]? (default ()) - Fields
- ifMatch string? (default ()) - If match
- ifNoneMatch string? (default ()) - If none match
Return Type
- Objectschema3|error - Return the target object.
contribute
function contribute() returns json|error
Return Type
- json|error - Return open source contributing information.
getBlocklist
function getBlocklist(string prefix, string apiVer, string applicationGuid, string applicationVer, string metrics, string apiVerD, string metricsParam) returns Response|error
Records
kinto: BatchPayloadSchema
Fields
- defaults Defaults? -
- requests BatchRequests[] -
kinto: BatchRequests
Fields
- body record {}? -
- headers record {}? -
- method string? -
- path string -
kinto: BatchResponseBodySchema
Fields
kinto: ClientHttp1Settings
Provides settings related to HTTP/1.x protocol.
Fields
- keepAlive KeepAlive(default http:KEEPALIVE_AUTO) - Specifies whether to reuse a connection for multiple requests
- chunking Chunking(default http:CHUNKING_AUTO) - The chunking behaviour of the request
- proxy ProxyConfig? - Proxy server related options
kinto: ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings? - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings? - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded
/x-forwarded
header
- poolConfig PoolConfiguration? - Configurations associated with request pooling
- cache CacheConfig? - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig? - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig? - Configurations associated with retrying
- responseLimits ResponseLimitConfigs? - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket? - SSL/TLS-related options
- proxy ProxyConfig? - Proxy server related options
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
kinto: Defaults
Fields
- body record {}? -
- headers record {}? -
- method string? -
- path string? -
kinto: ErrorSchema
Fields
- code int -
- details anydata? -
- errno int -
- 'error string -
- info string? -
- message string? -
kinto: ObjectSchema
Fields
- data record {}? -
kinto: Objectschema1
Fields
- data record { cache_expires int, schema record {} }? -
kinto: Objectschema2
Fields
- data record { members string[] }? -
kinto: Objectschema3
Fields
- data record { 'collection\:schema record {}, 'group\:schema record {}, 'record\:schema record {} }? -
kinto: ProxyConfig
Proxy server configurations to be used with the HTTP client endpoint.
Fields
- host string(default "") - Host name of the proxy server
- port int(default 0) - Proxy server port
- userName string(default "") - Proxy server username
- password string(default "") - Proxy server password
kinto: Schema
Fields
- data record { 'collection\:schema record {}, 'group\:schema record {}, 'record\:schema record {} }[]? -
kinto: Schema1
Fields
kinto: Schema2
Fields
- data record { cache_expires int, schema record {} }[]? -
kinto: Schema3
Fields
- data record {}[]? -
kinto: Schema4
Fields
- data record { members string[] }[]? -
Import
import ballerinax/kinto;
Metadata
Released date: over 1 year ago
Version: 1.5.1
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.4.1
GraalVM compatible: Yes
Pull count
Total: 1
Current verison: 1
Weekly downloads
Keywords
Website & App Building/App Builders
Cost/Free
Contributors
Dependencies