Skip to main content
Glama

mcp-appstore

by appreply-co
lib.reviews.js1.48 kB
'use strict'; const store = require('../index'); const assert = require('chai').assert; const assertValidUrl = require('./common').assertValidUrl; function assertValid (review) { assert.isString(review.id); assert(review.id); assert.isString(review.userName); assert(review.userName); assert.isString(review.title); assert.isString(review.text); assert.isNumber(review.score); assert(review.score > 0); assert(review.score <= 5); assertValidUrl(review.url); } describe('Reviews method', () => { it('should retrieve the reviews of an app', () => { return store.reviews({id: '553834731'}) .then((reviews) => { reviews.map(assertValid); }); }); it('should validate the sort', () => { return store.reviews({ id: '553834731', sort: 'invalid' }) .then(assert.fail) .catch((e) => assert.equal(e.message, 'Invalid sort invalid')); }); it('should validate the page', () => { return store.reviews({ id: '553834731', page: 11 }) .then(assert.fail) .catch((e) => assert.equal(e.message, 'Page cannot be greater than 10')); }); it('should be able to set requestOptions', (done) => { store.reviews({ id: '553834731', requestOptions: { method: 'DELETE' } }) .then(() => done('should not resolve')) .catch((err) => { assert.equal(err.response.statusCode, 501); done(); }) .catch(done); }); });

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/appreply-co/mcp-appstore'

If you have feedback or need assistance with the MCP directory API, please join our Discord server