Ts-api - This is a Typescript library facilitating usage of Localazy's API.

Related tags

API ts-api
Overview

@localazy/ts-api

This is a Typescript library facilitating usage of Localazy's API. To better understand this library, it is recommended to study the API documentation first.

Installation and usage

To install this library, run the following command

npm i @localazy/ts-api

Afterwards, import the library and initialize it.

import LocalazyApi from '@localazy/ts-api';

const api = LocalazyApi({
    projectToken: "your-project-token"
    // ...additional options
})

Project token

In order to access anything from Localazy, you need to sign up and create a project.

Then, you'll be able to generate a project token here.

See documentation for more information.

Methods overview

listProjects

List projects related to the project token.

async listProjects(options: ListProjects = {}, config: CommonConfig = {});

Documentation: https://localazy.com/docs/api/list-projects

import

Import content into Localazy.

async import(options: Import, config: CommonConfig = {})

Documentation: https://localazy.com/docs/api/import

listFormats

Retrieve list of available file formats and related options.

async listFormats(config: CommonConfig = {})

Documentation: https://localazy.com/docs/api/import#retrieve-a-list-of-available-file-types

listFiles

List Localazy files.

async listFiles(options: ListFiles, config: CommonConfig = {})

Documentation: https://localazy.com/docs/api/files

listKeysInFileForLanguage

This is the main method for retrieving translated content from given project and localazy file for given language.

async listKeysInFileForLanguage(options: ListKeysInFile, config: CommonConfig = {})

Documentation: https://localazy.com/docs/api/files#retrieve-a-list-of-keys-and-translations-from-file

FAQ

Localazy's API supports method that is not included in this library.

It's possible as the API is still actively developed and it might take us some time to update all related projects. Feel free to create a new issue or pull request for this.

I'd like to import and use a type definition for one of the methods. Can I do that?

Yes. We publish type definitions for arguments of all the methods to NPM. They reside in @localazy/ts-api/dist/models, e.g.

import ListProjects from '@localazy/ts-api/dist/models/list-projects';
You might also like...

Mongo Strict is a TypeScript based smart MongoDB ORM, It makes the usage of MongoDB safer, easier and faster with a better performance...

mongo-strict mongo-strict is compatible with mongo = 5 Mongo Strict is a TypeScript-based smart MongoDB ORM, It makes the usage of MongoDB safer, eas

Sep 22, 2022

Common React Native components used by "Roqay" packed in library for usage in future projects.

Roqay Common React Native Components Common React Native components used by Roqay packed in library for usage in future projects. Installation yarn ad

Feb 10, 2022

This repo is for educational and demonstration purposes only, this project is to demonstrate usage of apollo/client and github API and firebase.

This repo is for educational and demonstration purposes only, this project is to demonstrate usage of apollo/client and github API and firebase.

Gissues Gissues is a web application that allows you to search for issues in GitHub. It is built for new developers who want to learn more about GitHu

Oct 1, 2022

Sample project to demonstrate Playwright Test usage, pointing to ServeRest API and Front-end

demo-playwright-test This is a sample project to demonstrate Playwright Test usage, running tests against ServeRest API and Front-end. Pre-requisites

Oct 24, 2022

Simple wrapper for cross-browser usage of the JavaScript Fullscreen API

screenfull Simple wrapper for cross-browser usage of the JavaScript Fullscreen API, which lets you bring the page or any element into fullscreen. Smoo

Dec 30, 2022

NodeJS PostgreSQL database performance insights. Locks, index usage, buffer cache hit ratios, vacuum stats and more.

Node Postgres Extras NodeJS port of Heroku PG Extras with several additions and improvements. The goal of this project is to provide powerful insights

Nov 14, 2022

Kill all Chrome tabs to improve performance, decrease battery usage, and save memory

Kill all Chrome tabs to improve performance, decrease battery usage, and save memory

kill-tabs Kill all Chrome tabs to improve performance, decrease battery usage, and save memory Works on macOS, Linux, Windows. I'm a tab-abuser and I

Jan 8, 2023

A simple project showing the usage of useState, useEffect and conditional rendering in React

Getting Started with Tour-sample React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can ru

Jul 30, 2022

A simple project to refresh on the usage of js canvas and getContext('2d') to create four interactive squares on the canvas when hovered changes color.

A simple project to refresh on the usage of js canvas and getContext('2d') to create four interactive squares on the canvas when hovered changes color. Can also be clicked to work on mobile devices.

Jan 1, 2022

Framework agnostic CLI tool for routes parsing and generation of a type-safe helper for safe route usage. 🗺️ Remix driver included. 🤟

Framework agnostic CLI tool for routes parsing and generation of a type-safe helper for safe route usage. 🗺️ Remix driver included. 🤟

About routes-gen is a framework agnostic CLI tool for routes parsing and generation of a type-safe helper for safe route usage. Think of it as Prisma,

Jan 2, 2023

▶️ Deskreen Youtube channel (video tutorials, demos, use cases for Deskreen day to day usage)

▶️ Deskreen Youtube channel (video tutorials, demos, use cases for Deskreen day to day usage)

▶️ Deskreen Youtube channel (video tutorials, demos, use cases for Deskreen day to day usage)

Jan 31, 2022

The CCF Backstage Plugin is a tool to estimate energy use (kilowatt-hours) and carbon emissions (metric tons CO2e) from public cloud usage that is meant to be consumed as a plugin into a Backstage application

The CCF Backstage Plugin is a tool to estimate energy use (kilowatt-hours) and carbon emissions (metric tons CO2e) from public cloud usage that is meant to be consumed as a plugin into a Backstage application

CCF Backstage Plugin Understand how your cloud usage impacts our environment and what you can do about it. This plugin brings the functionallity of th

Nov 6, 2022

This is a project being built to show the usage of Webpack. It's an application were you are able to add a task to the list, and remove a task from the list

Microverse Project To Do List This is a project being built to show the usage of webpack. Its an application were you are able to add a task to the li

May 6, 2022

Usage Heatmap for Shiny with heatmap.js

Usage Heatmap for Shiny with heatmap.js

shinyHeatmap The goal of {shinyHeatmap} is to provide a free and local alternative to more advanced user tracking platform such as Hotjar. {shinyHeatm

Dec 21, 2022

💪 Reserve machine/rack/bench usage at a gym to minimize waiting times.

💪 Reserve machine/rack/bench usage at a gym to minimize waiting times.

Gym Reservation App 💪 Oscar Su, Amelia Reeves, Nathan Ma Possible name: Pump Program The goal is to reduce/eliminate the time spent waiting on others

Jul 8, 2022

This is a demo project for the SecTester JS SDK framework, with some installation and usage examples

This is a demo project for the SecTester JS SDK framework, with some installation and usage examples

SecTester SDK Demo Table of contents About this project About SecTester Setup Fork and clone this repo Get a Bright API key Explore the demo applicati

Dec 16, 2022

A script that combines a folder of SVG files into a single sprites file and generates type definitions for safe usage.

remix-sprites-example A script that combines a folder of .svg files into a single sprites.svg file and type definitions for safe usage. Technical Over

Nov 9, 2022

Plugins for my daily usage.

Plugins for my daily usage.

Joplin Plugin Bundle Plugins in one panel. Some of the plugins come from other repo, and I modified them to show all the plugin panels in the same pan

Dec 24, 2022
Comments
  • Bump minimist from 1.2.5 to 1.2.6

    Bump minimist from 1.2.5 to 1.2.6

    Bumps minimist from 1.2.5 to 1.2.6.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • File contents empty after approving new label

    File contents empty after approving new label

    Version: 1.0.11-alpha.0

    We have a project with three languages (en as default, nl and fr). After we approved a new label and downloading the files with the following code:

    for (const language of ['en','nl','fr']) {
      const contents = await api.getFileContents({
          projectId: ourProjectId,
          fileId: fileId,
          lang: language,
        });
      const json = await contents.text();
    }
    

    The first two requests always return an empty json object {}. The third request will have the labels. I noticed that adding a timeout between the requests helps, as the second request will already have the labels as one. Switching the order of the requested languages doesn't make a change. I think that the getFileContents notices that the files are outdated and returns an empty json object while generating the new files. If these updated files are ready by the time the other requests come in, they'll receive the correct, updated contents.

    I haven't tested if this is the same when calling the HTTP endpoints directly instead of through this package.

    opened by dumazy 0
Releases(v1.0.8)
Owner
Localazy
Localize apps while you sleep.
Localazy
Bearer provides all of the tools to build, run and manage API integrations.

Bearer - The API Integration Framework Bearer provides all of the tools to build, run and manage API Learn more Archive Status Bearer JS has been arch

Bearer.sh 22 Oct 31, 2022
Modern Fetch API wrapper for simplicity.

FarFetch Class Modern Fetch API wrapper for simplicity. Install npm i @websitebeaver/far-fetch Then include it in the files you want to use it in lik

Website Beaver 53 Oct 28, 2022
Optic documents and tests your API as you build it

Optic uses real traffic to document and test your APIs Language agnostic, works with any Rest API Optic observes development traffic and learns your A

Optic 1k Dec 31, 2022
REST API for muvi

muvi API REST API for muvi - a Chrome extension to download movies directly from a Google search. Run it locally npm i npm test How to contribute Help

null 6 Sep 19, 2021
Cuma mau bantu mereka yang kepengen bikin api sendiri

Source Codes - Zhirrr's API Api Features Check it yourself Here Cara Ganti ApiKey Gimana? Cara Mengganti Nya Cukup Gampang, Kalian Hanya Perlu Untuk M

zeeone 46 Jan 13, 2022
An API by Sujal Goel.

API ?? An API by Sujal Goel. Features ?? ?? Discord OAuth2 ✨ Simple and easy to use ?? Token based authentication for endpoints and much more! Contrib

Sujal Goel 4 Nov 7, 2021
API KBANK ( KBIZ )

Kbiz API Unofficial Kbiz's API. Examples ก่อนใช้งาน จำเป็นต้องลง axios ก่อน var kbizapi = require("./kbiz.class"); (async()=>{ var config = {

Think so. 9 Sep 7, 2022
A simple project to helping developer's to access open api's

OAS: OPEN APPLE STORE, has made this with the help of Apple Store item, this project which provide an additional choice to developer to interact with API.

Abhay Prajapati 8 Nov 19, 2022
An open UI for Hydra, a protocol on Solana for facilitating collective account pooling, fan out wallet and dao treasury

An open UI for Hydra, a protocol on Solana for facilitating collective account pooling, fan out wallet and dao treasury.

Cardinal 16 Dec 20, 2022
API Observability. Trace API calls and Monitor API performance, health and usage statistics in Node.js Microservices.

swagger-stats | API Observability https://swaggerstats.io | Guide Trace API calls and Monitor API performance, health and usage statistics in Node.js

slana.tech 773 Jan 4, 2023