@snokam/crypto-client
v1.2.3
Published
OpenAPI client for @snokam/crypto-client
Readme
@snokam/[email protected]
A TypeScript SDK client for the crypto.api.snokam.no API.
Usage
First, install the SDK from npm.
npm install @snokam/crypto-client --saveNext, try it out.
import {
Configuration,
CryptoClient,
} from '@snokam/crypto-client';
import type { DatabaseValidationRequest } from '@snokam/crypto-client';
async function example() {
console.log("🚀 Testing @snokam/crypto-client SDK...");
const config = new Configuration({
// To configure OAuth2 access token for authorization: Implicit implicit
accessToken: "YOUR ACCESS TOKEN",
});
const api = new CryptoClient(config);
try {
const data = await api.databaseValidation();
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);Documentation
API Endpoints
All URIs are relative to https://crypto.api.snokam.no
| Class | Method | HTTP request | Description | ----- | ------ | ------------ | ------------- CryptoClient | databaseValidation | GET /v1.0/database-validation | CryptoClient | getBtcAccount | GET /v1.0/account | CryptoClient | getBtcToNokSpotPrice | GET /v1.0/btc-nok | CryptoClient | getDailySalaries | GET /v1.0/salaries/daily | CryptoClient | getEmployeesWithInnovativeSalary | GET /v1.0/employees | CryptoClient | getEurAccount | GET /v1.0/account/eur | CryptoClient | getMyDailySalary | GET /v1.0/salary/daily/me | CryptoClient | getMyTransactionsSummary | GET /v1.0/summary/me | CryptoClient | getStatistics | GET /v1.0/statistics | CryptoClient | getTransaction | GET /v1.0/transactions/{id} | CryptoClient | getTransactions | GET /v1.0/transactions | CryptoClient | getTransactionsSummaries | GET /v1.0/summaries | CryptoClient | getTransactionsSummary | GET /v1.0/summary | CryptoClient | getUser | GET /v1.0/user | CryptoClient | payDailySalaries | GET /v1.0/salaries/daily/pay | CryptoClient | saveCoinbaseTransactionsToCosmos | GET /v1.0/save-coinbase-transactions-to-cosmos |
Models
- Account
- AccountBalance
- AccountCurrency
- Amount
- Basis
- CryptoBuys
- CryptoSells
- EmployeeTransactionSummary
- Entity
- From
- ISalary
- ModelError
- Money
- Network
- NetworkMoney
- ResponseAccount
- ResponseStatistics
- ResponseTransaction
- ResponseUser
- SanityEmployee
- SanityEmployeeCliftonStrengthsInner
- SanityEmployeeCommissionTier
- SanityEmployeeEquipmentInner
- SanityEmployeeGroupsInner
- SanityEmployeeGroupsInnerLeadersInner
- SanityEmployeeManager
- SanityEmployeeNextOfKinInner
- SanityEmployeeTechnologiesInner
- SanitySystemsInnerDescriptionInner
- SanityTechnologyDescriptionInnerOneOfChildrenInner
- SanityTechnologyDescriptionInnerOneOfMarkDefsInner
- SanityTechnologyWithRelationsParentDescriptionInnerOneOf3MediaInner
- SanityTechnologyWithRelationsProjectsInnerParticipantsInnerImage
- SanityTechnologyWithRelationsProjectsInnerParticipantsInnerTagsInner
- SanityTvCategoryDashboardsInnerBackgroundImage
- SanityTvCategoryDashboardsInnerBackgroundImageAsset
- Slug
- Statistics
- Summary
- Tax
- TimeTransactionSummary
- To
- TodaysSalarySummary
- Transaction
- TransactionSummary
- User
- Warning
Authorization
Authentication schemes defined for the API:
Implicit implicit
- Type: OAuth
- Flow: implicit
- Authorization URL: https://login.microsoftonline.com/81a4f38d-6712-4b65-868b-c3771f9ba91e/oauth2/v2.0/authorize
- Scopes:
api://a2facada-53d1-4545-b1f7-d6aaed170709/user_impersonation: Default function scope
About
This TypeScript SDK client supports the Fetch API and is automatically generated by the OpenAPI Generator project:
- API version:
v1.0.0 - Package version:
1.2.3 - Generator version:
7.17.0 - Build package:
org.openapitools.codegen.languages.TypeScriptFetchClientCodegen
The generated npm module supports the following:
- Environments
- Node.js
- Webpack
- Browserify
- Language levels
- ES5 - you must have a Promises/A+ library installed
- ES6
- Module systems
- CommonJS
- ES6 module system
Development
Building
To build the TypeScript source code, you need to have Node.js and npm installed. After cloning the repository, navigate to the project directory and run:
npm install
npm run buildPublishing
Once you've built the package, you can publish it to npm:
npm publish