Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add images #11

Closed
wants to merge 3 commits into from
Closed

[WIP] Add images #11

wants to merge 3 commits into from

Conversation

BrunnerLivio
Copy link

@BrunnerLivio BrunnerLivio commented Feb 27, 2018

Resolves #10

  • Add image class

  • Update documentation

  • Extend test cases

  • GET /1.0/images

client.images(true, (err, images) => console.log(images))
  • POST /1.0/images
  • GET /1.0/images/<fingerprint>
client.images(false, (err, images) => console.log(images))
  • /1.0/images/<fingerprint>/export
  • GET /1.0/images/<fingerprint>/refresh
client.images(false, (err, images) => {
    images[0].refresh((err, data) => console.log(data));
});
  • /1.0/images/<fingerprint>/secret
  • /1.0/images/aliases
  • /1.0/images/aliases/<name>

@BrunnerLivio BrunnerLivio changed the title Add images [WIP] Add images Feb 27, 2018
@BrunnerLivio
Copy link
Author

BrunnerLivio commented Feb 27, 2018

Currently, in the client class there is a method called client.create, which creates containers. Since you can also create images, it can be confusing whether you create a container or an image with the client.create-method.

I suggest changing client.create to client.createContainer and adding client.createImage.
This would be a breaking change.

Issue: #12

@alandoherty
Copy link
Owner

Looks good, only thing is the use of underscores vs camelCase which is inconsistent with some of the other classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants