1.0.0 • Published 14 days ago

@ptkhanh94npm/nesciunt-ipsam-dignissimos v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
14 days ago

Lokalise API v2 official Node.js client

npm CI Coverage Status Downloads total

Official Node interface for the Lokalise API.

Quickstart

Please note that starting from version 9 this SDK is a pure ESM module. It does not provide a CommonJS export (require) anymore. Therefore you should either convert your project to ESM, use dynamic import (please find an example below), or stay on version 8.

Install the library:

npm install @ptkhanh94npm/nesciunt-ipsam-dignissimos

Obtain Lokalise API token in your personal profile, initialize and use the client:

import { LokaliseApi } from "@ptkhanh94npm/nesciunt-ipsam-dignissimos";

const lokaliseApi = new LokaliseApi({ apiKey: '<apiKey>'});
const projects = await lokaliseApi.projects().list();
projects.items[0].name;

process = await lokaliseApi.files().upload(project_id,
  {data: data_base64, filename: 'test1.json', lang_iso: 'en'})
process.status // => 'queued'

Alternatively, you can use tokens obtained via OAuth2 (don't forget that these tokens have expiration dates):

import { LokaliseApiOAuth } from "@ptkhanh94npm/nesciunt-ipsam-dignissimos";

const lokaliseApi = new LokaliseApiOAuth({ apiKey: '<apiKeyObtainedViaOauth2>' });

const projects = lokaliseApi.projects().list();

Here's an example using dynamic import:

(async function () {
  const LokaliseApi = await (import('@ptkhanh94npm/nesciunt-ipsam-dignissimos').then(m => m.LokaliseApi));
  const lokaliseApi = new LokaliseApi({ apiKey: LOKALISE_API_TOKEN});

  // use lokaliseApi here as usual...
})();

Usage

Detailed documentation can be found at lokalise.github.io/node-lokalise-api.

You can also check this repo containing some usage examples and this blog post with explanations. Finally, you might be interested in our free course "Lokalise for developers" that showcases Node SDK usage.

License

This library is licensed under the BSD 3 Clause. Prior to version 5.1.0 the license was MIT.

Copyright (c) Lokalise group and Ilya Krukowski

es-shim APIArray.prototype.containsprettymonoreponegative zeroreusebootstrap cssArrayBufferString.prototype.trimlaunchcall-bindUint8ArrayUnderscoreprivatestringifyargparsefindLastIndexchildoptimizerapollomake dirwidthstatustc39pureinferencepackagesflagdatecomparedomcalliterationcolumnswalkprotocol-bufferscoerciblecoreapitostringtagimportreact animationintrinsiclimitwhichformattingrequestemojierror-handlingtypesafegetECMAScript 6css lesses-shimsassertfsgestureslengthvestTypeScriptPromisestreamsclicommandflattenwebsitearktypebufferes2016Array.prototype.flattenindicatorwritetakefast-clonebyteLengthObject.definePropertywatchingfunctionalcheckchaiaccessibilityopenjasmineBigUint64Arrayjsoncodescryptoes-abstractbabel-corecallbackguidhashless csspackagebrowserslistsymlinksentriesjsonpathvalueopenerweakmapgetterwebtslibcreatexdg-openasciifastifyfastHyBiES2022classnamereact posesortinspectArray.prototype.findLastIndexRFC-6455streamargumentcallboundbundlingfantasy-landregexp256errorargsECMAScript 2015parseenvironmentES5clonefast-copyjsonschemahasimmeruuidvariables in cssurlsjsxarraybufferanimationshebangl10nvalidatorconcatMapmime-dbdependenciescall-boundpyyamlmomentfromruntimewatcherpruneramdaarrayskarmadescriptorflatassertstranspile-0internal slotprocessfindupispicomatchObject.valuesiteratorponyfillsigintmatchexit-codezodjQueryES2015eslintpluginttyRegExp#flagsreadabletoArrayvalidreact-testing-librarycachecurloncesanitizationdom-testing-librarytrimStartcolourfullUint16Arrayremovesyntaxerrorupbundler3dURLSearchParamssomeECMAScript 2017speedurlmodulesMapTypeBoxpolyfillkeysyamlvalidatereduceES2018linkfpforEachvarObservableconfigurablemetadataMicrosoftECMAScript 2019sortedtypeschemaequalityfind-uphardlinksrangeerrorlazymatchAllstyled-componentsnamescomputed-typesjapaneseconstarguments.envspinnerssigtermmkdirInt32Arraylibphonenumberbabelauthgdprargvpostcss-pluginstylingECMAScript 2020lrureal-timeeventEmittergrouppreserve-symlinksdayjsnegativeUint32ArrayutilArrayBuffer#slicecorseditorglobdataviewquotedeepgenericsbreakJSON-SchemapositiveSetStyleSheetdataajaxcompile lessECMAScript 5findbindredactexitpatches7flatMapharmonyBigInt64Arrayoptioncolorsstarterchannelstylesheetgradients cssESnextes6String.prototype.matchAllbuffersshamAsyncIteratortypedxhrpnpm9rfc4122concattoSortedquerystringfull-widthdefineeventsform-validationcallbindYAMLcommand-linesymbolssuperagentdataVieweveryposesharedarraybuffertoolkitclientes2017unicodeplugincolorhigher-orderwindowsstructuredCloneansinested cssfast-deep-copycjkgradients css3isConcatSpreadabledropfunctionshelpersidlesymlinklockfilepostcssframerES2020mapview0extensionmakepreprocessordescriptorsArray.prototype.flatastmixinsminimalrobustObject.fromEntriesexecutabledependency managercensorcommanderjavascripteslintconfigtypescriptgraphqlbootstrap lessObservablesconfigtypedarraysschemereactiefigletwhatwgio-tsvisualnodejsobjletcircularnumberqueryscheme-validationsliceasyncsymbolpropertiesparserarrayencryptionperformantfast-deep-clonewatchbyteOffsetmulti-packagerandomjson-schema-validationWebSocketcss-in-jsobjectES2021debugtimeObject.entriesrgbfixed-widthFloat64ArraytestgetOwnPropertyDescriptores2015containsconcurrencypathshellRxJScollectionelectronutilitiesvariablesPushsafeES8batchyupinstallerconsolegroupBysignalTypedArrayregexObject.isECMAScript 2021modulecolumnlastnameextraboundthroatprototypestylessignalsWeakSetRegExp.prototype.flagsdeep-copyjson-schema-validatorless.jsbcrypttrimEndESes5ECMAScript 2018lintkoreansetestreeArray.prototype.findLastsyntaxsettingsfullwidthspringsuperstructstarttoobjectparentsmatchesenumerablelookwrapsetPrototypeOfpopmotionsearch__proto__file systemtypanionwaapiapploggerawesomesaucesetImmediateRxECMAScript 2016performanceworkernpmpropdescriptionObject.keysfilterbddtraversejsmergeuser-streamsiteratewalkingxtermbrowserlistwordwrapnodeframeworkpromisestrimLeftECMAScript 7formatautoprefixerchromeeslintSymbol.toStringTagmovecharacterqsECMAScript 2023ES2017_.extendStreammochaequalmiddlewaregetintrinsicformshasOwnspawnutil.inspectartescapeObject.assigntypedarraysidelook-upwaitvalueslinuxconsumetouchpromiseratelimit6to5immutablesharedinterruptsfunctionthrottleES7trimRightoutputshimlesscssFloat32ArraycryptES2016typed arraytsfastcloneECMAScript 2022hooksdebuggerlinewrapcompilerless mixinsES2023connectcopyES6IteratordefinePropertymimetypesaccessorbrowsercss nestingreadablestreamtesterjoiairbnbSymboleventDispatcherpassword@@toStringTagauthenticationreduxgetoptwatchFilestatelessrequirequeuetypeofformFunction.prototype.namerm -rfclassnamesArrayBuffer.prototype.slicetelephonecmdchineseReflect.getPrototypeOfa11ycss variablewordbreakes8slotmkdirpmkdirstapeomitstringifierserializerdefaultmimeexpressinputtestingjsdiffArray.prototype.filteri18nsetterawaitfastcopyInt8ArraylogArraysequenceinstallstreams2recursiveJSONregular expressionserializationprogresspoint-freepackage.jsonpushutilityfetchdeleteweaksethttpES3directoryObject.getPrototypeOfshrinkwrapredux-toolkitinternal$.extendtoolsUint8ClampedArrayserializejson-schemaStreamsidECMAScript 3east-asian-widthfindLastfoldersameValueZerooptimistxdgpersistentexeregular expressionsassertionavachromiumjestcode pointsjsdomArray.prototype.flatMaploggingspinnerthreeuninstallcollection.es6operating-systemwgethandlerspipespecprotobufdiffcurriedexecenvpropertytoStringTagclass-validatorreadtapphonestyleES2019deepcopyendersanitizebanneropenstypeerror[[Prototype]]rateURLstablemruresolveextenddirbytedeepclonedotenvzerotacittypesprefixfileworkspace:*writableprotobluebirddragutilsesrmdirnativedeterministicreducermacosCSSStyleDeclarationrmqueueMicrotaskefficienttranspilerclassesjwttddnopelistenersrm -frprivate datahttpsObjectoffsetcssdeep-clonetextArray.prototype.includesdatastructureassignWebSocketsReactiveExtensionsbusyirqInt16Arrayless compilervalidationtermfseventsecmascriptWeakMapReactiveXlimitedduplexlanguagegetPrototypeOflesspackage managertrimmobilehookformkeyeslint-plugintaskstyleguidees2018xssterminalcharactersstringinvariantloadingreact-hooksrapidparentflagsemitincludeswarning
1.0.0

14 days ago