npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mashery-client

v1.0.0

Published

Client for interacting with the Mashery V3 REST API.

Downloads

7

Readme

Build Status

Mashery REST API Client

Node.js client for the Mashery REST API (v3).

Getting Started

Install the module with npm install mashery-client -g

var mashery = require('mashery');

// initialize the API client
var api = mashery.init({
    user: '<user_id>',
    pass: '<user_pass>',
    key: '<api_key>',
    secret: '<api_secret>',
    areaUuid: '<area_uuid>'
});

// note authentication will be automatically handled for you

// list all services
apiClient.methods.fetchAllServices({}, function(serviceData, serviceRawResponse){
	console.log(JSON.stringify(serviceData, null, 4));
});

// add an endpoint to an existing service
var args = {
	path: { serviceId: '<service_id>' },
    data: {<JSON_object_representing_endpoint>}
};

apiClient.methods.createServiceEndpoint(args, function(epData, epRawResponse){
	console.log(JSON.stringify(epData, null, 4));
});

Supported Methods

Services

Service Documentation

| Method | Args | | ------ | ---- | | fetchAllServices | | | fetchService | id | | createService | | | updateService | id | | deleteService | id |

Endpoints

Endpoint Documentation

| Method | Args | | ------ | ---- | | fetchAllServiceEndpoints | id | | fetchServiceEndpoint | serviceId, id | | createServiceEndpoint | serviceId | | updateServiceEndpoint | serviceId, id | | deleteServiceEndpoint | serviceId, id |

Methods

Method Documentation

| Method | Args | | ------ | ---- | | fetchAllEndpointMethods | serviceId, endpointId | | fetchEndpointMethod | serviceId, endpointId, id | | createEndpointMethod | serviceId, endpointId | | updateEndpointMethod | serviceId, endpointId, id | | deleteEndpointMethod | serviceId, endpointId, id |

Service Cache

Service Cache Documentation

| Method | Args | | ------ | ---- | | fetchSecurityProfile | serviceId | | createSecurityProfile | | | updateSecurityProfile | serviceId | | deleteSecurityProfile | serviceId |

Service Error Sets

Service Error Set Documentation

| Method | Args | | ------ | ---- | | fetchAllServiceErrorSets | id | | fetchServiceErrorSet | serviceId, id | | createServiceErrorSet | serviceId | | updateServiceErrorSet | serviceId, id | | deleteServiceErrorSet | serviceId, id |

Service Error Set Messages

Service Error Set Documentation

| Method | Args | | ------ | ---- | | fetchAllErrorMessages | serviceId, errorSetId | | fetchErrorMessage | serviceId, errorSetId, id | | createErrorMessage | serviceId, errorSetId | | updateErrorMessage | serviceId, errorSetId, id | | deleteErrorMessage | serviceId, errorSetId, id |

Endpoint Cache

Cache Documentation

| Method | Args | | ------ | ---- | | fetchEndpointCache | serviceId, endpointId | | createEndpointCache | serviceId, endpointId | | updateEndpointCache | serviceId, endpointId | | deleteEndpointCache | serviceId, endpointId |

Security Profile

Security Profile Documentation

| Method | Args | | ------ | ---- | | fetchSecurityProfile | serviceId | | createSecurityProfile | | | updateSecurityProfile | serviceId | | deleteSecurityProfile | serviceId |

Security Profile - OAuth

Security Profile Documentation

| Method | Args | | ------ | ---- | | fetchSecurityProfileOAuth | serviceId | | createSecurityProfileOAuth | | | updateSecurityProfileOAuth | serviceId | | deleteSecurityProfileOAuth | serviceId |

Response Filters

Response Filter Documentation

| Method | Args | | ------ | ---- | | fetchAllResponseFilters | serviceId, endpointId, methodId | | fetchResponseFilter | serviceId, endpointId, methodId, id | | createResponseFilter | serviceId, endpointId, methodId | | updateResponseFilter | serviceId, endpointId, methodId, id | | deleteResponseFilter | serviceId, endpointId, methodId, id |

Scheduled Maintenance Event

Scheduled Maintenance Documentation

| Method | Args | | ------ | ---- | | fetchScheduledEvent | serviceId, endpointId | | createScheduledEvent | serviceId, endpointId | | updateScheduledEvent | serviceId, endpointId | | deleteScheduledEvent | serviceId, endpointId |

CORS

CORS Documentation

| Method | Args | | ------ | ---- | | fetchCORS | serviceId, endpointId | | createCORS | serviceId, endpointId | | updateCORS | serviceId, endpointId | | deleteCORS | serviceId, endpointId |

System Domain Authentication

CORS Documentation

| Method | Args | | ------ | ---- | | fetchSysAuth | serviceId, endpointId | | createSysAuth | serviceId, endpointId | | updateSysAuth | serviceId, endpointId | | deleteSysAuth | serviceId, endpointId |

Service Roles

Role Documentation

| Method | Args | | ------ | ---- | | fetchAllServiceRoles | id | | fetchServiceRole | serviceId, id | | createServiceRole | serviceId | | updateServiceRole | serviceId, id | | deleteServiceRole | serviceId, id |

Packages

Package Documentation

| Method | Args | | ------ | ---- | | fetchAllPackages | | | fetchPackage | id | | createPackage | | | updatePackage | id | | deletePackage | id |

Package Keys

Package Keys Documentation

| Method | Args | | ------ | ---- | | fetchAllPackageKeys | | | fetchPackageKey | id | | updatePackageKey | id | | deletePackageKey | id |

Plans

Plan Documentation

| Method | Args | | ------ | ---- | | fetchAllPlans | packageId | | fetchPlan | packageId, id | | createPlan | packageId |

Plan Services

Plan Services Documentation

| Method | Args | | ------ | ---- | | fetchAllPlanServices | packageId, planId | | fetchAllPlanServicesForService | packageId, planId, id | | createPlanService | packageId, planId| | createPlanEndpoint | packageId, planId, serviceId | | createPlanMethod | packageId, planId, serviceId, endpointId |

Domains

| Method | Args | Documentation | | ------ | ---- | ---| | fetchAllDomains | | Domains | | fetchDomain | | | createDomain | | | | | | | fetchPublicDomains | | Public Domains | | | | | | fetchPublicDomainFQDNs | | FQDN | | | | | | fetchSystemDomains | | System Domain |

Roles

Roles Documentation

| Method | Args | | ------ | ---- | | fetchAllRoles | |

Scheduled Maintenance Events

Scheduled Maintenance Documentation

| Method | Args | | ------ | ---- | | fetchAllScheduledMaintenance | | | fetchScheduledMaintenance | id | | createScheduledMaintenance | | | updateScheduledMaintenance | id | | deleteScheduledMaintenance | id |

Scheduled Maintenance Event Endpoints

Scheduled Maintenance Endpoint Documentation

| Method | Args | | ------ | ---- | | fetchAllScheduledMaintenanceEndpoints | maintenanceId | | fetchScheduledMaintenanceEndpoint | maintenanceId, id | | createScheduledMaintenanceEndpoint | maintenanceId | | updateScheduledMaintenanceEndpoint | maintenanceId, id | | deleteScheduledMaintenanceEndpoint | maintenanceId, id |

Email Template Sets

Email Template Set Documentation

| Method | Args | | ------ | ---- | | fetchAllEmailTemplateSets | | | fetchEmailTemplateSet | id | | createEmailTemplateSet | | | updateEmailTemplateSet | id | | deleteEmailTemplateSet | id |

Email Templates

Email Templates Documentation

| Method | Args | | ------ | ---- | | fetchAllEmailTemplates | emailSetId | | fetchEmailTemplate | emailSetId, id | | createEmailTemplate | emailSetId | | updateEmailTemplate | emailSetId, id | | deleteEmailTemplate | emailSetId, id |

##Authors

Brian Antonelli

  • http://github.com/brianantonelli

Copyright and license

Copyright (c) 2016 Cox Automotive

Licensed under the MIT License (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the COPYING file.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.