Skip to content
This repository has been archived by the owner on Mar 28, 2022. It is now read-only.

Publish "Mocks Server Administration API Client" #1

Closed
javierbrea opened this issue Nov 13, 2019 · 2 comments
Closed

Publish "Mocks Server Administration API Client" #1

javierbrea opened this issue Nov 13, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@javierbrea
Copy link
Member

javierbrea commented Nov 13, 2019

It is desirable to publish the first version of the @mocks-server/admin-api-client package, which will allow users to interact programmatically with the Mocks Server administration REST API.

In the first version It should expose methods to perform some basic operations such as:

  • Change delay time
  • Change current behavior

Here goes a proposal for the interface:

const AdminApiClient = require("@mocks-server/admin-api-client");

const apiClient = new AdminApiClient("http://localhost:3100");

apiClient.setBehavior("foo-behavior").then(() => {
  console.log("Behavior changed");
});

apiClient.setDelay(3000).then(() => {
  console.log("Delay changed");
});
@javierbrea
Copy link
Member Author

Dependent of mocks-server/main#20

@javierbrea javierbrea self-assigned this Dec 25, 2019
@javierbrea
Copy link
Member Author

First release merged in PR #2 , and published.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

1 participant