Socket
Socket
Sign inDemoInstall

flora-client-js

Package Overview
Dependencies
1
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    flora-client-js

JavaScript client for Flora based APIs


Version published
Weekly downloads
22
increased by2100%
Maintainers
3
Install size
72.0 kB
Created
Weekly downloads
 

Readme

Source

Flora JS client

NPM version NPM downloads

Easily access Flora based APIs.

String-Notation

const FloraClient = require('flora-client-js');
const client = new FloraClient({ url: 'http://api.example.com/' });

client.execute({
    resource: 'article',
    select: 'id,name,subGroupA[id,name,subSubGroupA[attr1,attr2],subSubGroupB[subSubSubGroupA[attr1,attr2],subSubSubItem,subSubSubGroupB[attr1,attr2]]],attr';
    limit: 15,
}).then((response) => console.log(response));

Object-Notation ( >= v0.4.1)

const FloraClient = require('flora-client-js');
const client = new FloraClient({ url: 'http://api.example.com/' });

client.execute({
    resource: 'article',
	select: [
        'id',
        'name',
        {
            subGroupA: [
            	'id',
                'name',
                {
                    subSubGroupA: ['attr1', 'attr2'],
                    subSubGroupB: [
                        { subSubSubGroupA: ['attr1', 'attr2'] },
                        'subSubSubItem',
                        { subSubSubGroupB: ['attr1', 'attr2'] },
                    ],
                },
            ],
        },
    ];
    limit: 15
}).then(response => console.log(response));

License

MIT

FAQs

Last updated on 21 Apr 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc