🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
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
Package was removed
Sorry, it seems this package was removed from the registry

qrvey-gateway

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

unpublished
latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
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

http

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