Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

digitalocean-js

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

digitalocean-js - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

6

dist/lib/services/image/image-service.d.ts

@@ -20,3 +20,3 @@ import { DigitalOcean } from '../../digitalocean';

*/
getAllDistributionImages(): Promise<Image[]>;
getAllDistributionImages(page?: number, perPage?: number): Promise<Image[]>;
/**

@@ -28,3 +28,3 @@ * Get all application images

*/
getAllApplicationImages(): Promise<Image[]>;
getAllApplicationImages(page?: number, perPage?: number): Promise<Image[]>;
/**

@@ -36,3 +36,3 @@ * Get the private images of a user

*/
getUserImages(): Promise<Image[]>;
getUserImages(page?: number, perPage?: number): Promise<Image[]>;
/**

@@ -39,0 +39,0 @@ * Get all actions that have been executed on an image

@@ -34,5 +34,7 @@ import Axios from 'axios';

*/
getAllDistributionImages() {
getAllDistributionImages(page, perPage) {
return new Promise((resolve, reject) => {
Axios.get(`${this.baseUrl}/images?type=distribution`).then((response) => {
page = page ? page : 1;
perPage = perPage ? perPage : 25;
Axios.get(`${this.baseUrl}/images?type=distribution&page=${page}&perPage=${perPage}`).then((response) => {
// Return actual images instead of wrapped images

@@ -51,5 +53,7 @@ resolve(response.data.images);

*/
getAllApplicationImages() {
getAllApplicationImages(page, perPage) {
return new Promise((resolve, reject) => {
Axios.get(`${this.baseUrl}/images?type=application`).then((response) => {
page = page ? page : 1;
perPage = perPage ? perPage : 25;
Axios.get(`${this.baseUrl}/images?type=application&page=${page}&perPage=${perPage}`).then((response) => {
// Return actual images instead of wrapped images

@@ -68,5 +72,7 @@ resolve(response.data.images);

*/
getUserImages() {
getUserImages(page, perPage) {
return new Promise((resolve, reject) => {
Axios.get(`${this.baseUrl}/images?private=true`).then((response) => {
page = page ? page : 1;
perPage = perPage ? perPage : 25;
Axios.get(`${this.baseUrl}/images?private=true&page=${page}&perPage=${perPage}`).then((response) => {
// Return actual images instead of wrapped images

@@ -73,0 +79,0 @@ resolve(response.data.images);

{
"name": "digitalocean-js",
"version": "0.2.0",
"version": "0.2.1",
"description": "JavaScript library for the DigitalOcean API",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -42,5 +42,7 @@ import Axios from 'axios';

*/
public getAllDistributionImages(): Promise<Image[]> {
public getAllDistributionImages(page?: number, perPage?: number): Promise<Image[]> {
return new Promise((resolve, reject) => {
Axios.get(`${this.baseUrl}/images?type=distribution`).then((response) => {
page = page ? page : 1;
perPage = perPage ? perPage : 25;
Axios.get(`${this.baseUrl}/images?type=distribution&page=${page}&perPage=${perPage}`).then((response) => {
// Return actual images instead of wrapped images

@@ -60,5 +62,7 @@ resolve(response.data.images);

*/
public getAllApplicationImages(): Promise<Image[]> {
public getAllApplicationImages(page?: number, perPage?: number): Promise<Image[]> {
return new Promise((resolve, reject) => {
Axios.get(`${this.baseUrl}/images?type=application`).then((response) => {
page = page ? page : 1;
perPage = perPage ? perPage : 25;
Axios.get(`${this.baseUrl}/images?type=application&page=${page}&perPage=${perPage}`).then((response) => {
// Return actual images instead of wrapped images

@@ -78,5 +82,7 @@ resolve(response.data.images);

*/
public getUserImages(): Promise<Image[]> {
public getUserImages(page?: number, perPage?: number): Promise<Image[]> {
return new Promise((resolve, reject) => {
Axios.get(`${this.baseUrl}/images?private=true`).then((response) => {
page = page ? page : 1;
perPage = perPage ? perPage : 25;
Axios.get(`${this.baseUrl}/images?private=true&page=${page}&perPage=${perPage}`).then((response) => {
// Return actual images instead of wrapped images

@@ -83,0 +89,0 @@ resolve(response.data.images);

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc