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

qrvey-gateway

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qrvey-gateway

Qrvey Gateway By Qrvey <a href="https://npmjs.org/

  • 1.0.0
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Qrvey Gateway

By Qrvey
version downloads install size

qrvey-gateway

The qrvey-gateway package is a library that simplifies HTTP requests through a client interface for various methods like GET, POST, PUT, PATCH, and DELETE.

Installation

You can install the gateway-client package via npm. Run the following command in your terminal:

npm install gateway-client

API Documentation

Available Methods

  • get(endpoint: string, options: IHttpActionOptions): Promise<any>: Performs an HTTP GET request.
  • post(endpoint: string, body: unknown, options: IHttpActionOptions): Promise<any>: Performs an HTTP POST request.
  • put(endpoint: string, body: unknown, options: IHttpActionOptions): Promise<any>: Performs an HTTP PUT request.
  • patch(endpoint: string, body: unknown, options: IHttpActionOptions): Promise<any>: Performs an HTTP PATCH request.
  • delete(endpoint: string, body: unknown, options: IHttpActionOptions): Promise<any>: Performs an HTTP DELETE request.

Sequence Diagram

sequenceDiagram
    participant Application
    participant GatewayClientPkg
    participant Server

    Application ->> GatewayClientPkg: Call GatewayClient method
    Note over GatewayClientPkg: Process: Build HttpRequest
    GatewayClientPkg ->> Server: Send HTTP Request
    Server -->> GatewayClientPkg: HTTP Response
    Note over GatewayClientPkg: Process: Handle response
    GatewayClientPkg -->> Application: Return Response

Example Usage

const { AbstractGatewayClientService } = require('@qrvey/gateway-client');
class DataViewGatewayClient extends AbstractGatewayClientService {
    static groups({ userId, appId, qrveyId }, { body, queryParameters, headers }) {
        const endpoint = `/devapi/v5/user/${userId}/app/${appId}/qrvey/${qrveyId}/analytics/results/groups`;
        return this.post(endpoint, body, { headers, queryParameters });
    }
    static rows({ userId, appId, qrveyId }, { body, queryParameters, headers }) {
        const endpoint = `/devapi/v5/user/${userId}/app/${appId}/qrvey/${qrveyId}/analytics/results/rows`;
        return this.post(endpoint, body, { headers, queryParameters });
    }
    static model({ userId, appId, qrveyId }, { queryParameters, headers }) {
        const endpoint = `/devapi/v4/user/${userId}/app/${appId}/qrvey/${qrveyId}/analytiq/model`;
        return this.get(endpoint, { headers, queryParameters });
    }
}
module.exports = DataViewGatewayClient;

Keywords

FAQs

Package last updated on 24 Feb 2024

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