New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

query-builder-for-driveapi

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

query-builder-for-driveapi

Easily generate queries for the Google Drive API.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Query Builder for DriveAPI

Easily generate queries for the Google Drive API.

📦 Installation

npm install query-builder-for-driveapi

🚀 Quick start

How to import

// ECMAScript
import QueryBuilder from 'query-builder-for-driveapi'

// CommonJS
const QueryBuilder = require('query-builder-for-driveapi').default

How to build a query

  1. Create a new instance

    const query = new QueryBuilder()
    
  2. Add inputs

    query.inParents('folderId')
    query.name().contains('something')
    

    or

    query.inParents('folderId').name().contains('something')
    
  3. Build query

    query.build() // return string
    

Methods

Commonly used terms and operators are supported. You can find a list of all those supported by the Drive API at Google Developers.

Terms

TermMethodReturnDescription
parentsinParents(folderId: string)InstanceIndicates whether the parent collection contains the specified ID.
namename()InstanceSelect the term name to be used with methods like: contains(), isEqualTo() and isNotEqualTo()
fullTextfullText()InstanceSelect the term fullText to be used with methods like: contains()
mimeTypemimeType()InstanceSelect the term mimeType to be used with methods like: contains(), isEqualTo() and isNotEqualTo()
modifiedTimemodifiedTime()InstanceSelect the term modifiedTime to be used with methods like: isLessThan(), isLessThanOrEqualTo(), isEqualTo(), isNotEqualTo(), isGreaterThanOrEqualTo() and isGreaterThan()
createdTimecreatedTime()InstanceSelect the term createdTime to be used with methods like: isLessThan(), isLessThanOrEqualTo(), isEqualTo(), isNotEqualTo(), isGreaterThanOrEqualTo() and isGreaterThan()

Operators

OperatorMethodReturnDescription
containscontains(value: string)InstanceN/A
=isEqualTo(value: string)InstanceN/A
!=isNotEqualTo(value: string)InstanceN/A
<isLessThan(value: string)InstanceN/A
<=isLessThanOrEqualTo(value: string)InstanceN/A
>isGreaterThan(value: string)InstanceN/A
>=isGreaterThanOrEqualTo(value: string)InstanceN/A
notnot()InstanceNegate the following term.

Build

MethodReturnDescription
build()StringReturns a string with the inputs joined with the and operator.

License

MIT License © 2023 - Brian Fernandez

Keywords

FAQs

Package last updated on 16 Feb 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc