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 (ClientConfiguration clientConfig, string serviceUrl)
- clientConfig ClientConfiguration {} - 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: 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: 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: almost 3 years ago
Version: 1.1.0
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: slbeta6
GraalVM compatible: Yes
Pull count
Total: 0
Current verison: 0
Weekly downloads
Keywords
Website & App Building/App Builders
Cost/Free
Contributors
Dependencies